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

Profiles with Thickened Edges #1020

Merged
merged 11 commits into from
Sep 12, 2023
Merged

Profiles with Thickened Edges #1020

merged 11 commits into from
Sep 12, 2023

Conversation

andrewheumann
Copy link
Member

@andrewheumann andrewheumann commented Sep 7, 2023

BACKGROUND:

  • in Thickened polylines #1013, we introduced the ThickenedPolyline class.
  • To continue our support for "edges with thickness," we want to add optional edge thickness data to a profile, which can be used to compute offset geometry for that profile.

DESCRIPTION:

  • Introduces an optional Profile.EdgeThickness property
  • Introduces three new methods for computing geometry using edge thickness:
    • Profile.ThickenedInteriorProfile
    • Profile.ThickenedExteriorProfile
    • Profile.ThickenedEdgePolygons

TESTING:

REQUIRED:

  • All changes are up to date in CHANGELOG.md.

This change is Reviewable

Copy link
Contributor

@katehryhorenko katehryhorenko left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 change requests, 0 of 1 approvals obtained (waiting on @andrewheumann)


Elements/src/Geometry/Profile.cs line 146 at r1 (raw file):

        public Profile Transformed(Transform transform)
        {
            return new Profile(this.Perimeter.TransformedPolygon(transform), this.Voids?.Select(v => v.TransformedPolygon(transform)).ToList() ?? new List<Polygon>(), this._edgeThickness, this.Name);

This method will create a Profile with id = "0000 -00..." I'm not sure if it's ok


Elements/src/Geometry/ThickenedPolyline.cs line 355 at r1 (raw file):

        /// polygonal boundary taking into account those thickness offsets.
        /// </summary>
        /// <param name="vertices">An ordered list of vertices representing a closed polygon</param>

polygon . <- at the end of the comment

Copy link
Member Author

@andrewheumann andrewheumann left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 change requests, 0 of 1 approvals obtained (waiting on @katehryhorenko)


Elements/src/Geometry/Profile.cs line 146 at r1 (raw file):

Previously, katehryhorenko (Kateryna Hryhorenko) wrote…

This method will create a Profile with id = "0000 -00..." I'm not sure if it's ok

the base class Element constructor always makes sure the Id is valid. I wrote a throwaway test to confirm that Profile.Transformed always gives back a profile with a new Id.


Elements/src/Geometry/ThickenedPolyline.cs line 355 at r1 (raw file):

Previously, katehryhorenko (Kateryna Hryhorenko) wrote…

polygon . <- at the end of the comment

Done.

Copy link
Contributor

@katehryhorenko katehryhorenko left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 4 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained

@andrewheumann andrewheumann merged commit 520711b into master Sep 12, 2023
2 checks passed
@andrewheumann andrewheumann deleted the thickened-profiles branch September 12, 2023 22:57
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.

None yet

2 participants