diff --git a/.gitignore b/.gitignore
index 1bdad8400..10f4e1422 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,3 +50,6 @@ FemDesign.Tests/Results/**/*.log
/FemDesign.Examples/Python/jupyter-notebook/.ipynb_checkpoints
/FemDesign.Python/packaging/src
/FemDesign.Python/FEM-Design API
+*.whl
+*.gz
+/FemDesign.Python/FEM_Design.egg-info
diff --git a/FemDesign.Core/Bars/BarPart.cs b/FemDesign.Core/Bars/BarPart.cs
index 69930f84c..04c63f8a0 100644
--- a/FemDesign.Core/Bars/BarPart.cs
+++ b/FemDesign.Core/Bars/BarPart.cs
@@ -533,23 +533,23 @@ public Eccentricity[] AnalyticalEccentricity
[XmlAttribute("ecc_crack")]
[DefaultValue(false)]
- public bool EccCrack { get; set; }
+ public bool EccCrack { get; set; } = false;
[XmlAttribute("first_order_analysis_U")]
[DefaultValue(false)]
- public bool FirstOrderAnalysisU { get; set; }
+ public bool FirstOrderAnalysisU { get; set; } = false;
[XmlAttribute("first_order_analysis_Sq")]
[DefaultValue(false)]
- public bool FirstOrderAnalysisSq { get; set; }
+ public bool FirstOrderAnalysisSq { get; set; } = false;
[XmlAttribute("first_order_analysis_Sf")]
[DefaultValue(false)]
- public bool FirstOrderAnalysisSf { get; set; }
+ public bool FirstOrderAnalysisSf { get; set; } = false;
[XmlAttribute("first_order_analysis_Sc")]
[DefaultValue(false)]
- public bool FirstOrderAnalysisSc { get; set; }
+ public bool FirstOrderAnalysisSc { get; set; } = false;
///
/// Parameterless constructor for serialization.
diff --git a/FemDesign.Core/Calculate/Options.cs b/FemDesign.Core/Calculate/Options.cs
index 4dbe2d21f..db089693e 100644
--- a/FemDesign.Core/Calculate/Options.cs
+++ b/FemDesign.Core/Calculate/Options.cs
@@ -28,7 +28,7 @@ public class Sort
[DefaultValue(0)]
[XmlElement("step")]
- public double _step { get; set; }
+ public double _step { get; set; } = 0;
[XmlIgnore]
public double Step
diff --git a/FemDesign.Core/FemDesign.Core.csproj b/FemDesign.Core/FemDesign.Core.csproj
index 99ceda4ca..33b88e39d 100644
--- a/FemDesign.Core/FemDesign.Core.csproj
+++ b/FemDesign.Core/FemDesign.Core.csproj
@@ -144,7 +144,7 @@
-
+
diff --git a/FemDesign.Core/FemDesignConnection.cs b/FemDesign.Core/FemDesignConnection.cs
index 57f9f8ec6..783df090b 100644
--- a/FemDesign.Core/FemDesignConnection.cs
+++ b/FemDesign.Core/FemDesignConnection.cs
@@ -32,7 +32,7 @@ namespace FemDesign
///
public class FemDesignConnection : IDisposable
{
- private readonly int fdVersion = 24;
+ private readonly int fdVersion = 25;
private readonly PipeConnection _connection;
private readonly Process _process;
public bool HasExited { get; private set; }
@@ -71,7 +71,7 @@ public class FemDesignConnection : IDisposable
/// BE CAREFUL!If true the will be deleted on exit. This option has no effect unless has been specified.
///
public FemDesignConnection(
- string fdInstallationDir = @"C:\Program Files\StruSoft\FEM-Design 24\",
+ string fdInstallationDir = @"C:\Program Files\StruSoft\FEM-Design 25\",
bool minimized = false,
bool keepOpen = false,
string outputDir = null,
@@ -110,7 +110,7 @@ public FemDesignConnection(
}
catch
{
- throw new Exception(@"fd3dstruct.exe has not been found. `C:\Program Files\StruSoft\FEM-Design 24\` does not exist!");
+ throw new Exception($"fd3dstruct.exe has not been found. {installDir} does not exist!");
}
_process.Exited += _processExited;
@@ -142,10 +142,10 @@ public string SetFemDesignDirectory(string fdInstallationDir)
var defaultDirs = new List()
{
- @"C:\Program Files\StruSoft\FEM-Design 24\",
- @"C:\Program Files\StruSoft\FEM-Design 24 Educational\",
- @"C:\Program Files\StruSoft\FEM-Design 24 Student\",
- @"C:\Program Files\StruSoft\FEM-Design 24 Night Install\" // for StruSoft employees
+ @"C:\Program Files\StruSoft\FEM-Design 25\",
+ @"C:\Program Files\StruSoft\FEM-Design 25 Educational\",
+ @"C:\Program Files\StruSoft\FEM-Design 25 Student\",
+ @"C:\Program Files\StruSoft\FEM-Design 25 Night Install\" // for StruSoft employees
};
foreach (var dir in defaultDirs)
diff --git a/FemDesign.Core/Foundations/ExtrudedSolid.cs b/FemDesign.Core/Foundations/ExtrudedSolid.cs
index 679b7e693..5c7c6acc3 100644
--- a/FemDesign.Core/Foundations/ExtrudedSolid.cs
+++ b/FemDesign.Core/Foundations/ExtrudedSolid.cs
@@ -16,7 +16,7 @@ public partial class ExtrudedSolid
[XmlAttribute("abobe")]
[DefaultValue(false)]
- public bool Above { get; set; }
+ public bool Above { get; set; } = false;
[XmlElement("region")]
public FemDesign.Geometry.Region Region { get; set; }
diff --git a/FemDesign.Core/Foundations/IsolatedFoundation.cs b/FemDesign.Core/Foundations/IsolatedFoundation.cs
index 65cdcc335..cbc05b7dc 100644
--- a/FemDesign.Core/Foundations/IsolatedFoundation.cs
+++ b/FemDesign.Core/Foundations/IsolatedFoundation.cs
@@ -47,7 +47,7 @@ public partial class IsolatedFoundation : NamedEntityBase, IStructureElement, IF
[XmlAttribute("analythical_system")]
[DefaultValue(FoundationSystem.Simple)]
- public FoundationSystem FoundationSystem { get; set; }
+ public FoundationSystem FoundationSystem { get; set; } = FoundationSystem.Simple;
#region MATERIAL
diff --git a/FemDesign.Core/Materials/Concrete.cs b/FemDesign.Core/Materials/Concrete.cs
index 42bfb2ad0..ab2bf6a18 100644
--- a/FemDesign.Core/Materials/Concrete.cs
+++ b/FemDesign.Core/Materials/Concrete.cs
@@ -1,6 +1,6 @@
// https://strusoft.com/
-using StruSoft.Interop_24;
+using StruSoft.Interop_25;
using System.Xml.Serialization;
namespace FemDesign.Materials
@@ -12,16 +12,16 @@ namespace FemDesign.Materials
public partial class Concrete: MaterialBase
{
[XmlElement("tda_creep")]
- public StruSoft.Interop_24.Tda_creep2 CreepTimeDependant { get; set; }
+ public StruSoft.Interop_25.Tda_creep2 CreepTimeDependant { get; set; }
[XmlElement("tda_shrinkage")]
- public StruSoft.Interop_24.Tda_shrinkage ShrinkageTimeDependant { get; set; }
+ public StruSoft.Interop_25.Tda_shrinkage ShrinkageTimeDependant { get; set; }
[XmlElement("tda_elasticity")]
- public StruSoft.Interop_24.Tda_elasticity ElasticityTimeDependant { get; set; }
+ public StruSoft.Interop_25.Tda_elasticity ElasticityTimeDependant { get; set; }
[XmlElement("plastic_analysis_data")]
- public StruSoft.Interop_24.Concrete_pl_data Plasticity { get; set; }
+ public StruSoft.Interop_25.Concrete_pl_data Plasticity { get; set; }
[XmlAttribute("Fck")]
public string Fck { get; set; } // material_base_value
@@ -101,7 +101,7 @@ internal void SetMaterialParameters(double creepUls, double creepSlq, double cre
internal void SetPlasticity(bool plastic = true, bool hardening = true, CrushingCriterion crushing = CrushingCriterion.Prager, bool tensionStrength = true, TensionStiffening tensionStiffening = TensionStiffening.Hinton, ReducedCompression reducedCompression = ReducedCompression.Vecchio1, bool reducedTransverse = false, bool ultimateStrainRebars = true )
{
- var plasticity = new StruSoft.Interop_24.Concrete_pl_attribs();
+ var plasticity = new StruSoft.Interop_25.Concrete_pl_attribs();
plasticity.Elasto_plastic_behaviour = plastic;
plasticity.Plastic_hardening = hardening;
@@ -112,7 +112,7 @@ internal void SetPlasticity(bool plastic = true, bool hardening = true, Crushing
else
{
plasticity.Concrete_crushing = true;
- plasticity.Concrete_crushing_option = (StruSoft.Interop_24.Cc_type)crushing;
+ plasticity.Concrete_crushing_option = (StruSoft.Interop_25.Cc_type)crushing;
}
plasticity.Tension_strength = tensionStrength;
@@ -124,7 +124,7 @@ internal void SetPlasticity(bool plastic = true, bool hardening = true, Crushing
else
{
plasticity.Tension_stiffening = true;
- plasticity.Tension_stiffening_option = (StruSoft.Interop_24.Ts_type)tensionStiffening;
+ plasticity.Tension_stiffening_option = (StruSoft.Interop_25.Ts_type)tensionStiffening;
if(tensionStiffening == TensionStiffening.Hinton)
plasticity.Tension_stiffening_param = 0.5;
@@ -143,7 +143,7 @@ internal void SetPlasticity(bool plastic = true, bool hardening = true, Crushing
else
{
plasticity.Reduced_compression_strength = true;
- plasticity.Reduced_compression_strength_option = (StruSoft.Interop_24.Rcsm_type) reducedCompression;
+ plasticity.Reduced_compression_strength_option = (StruSoft.Interop_25.Rcsm_type) reducedCompression;
if(reducedCompression == ReducedCompression.Cervera)
plasticity.Reduced_compression_strength_param = 0.550;
diff --git a/FemDesign.Core/Materials/Material.cs b/FemDesign.Core/Materials/Material.cs
index 8a97b09f4..3d9ea9154 100644
--- a/FemDesign.Core/Materials/Material.cs
+++ b/FemDesign.Core/Materials/Material.cs
@@ -232,7 +232,7 @@ public static Material SetConcretePlasticity(this Material material, bool plasti
return newMaterial;
}
- public static Material SetCreep(this Material material, int to = 28, int humidity = 50, bool nonLinearCreep = true, StruSoft.Interop_24.Cement_type cementType = StruSoft.Interop_24.Cement_type.Class_S, bool increaseFinalValue = true)
+ public static Material SetCreep(this Material material, int to = 28, int humidity = 50, bool nonLinearCreep = true, StruSoft.Interop_25.Cement_type cementType = StruSoft.Interop_25.Cement_type.Class_S, bool increaseFinalValue = true)
{
if (material.Concrete == null)
{
@@ -240,8 +240,8 @@ public static Material SetCreep(this Material material, int to = 28, int humidit
}
// deep clone. downstreams objs will have contain changes made in this method, upstream objs will not.
- var creep = new StruSoft.Interop_24.Tda_creep2();
- creep.EN_199211_2004 = new StruSoft.Interop_24.Tda_creep_EN1992()
+ var creep = new StruSoft.Interop_25.Tda_creep2();
+ creep.EN_199211_2004 = new StruSoft.Interop_25.Tda_creep_EN1992()
{
T0 = to,
RH = humidity,
@@ -263,7 +263,7 @@ public static Material SetCreep(this Material material, int to = 28, int humidit
return newMaterial;
}
- public static Material SetShrinkage(this Material material, int to = 28, int humidity = 50, StruSoft.Interop_24.Cement_type cementType = StruSoft.Interop_24.Cement_type.Class_S)
+ public static Material SetShrinkage(this Material material, int to = 28, int humidity = 50, StruSoft.Interop_25.Cement_type cementType = StruSoft.Interop_25.Cement_type.Class_S)
{
if (material.Concrete == null)
{
@@ -271,8 +271,8 @@ public static Material SetShrinkage(this Material material, int to = 28, int hum
}
// deep clone. downstreams objs will have contain changes made in this method, upstream objs will not.
- var shrinkage = new StruSoft.Interop_24.Tda_shrinkage();
- shrinkage.EN_199211_2004 = new StruSoft.Interop_24.Tda_shrinkageEN_199211_2004()
+ var shrinkage = new StruSoft.Interop_25.Tda_shrinkage();
+ shrinkage.EN_199211_2004 = new StruSoft.Interop_25.Tda_shrinkageEN_199211_2004()
{
Ts = to,
RH = humidity,
@@ -292,7 +292,7 @@ public static Material SetShrinkage(this Material material, int to = 28, int hum
return newMaterial;
}
- public static Material setElasticity(this Material material, int to = 28, StruSoft.Interop_24.Cement_type cementType = StruSoft.Interop_24.Cement_type.Class_S)
+ public static Material setElasticity(this Material material, int to = 28, StruSoft.Interop_25.Cement_type cementType = StruSoft.Interop_25.Cement_type.Class_S)
{
if (material.Concrete == null)
{
@@ -300,8 +300,8 @@ public static Material setElasticity(this Material material, int to = 28, StruSo
}
// deep clone. downstreams objs will have contain changes made in this method, upstream objs will not.
- var elasticity = new StruSoft.Interop_24.Tda_elasticity();
- elasticity.EN_199211_2004 = new StruSoft.Interop_24.Tda_elasticityEN_199211_2004()
+ var elasticity = new StruSoft.Interop_25.Tda_elasticity();
+ elasticity.EN_199211_2004 = new StruSoft.Interop_25.Tda_elasticityEN_199211_2004()
{
T0 = to,
Cement_type = cementType,
diff --git a/FemDesign.Core/Materials/MaterialDatabase.cs b/FemDesign.Core/Materials/MaterialDatabase.cs
index d653a1a65..9f938550e 100644
--- a/FemDesign.Core/Materials/MaterialDatabase.cs
+++ b/FemDesign.Core/Materials/MaterialDatabase.cs
@@ -6,6 +6,7 @@
using System.Reflection;
using System.Linq;
using System.Xml.Serialization;
+using FemDesign.Materials;
namespace FemDesign.Materials
{
@@ -106,37 +107,7 @@ public List MaterialNames()
///
public Material MaterialByName(string materialName)
{
- if (this.Materials != null)
- {
- foreach (Material material in this.Materials.Material)
- {
- if (material.Name == materialName)
- {
- // update object information
- //material.Guid = System.Guid.NewGuid();
- material.EntityModified();
-
- // return
- return material;
- }
- }
- }
- if (this.ReinforcingMaterials != null)
- {
- foreach (Material material in this.ReinforcingMaterials.Material)
- {
- if (material.Name == materialName)
- {
- // update object information
- //material.Guid = System.Guid.NewGuid();
- material.EntityModified();
-
- // return
- return material;
- }
- }
- }
- throw new System.ArgumentException($"Material was not found. Incorrect material name ({materialName}) or empty material database.");
+ return this.Materials.Material.MaterialByName(materialName);
}
public List GetSoilMaterial()
diff --git a/FemDesign.Core/Model/Entities.cs b/FemDesign.Core/Model/Entities.cs
index 71b8c3444..4b3480c28 100644
--- a/FemDesign.Core/Model/Entities.cs
+++ b/FemDesign.Core/Model/Entities.cs
@@ -75,7 +75,7 @@ public partial class Entities
[XmlElement("punching_reinforcement", Order = 20)]
public List PunchingReinforcements { get; set; } = new List();
- [Obsolete("Use `NoShearControlRegions`", true)]
+ [Obsolete("Use `NoShearControlRegions`")]
[XmlElement("no-shear_region", Order = 21)]
public List NoShearRegions { get; set; } = new List();
diff --git a/FemDesign.Core/Model/Model.cs b/FemDesign.Core/Model/Model.cs
index 8e574b445..eff579972 100644
--- a/FemDesign.Core/Model/Model.cs
+++ b/FemDesign.Core/Model/Model.cs
@@ -106,7 +106,7 @@ public partial class Model
public List BoltTypes { get; set; }
[XmlElement("bar_end_lib_type", Order = 19)]
- public List BarEndReleaseTypes { get; set; }
+ public List BarEndReleaseTypes { get; set; }
[XmlElement("geometry", Order = 20)]
public StruSoft.Interop.StruXml.Data.DatabaseGeometry Geometry { get; set; }
@@ -344,7 +344,7 @@ public string SerializeToString()
///
/// Add entities to Model.
///
- public Model AddEntities(List bars, List fictitiousBars, List shells, List fictitiousShells, List panels, List covers, List