-
Notifications
You must be signed in to change notification settings - Fork 113
Rhino brep #1106
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
Merged
Merged
Rhino brep #1106
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
87df71e
added frame_to_rhino_plane
chenkasirer e30b33d
Merge branch 'bugfix/nurbs_point_count' of https://github.com/compas-…
chenkasirer b733589
added RhinoSurface.from_frame
chenkasirer 1f0816a
WIP: builder serialization
chenkasirer 88c27ce
remove reconstruction logic from RhinoBrep
chenkasirer e2d7897
added trim interface. second level import for builders
chenkasirer 83c38d6
docstrings and missing properties
chenkasirer 164b11d
added docstrings
chenkasirer 3f193fb
2nd level import for BrepTrim.
chenkasirer f1f5214
formatting
chenkasirer a1673b7
updated changelog
chenkasirer 6cf4343
added trims property to Brep
chenkasirer d8aa744
capitalized "enum" members
chenkasirer 63fb80c
renamed builder attributes to make more sense
chenkasirer 1798393
fixed typo in changelog
chenkasirer b48b9f1
simplified call to RhinoNurbsSurface.from_frame
chenkasirer 115cd01
Merge branch 'main' of https://github.com/compas-dev/compas into rhin…
chenkasirer 8b11fba
added missing type in docstring
chenkasirer dcc89c5
changed signature of RhionNurbsSurface.from_frame
chenkasirer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| from compas.data import Data | ||
|
|
||
|
|
||
| class BrepTrimIsoStatus(object): | ||
| """An enumeration of isoparametric curve direction on the surface.""" | ||
|
|
||
| NONE = 0 | ||
| X = 1 | ||
| Y = 2 | ||
| WEST = 3 | ||
| SOUTH = 4 | ||
| EAST = 5 | ||
| NORTH = 6 | ||
|
|
||
|
|
||
| class BrepTrim(Data): | ||
| """An interface for a Brep Trim | ||
|
|
||
| Attributes | ||
| ---------- | ||
| curve : :class:`~compas.geometry.NurbsCurve`, read_only | ||
| Returns the geometry for this trim as a 2d curve. | ||
| iso_status : literal(NONE|X|Y|WEST|SOUTH|EAST|NORTH) | ||
| The isoparametric curve direction on the surface. | ||
| is_reversed : bool | ||
| True if this trim is reversed from its associated edge curve and False otherwise. | ||
|
|
||
| """ | ||
|
|
||
| @property | ||
| def curve(self): | ||
| raise NotImplementedError | ||
|
|
||
| @property | ||
| def iso_status(self): | ||
| raise NotImplementedError | ||
|
|
||
| @property | ||
| def is_reversed(self): | ||
| raise NotImplementedError |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
would it not make more sense to add stuff to the builder rather than to modify the signature of all the constructors to send the builder around?
Uh oh!
There was an error while loading. Please reload this page.
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.
The builder serves:
Brep) available to each of the components while avoiding global stateRhino.Geometrytype immediately after de-serialization.BrepBuilderis the main context, it essentially wraps around the newly createdRhino.Geometry.Brepand holds it until it's properly built.Since Face, Loop and Trim are nested in each other:
BrepFaceBuilderwraps aroundRhino.Geometry.BrepFaceand handed over to the loops so that they can add themselves to the face.BrepLoopBuilderwraps aroundRhino.Geometry.BrepLoopand handed over to the trims so that they can add themselves to the loop.The
resultproperty of the builders gives access to the newly built native element once it's ready.BrepLoopBuilder.resultreturns theRhino.Geometry.BrepLoopafter all the trims have been added to it.BrepFaceBuilder.resultreturns theRhino.Geometry.BrepFaceafter all the loops have been added to it.BrepBuilder.resultreturns theRhino.Geometry.Brepafter all the vertices, edges and faces have been added to it.