Skip to content

Commit

Permalink
Merge pull request #489 from strusoft/21.4.0_Branch
Browse files Browse the repository at this point in the history
21.4.0 Improved C# workflow
  • Loading branch information
Marco-Pellegrino authored Sep 30, 2022
2 parents 23de1fc + cc52523 commit 6923b27
Show file tree
Hide file tree
Showing 394 changed files with 5,648 additions and 2,395 deletions.
18 changes: 9 additions & 9 deletions FemDesign.Core/AdvancedFem/Cover.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,26 @@ public partial class Cover: EntityBase, IStructureElement
/// Identifier
/// </summary>
[XmlAttribute("name")]
public string _identifier;
public string _name;
[XmlIgnore]
public string Identifier
public string Name
{
get
{
return this._identifier;
return this._name;
}
set
{
Cover._coverInstance++;
this._identifier = value + "." + Cover._coverInstance.ToString();
this._name = value + "." + Cover._coverInstance.ToString();
}
}

/// <summary>
/// Load bearing direction (point_type_3d)
/// </summary>
[XmlElement("load_bearing_direction", Order = 1)]
public Geometry.FdVector3d LoadBearingDirection { get; set; }
public Geometry.Vector3d LoadBearingDirection { get; set; }

/// <summary>
/// Region (region_type).
Expand Down Expand Up @@ -69,17 +69,17 @@ private Cover()
/// <param name="region">Region of cover.</param>
/// <param name="supportingStructures">Guidlist of supporting structure.</param>
/// <param name="loadBearingDirection">Vector, if null a TwoWay cover is defined.</param>
public Cover(Geometry.Region region, CoverReferenceList supportingStructures, Geometry.FdVector3d loadBearingDirection, string identifier)
public Cover(Geometry.Region region, CoverReferenceList supportingStructures, Geometry.Vector3d loadBearingDirection, string identifier)
{
this.EntityCreated();
this.Identifier = identifier;
this.Name = identifier;
this.Region = region;
this.SupportingStructures = supportingStructures;
this.LoadBearingDirection = loadBearingDirection;
}

/// Create OneWayCover.
public static Cover OneWayCover(Geometry.Region region, List<object> supportingStructures, Geometry.FdVector3d loadBearingDirection, string identifier)
public static Cover OneWayCover(Geometry.Region region, List<object> supportingStructures, Geometry.Vector3d loadBearingDirection, string identifier)
{
// get supportingStructures.guid
CoverReferenceList _supportingStructures = CoverReferenceList.FromObjectList(supportingStructures);
Expand All @@ -90,7 +90,7 @@ public static Cover OneWayCover(Geometry.Region region, List<object> supportingS
return _cover;
}

public static Cover OneWayCover(Geometry.Region region, List<FemDesign.GenericClasses.IStructureElement> supportingStructures, Geometry.FdVector3d loadBearingDirection, string identifier)
public static Cover OneWayCover(Geometry.Region region, List<FemDesign.GenericClasses.IStructureElement> supportingStructures, Geometry.Vector3d loadBearingDirection, string identifier)
{
// get supportingStructures.guid
CoverReferenceList _supportingStructures = CoverReferenceList.FromObjectList(supportingStructures);
Expand Down
16 changes: 8 additions & 8 deletions FemDesign.Core/AuxiliaryResults/LabelledSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public partial class LabelledSection : EntityBase, IStructureElement
/// The verticies of the labelled section. 2 verticies for line geometry and 3 or more for polyline geometry.
/// </summary>
[XmlIgnore]
public List<FdPoint3d> Verticies {
public List<Point3d> Verticies {
get
{
var verticies = new List<FdPoint3d>();
var verticies = new List<Point3d>();
if (_lineSegment != null)
verticies.AddRange(_lineSegment.Verticies);
if (_polyline != null)
Expand Down Expand Up @@ -56,7 +56,7 @@ public List<FdPoint3d> Verticies {
/// Identifier
/// </summary>
[XmlAttribute("name")]
public string Identifier { get; set; }
public string Name { get; set; }

/// <summary>
/// Parameterless contructor for serialization
Expand All @@ -68,24 +68,24 @@ private LabelledSection() { }
/// </summary>
/// <param name="verticies">Verticies</param>
/// <param name="identifier">Identifier</param>
public LabelledSection(List<FdPoint3d> verticies, string identifier = "LS")
public LabelledSection(List<Point3d> verticies, string identifier = "LS")
{
Initialize(verticies, identifier);
}

/// <inheritdoc cref="LabelledSection(List{FdPoint3d}, string)"/>
public LabelledSection(string identifier = "LS", params FdPoint3d[] verticies)
/// <inheritdoc cref="LabelledSection(List{Point3d}, string)"/>
public LabelledSection(string identifier = "LS", params Point3d[] verticies)
{
Initialize(verticies.ToList(), identifier);
}

private void Initialize(List<FdPoint3d> verticies, string identifier)
private void Initialize(List<Point3d> verticies, string identifier)
{
instances++;
this.EntityCreated();

Verticies = verticies;
Identifier = $"{identifier}.{instances}";
Name = $"{identifier}.{instances}";
}
}
}
Loading

0 comments on commit 6923b27

Please sign in to comment.