Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FemDesign.Core/FemDesign.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
<Compile Include="Stage\SFactorType.cs" />
<Compile Include="StruSoft\Interop\StruXml\Data\CaselessLoads.cs" />
<Compile Include="StruSoft\Interop\StruXml\Data\FD 23.00.001 Strusoft.cs" />
<Compile Include="StruSoft\Interop\StruXml\Data\FEM-Design 24.00.005.cs" />
<Compile Include="StruSoft\Interop\StruXml\Data\FEM-Design 25.00.001.cs" />
<Compile Include="StruSoft\Interop\StruXml\Data\Layer_type.cs" />
<Compile Include="StruSoft\Interop\StruXml\Data\Vehicle_lib_type.cs" />
<Compile Include="Releases\RigidityDataType0.cs" />
Expand Down
12 changes: 6 additions & 6 deletions FemDesign.Core/FemDesignConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class FemDesignConnection : IDisposable
/// <param name="tempOutputDir"><code>BE CAREFUL!</code>If true the <paramref name="outputDir"/> will be deleted on exit. This option has no effect unless <paramref name="outputDir"/> has been specified.</param>
/// <param name="verbosity"></param>
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,
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -142,10 +142,10 @@ public string SetFemDesignDirectory(string fdInstallationDir)

var defaultDirs = new List<string>()
{
@"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)
Expand Down
18 changes: 9 additions & 9 deletions FemDesign.Core/Materials/Concrete.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// https://strusoft.com/

using StruSoft.Interop_24;
using StruSoft.Interop_25;
using System.Xml.Serialization;

namespace FemDesign.Materials
Expand All @@ -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
Expand Down Expand Up @@ -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;

Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
18 changes: 9 additions & 9 deletions FemDesign.Core/Materials/Material.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,16 @@ 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)
{
throw new System.ArgumentException("Material must be concrete!");
}

// 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,
Expand All @@ -263,16 +263,16 @@ 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)
{
throw new System.ArgumentException("Material must be concrete!");
}

// 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,
Expand All @@ -292,16 +292,16 @@ 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)
{
throw new System.ArgumentException("Material must be concrete!");
}

// 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,
Expand Down
33 changes: 2 additions & 31 deletions FemDesign.Core/Materials/MaterialDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Reflection;
using System.Linq;
using System.Xml.Serialization;
using FemDesign.Materials;

namespace FemDesign.Materials
{
Expand Down Expand Up @@ -106,37 +107,7 @@ public List<string> MaterialNames()
/// <returns></returns>
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<Material> GetSoilMaterial()
Expand Down
2 changes: 1 addition & 1 deletion FemDesign.Core/Model/Entities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public partial class Entities
[XmlElement("punching_reinforcement", Order = 20)]
public List<Reinforcement.PunchingReinforcement> PunchingReinforcements { get; set; } = new List<Reinforcement.PunchingReinforcement>();

[Obsolete("Use `NoShearControlRegions`", true)]
[Obsolete("Use `NoShearControlRegions`")]
[XmlElement("no-shear_region", Order = 21)]
public List<Reinforcement.NoShearRegionType> NoShearRegions { get; set; } = new List<Reinforcement.NoShearRegionType>();

Expand Down
2 changes: 1 addition & 1 deletion FemDesign.Core/Model/Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public partial class Model
public List<StruSoft.Interop.StruXml.Data.Bolt_lib_type> BoltTypes { get; set; }

[XmlElement("bar_end_lib_type", Order = 19)]
public List<StruSoft.Interop_24.Bar_end_lib_type> BarEndReleaseTypes { get; set; }
public List<StruSoft.Interop_25.Bar_end_lib_type> BarEndReleaseTypes { get; set; }

[XmlElement("geometry", Order = 20)]
public StruSoft.Interop.StruXml.Data.DatabaseGeometry Geometry { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions FemDesign.Core/Properties/GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
// Revision
//

[assembly: AssemblyVersion("24.3.0")]
[assembly: AssemblyFileVersion("24.3.0")]
[assembly: AssemblyVersion("25.0.0")]
[assembly: AssemblyFileVersion("25.0.0")]
3 changes: 2 additions & 1 deletion FemDesign.Core/Sections/Section.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ public static class SectionExtension
return sectionByFamily;
}


public static Section SectionByName(this List<FemDesign.Sections.Section> sections, string sectionName)
{
// abbreviation HEA 100
Expand All @@ -213,7 +214,7 @@ public static Section SectionByName(this List<FemDesign.Sections.Section> sectio
ExtractedResult<string> extr = extracted.Score > extract.Score ? extracted : extract;

if (extr.Score < Section._fuzzyScore)
throw new Exception($"{sectionName} can not be found!");
throw new Exception($"{sectionName} can not be found! Try different naming conventions.");
else
return sections[extr.Index];
}
Expand Down
13 changes: 10 additions & 3 deletions FemDesign.Core/Sections/SectionDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,19 @@ private SectionDatabase()
}



/// <summary>
/// Returns the first <see cref="Section"/> in the database with the specified name.
/// Use <see cref="SectionNames"/> to get a list of all section names in the database.
/// You can also use abbreviated names as used in FEM-Design results.
/// i.e. "HEA100", "IPE200", "CHS 323.9-8.8" etc.
/// </summary>
/// <param name="sectionName">The name of the section to find.</param>
/// <returns>The <see cref="Section"/> with the specified name, or null if not found.</returns>
public Section SectionByName(string sectionName)
{
var sections = this.Sections.Section;
var sectionNames = sections.Select(x => x._sectionName).ToArray();
var index = FuzzySharp.Process.ExtractOne(sectionName, sectionNames).Index;
return sections[index];
return sections.SectionByName(sectionName);
}

/// <summary>
Expand Down
Loading