-
Notifications
You must be signed in to change notification settings - Fork 38
ICurve implemented #389
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
ICurve implemented #389
Conversation
Thank you @NishantC5! Great work. I have some comments. I think it's fine to have ICurve implemented by all curve-like geometries, but it doesn't seem logical for Plane or Surface to implement ICurve. The other classes can implement ITransformable on their own. Alternatively, we can define an IGeometry interface that implements IEquatable and ITransformable and is itself implemented by all geometric objects in the library. @sonomirco, @cesarecaoduro any thoughts? |
All reactions
Sorry, something went wrong.
I recon having an IGeometry will make more sense. Similar to BHoM, we can also implement a deeper level like IObject that is the atomic interface for everything.
Sent from Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Guido Maciocci ***@***.***>
Sent: Thursday, December 29, 2022 8:08:04 AM
To: GSharker/G-Shark ***@***.***>
Cc: Cesare Caoduro ***@***.***>; Mention ***@***.***>
Subject: Re: [GSharker/G-Shark] ICurve implemented (PR #389)
Thank you @NishantC5<https://github.com/NishantC5>! Great work.
I have some comments. I think it's fine to have ICurve implemented by all curve-like geometries, but it doesn't seem logical for Plane or Surface to implement ICurve.
The other classes can implement ITransformable on their own.
Alternatively, we can define an IGeometry interface that implements IEquatable and ITransformable and is itself implemented by all geometric objects in the library.
@sonomirco<https://github.com/sonomirco>, @cesarecaoduro<https://github.com/cesarecaoduro> any thoughts?
—
Reply to this email directly, view it on GitHub<#389 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGJG6A23M6BGSIGSM57L3R3WPST3JANCNFSM6AAAAAATLRF6D4>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
All reactions
Sorry, something went wrong.
Thanks, @NishantC5, for the work! |
All reactions
Sorry, something went wrong.
@@ -853,5 +854,11 @@ public override int GetHashCode() | |||
|
|||
return sBldr.ToString().GetHashCode(); | |||
} | |||
|
|||
public NurbsBase Transform(TransformMatrix t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NishantC5, Could you please document this function? Thanks.
Sorry, something went wrong.
All reactions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes sure, I'll get back with the documented code in the next commit.
Sorry, something went wrong.
All reactions
Ah yes! It doesn't make sense for plane and surface to implement ICurve! As per the above discussion, I will introduce IGeometry which implements IEquatable and ITransformable and this would be implemented by all the geometry objects. Thanks for the feedback @d3ssy @cesarecaoduro and @sonomirco. |
All reactions
-
👍 1 reaction
Sorry, something went wrong.
@NishantC5 can we merge this PR? |
All reactions
Sorry, something went wrong.
@sonomirco yes. |
All reactions
Sorry, something went wrong.
sonomirco
Successfully merging this pull request may close these issues.
Transform a group of curves.
What type of PR is this? (check all applicable)
Description
This PR introduces ICurve interface in order to implement Transform function in NurbsBase. With these changes, one can
make a
List<NurbsBase> geometries
which can contain any transformable geometry andgeometries.Select(c => c.Transform(xForm)).ToList()
would execute theTrasnform
function of each respective geometry.Related Tickets & Documents
Closes #383
Added tests?
Added to documentation?