Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support unsupported steel section #256

Merged
merged 5 commits into from
Jun 10, 2023
Merged
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
24 changes: 12 additions & 12 deletions HoaryFox/RH7/Component/Utils/Geometry/BrepMaker/Brace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,31 +62,31 @@ private SectionCurve[] SecSteelBraceToCurves(IReadOnlyList<object> figures, IRea
case 1:
var same = figures[0] as StbSecSteelBrace_S_Same;
center = same.shape;
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[0], Utils.SectionType.Brace, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[3], Utils.SectionType.Brace, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[0], Utils.SectionPositionType.Brace, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[3], Utils.SectionPositionType.Brace, localAxis));
break;
case 2:
var notSames = new[] { figures[0] as StbSecSteelBrace_S_NotSame, figures[1] as StbSecSteelBrace_S_NotSame };
start = notSames.First(sec => sec.pos == StbSecSteelBrace_S_NotSamePos.BOTTOM).shape;
end = notSames.First(sec => sec.pos == StbSecSteelBrace_S_NotSamePos.TOP).shape;
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, start, sectionPoints[0], Utils.SectionType.Brace, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, start, sectionPoints[0], Utils.SectionPositionType.Brace, localAxis));
curveList.Add(sectionPoints[0] == sectionPoints[1]
? SteelSections.GetCurve(_sections.StbSecSteel, start, sectionPoints[2], Utils.SectionType.Brace, localAxis)
: SteelSections.GetCurve(_sections.StbSecSteel, start, sectionPoints[1], Utils.SectionType.Brace, localAxis));
? SteelSections.GetCurve(_sections.StbSecSteel, start, sectionPoints[2], Utils.SectionPositionType.Brace, localAxis)
: SteelSections.GetCurve(_sections.StbSecSteel, start, sectionPoints[1], Utils.SectionPositionType.Brace, localAxis));
curveList.Add(sectionPoints[0] == sectionPoints[1]
? SteelSections.GetCurve(_sections.StbSecSteel, end, sectionPoints[2], Utils.SectionType.Brace, localAxis)
: SteelSections.GetCurve(_sections.StbSecSteel, end, sectionPoints[1], Utils.SectionType.Brace, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, end, sectionPoints[3], Utils.SectionType.Brace, localAxis));
? SteelSections.GetCurve(_sections.StbSecSteel, end, sectionPoints[2], Utils.SectionPositionType.Brace, localAxis)
: SteelSections.GetCurve(_sections.StbSecSteel, end, sectionPoints[1], Utils.SectionPositionType.Brace, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, end, sectionPoints[3], Utils.SectionPositionType.Brace, localAxis));
break;
case 3:
var three = new[] { figures[0] as StbSecSteelBrace_S_ThreeTypes, figures[1] as StbSecSteelBrace_S_ThreeTypes, figures[2] as StbSecSteelBrace_S_ThreeTypes };
start = three.First(sec => sec.pos == StbSecSteelBrace_S_ThreeTypesPos.BOTTOM).shape;
center = three.First(sec => sec.pos == StbSecSteelBrace_S_ThreeTypesPos.CENTER).shape;
end = three.First(sec => sec.pos == StbSecSteelBrace_S_ThreeTypesPos.TOP).shape;
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, start, sectionPoints[0], Utils.SectionType.Brace, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[1], Utils.SectionType.Brace, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[2], Utils.SectionType.Brace, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, end, sectionPoints[3], Utils.SectionType.Brace, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, start, sectionPoints[0], Utils.SectionPositionType.Brace, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[1], Utils.SectionPositionType.Brace, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[2], Utils.SectionPositionType.Brace, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, end, sectionPoints[3], Utils.SectionPositionType.Brace, localAxis));
break;
default:
throw new ArgumentException("Unmatched StbSecSteelBrace_S");
Expand Down
48 changes: 24 additions & 24 deletions HoaryFox/RH7/Component/Utils/Geometry/BrepMaker/Column.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,35 +84,35 @@ private SectionCurve[] SecCftColumnToCurves(IReadOnlyList<object> figures, IRead
case 1:
var same = figures[0] as StbSecSteelColumn_CFT_Same;
center = same.shape;
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[0], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[3], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[0], Utils.SectionPositionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[3], Utils.SectionPositionType.Column, localAxis));
break;
case 2:
var notSames = new[] { figures[0] as StbSecSteelColumn_CFT_NotSame, figures[1] as StbSecSteelColumn_CFT_NotSame };
bottom = notSames.First(item => item.pos == StbSecSteelColumn_CFT_NotSamePos.BOTTOM).shape;
top = notSames.First(item => item.pos == StbSecSteelColumn_CFT_NotSamePos.TOP).shape;
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[0], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[0], Utils.SectionPositionType.Column, localAxis));
if (sectionPoints[1].Z > sectionPoints[0].Z)
{
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[1], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[1], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[1], Utils.SectionPositionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[1], Utils.SectionPositionType.Column, localAxis));
}
else
{
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[2], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[2], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[2], Utils.SectionPositionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[2], Utils.SectionPositionType.Column, localAxis));
}
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[3], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[3], Utils.SectionPositionType.Column, localAxis));
break;
case 3:
var three = new[] { figures[0] as StbSecSteelColumn_CFT_ThreeTypes, figures[1] as StbSecSteelColumn_CFT_ThreeTypes, figures[2] as StbSecSteelColumn_CFT_ThreeTypes };
bottom = three.First(item => item.pos == StbSecSteelColumn_CFT_ThreeTypesPos.BOTTOM).shape;
center = three.First(item => item.pos == StbSecSteelColumn_CFT_ThreeTypesPos.CENTER).shape;
top = three.First(item => item.pos == StbSecSteelColumn_CFT_ThreeTypesPos.TOP).shape;
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[0], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[1], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[2], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[3], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[0], Utils.SectionPositionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[1], Utils.SectionPositionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[2], Utils.SectionPositionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[3], Utils.SectionPositionType.Column, localAxis));
break;
default:
throw new ArgumentException("Unmatched StbSecSteelColumn_CFT");
Expand Down Expand Up @@ -165,35 +165,35 @@ private SectionCurve[] SecSteelColumnToCurves(IReadOnlyList<object> figures, IRe
case 1:
var same = figures[0] as StbSecSteelColumn_S_Same;
center = same.shape;
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[0], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[3], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[0], Utils.SectionPositionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[3], Utils.SectionPositionType.Column, localAxis));
break;
case 2:
var notSames = new[] { figures[0] as StbSecSteelColumn_S_NotSame, figures[1] as StbSecSteelColumn_S_NotSame };
bottom = notSames.First(item => item.pos == StbSecSteelColumn_S_NotSamePos.BOTTOM).shape;
top = notSames.First(item => item.pos == StbSecSteelColumn_S_NotSamePos.TOP).shape;
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[0], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[0], Utils.SectionPositionType.Column, localAxis));
if (sectionPoints[1].Z > sectionPoints[0].Z)
{
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[1], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[1], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[1], Utils.SectionPositionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[1], Utils.SectionPositionType.Column, localAxis));
}
else
{
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[2], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[2], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[2], Utils.SectionPositionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[2], Utils.SectionPositionType.Column, localAxis));
}
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[3], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[3], Utils.SectionPositionType.Column, localAxis));
break;
case 3:
var three = new[] { figures[0] as StbSecSteelColumn_S_ThreeTypes, figures[1] as StbSecSteelColumn_S_ThreeTypes, figures[2] as StbSecSteelColumn_S_ThreeTypes };
bottom = three.First(item => item.pos == StbSecSteelColumn_S_ThreeTypesPos.BOTTOM).shape;
center = three.First(item => item.pos == StbSecSteelColumn_S_ThreeTypesPos.CENTER).shape;
top = three.First(item => item.pos == StbSecSteelColumn_S_ThreeTypesPos.TOP).shape;
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[0], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[1], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[2], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[3], Utils.SectionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[0], Utils.SectionPositionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[1], Utils.SectionPositionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[2], Utils.SectionPositionType.Column, localAxis));
curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[3], Utils.SectionPositionType.Column, localAxis));
break;
default:
throw new ArgumentException("Unmatched StbSecSteelColumn_S");
Expand Down
Loading