Skip to content

Structure_Engine: Apply the coordinate system in Create.PadFoundation - #3653

Open
Chrisshort92 wants to merge 1 commit into
developfrom
Structure_Engine-#3652-CreatePadFoundation-Coord
Open

Chrisshort92 wants to merge 1 commit into
developfrom
Structure_Engine-#3652-CreatePadFoundation-Coord

Conversation

@Chrisshort92

Copy link
Copy Markdown
Contributor

Issues addressed by this PR

Closes #3652

Create.PadFoundation(width, length, thickness, coordinateSystem, orientationAngle) called Orient on the perimeter but discarded the result, so the pad was always built at the origin. The oriented perimeter is now kept.

Test files

Create a pad with Create.PadFoundation(2, 4, null, cs) where cs has its origin at (10, 20, -1) and local X along global Y:

  • Before: the perimeter stays at the origin, (±1, ±2, 0).
  • After: the perimeter is moved and rotated to X 8 to 12, Y 19 to 21, Z -1.
  • With no coordinate system, the result is unchanged.

Changelog

  • Create.PadFoundation with a coordinate system now places the pad in that coordinate system.

Additional comments

🤖 Generated with Claude Code

The rectangular overload discarded the result of Orient, so the pad was
always built at the origin. The oriented perimeter is now kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@IsakNaslundBh

Copy link
Copy Markdown
Contributor

Might be worth waiting until #3649 is merged for this, as it should be able to make good use of it?

@IsakNaslundBh IsakNaslundBh left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now #3649 has been merged.

You should just be able to to call Geometry.Create.Rectangle(length, width, coordinateSystem), which returns you a polygon you can eiter directly use as the perimiter, or if you need it to be a PolyCurve, do PolyCurve perimiter = new PolyCurve{ Curves = polygon.SubParts()};

You need to update this branch from develop to get access to that method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Structure_Engine: Create.PadFoundation ignores coordinateSystem (Orient result discarded)

2 participants