Skip to content

Commit

Permalink
Update CFT sec to support infill concrete to brep
Browse files Browse the repository at this point in the history
  • Loading branch information
hrntsm committed May 18, 2023
1 parent 0331593 commit 3cea44e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 4 additions & 1 deletion HoaryFox/RH7/Component/Utils/Geometry/BrepMaker/Column.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ private SectionCurve[] SecCftColumnToCurves(IReadOnlyList<object> figures, IRead
default:
throw new ArgumentException("Unmatched StbSecSteelColumn_CFT");
}

foreach (var curve in curveList)
{
curve.IsCft = true;
}
return curveList.ToArray();
}

Expand Down
3 changes: 1 addition & 2 deletions HoaryFox/RH7/Component/Utils/Geometry/BrepMaker/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,13 @@ public static void RotateCurveList(Vector3d rotateAxis, IReadOnlyList<SectionCur

public static Brep CreateCapedBrepFromLoft(SectionCurve[] sectionCurve, double tolerance)
{

Brep brep = Brep.CreateFromLoft(sectionCurve.Select(c => c.OuterCurve), Point3d.Unset, Point3d.Unset, LoftType.Straight, false)[0]
.CapPlanarHoles(tolerance);
if (brep == null)
{
return null;
}
if (sectionCurve[0].InnerCurve != null)
if (sectionCurve[0].InnerCurve != null && !sectionCurve[0].IsCft)
{
Brep innerBrep = Brep.CreateFromLoft(sectionCurve.Select(c => c.InnerCurve), Point3d.Unset, Point3d.Unset, LoftType.Straight, false)[0]
.CapPlanarHoles(tolerance);
Expand Down
6 changes: 2 additions & 4 deletions HoaryFox/RH7/Component/Utils/Geometry/SectionCurve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ public class SectionCurve
public SectionShape Shape { get; set; }
public SectionType Type { get; set; }
public Vector3d XAxis { get; set; }
public bool IsCft { get; set; }

public void RotateSection(double inPlaneAngle, Vector3d rotateAxis, Point3d sectionPoint)
{
OuterCurve.Rotate(inPlaneAngle, rotateAxis, sectionPoint);
if (InnerCurve != null)
{
InnerCurve.Rotate(inPlaneAngle, rotateAxis, sectionPoint);
}
InnerCurve?.Rotate(inPlaneAngle, rotateAxis, sectionPoint);
}

public static SectionCurve CreateSolidColumnRect(Point3d sectionPoint, double widthX, double widthY, Vector3d[] localAxis)
Expand Down

0 comments on commit 3cea44e

Please sign in to comment.