Conversation
|
@chenkasirer do I ping someone for a review here? should I just be patient? |
|
|
||
| Returns | ||
| ------- | ||
| list of :class:`~compas_rhino.geometry.RhinoBrep` |
There was a problem hiding this comment.
I get that CreatePlanarBreps returns a list of Breps but I imagined this function creating a solid from the outline of multiple faces of the (eventually) same brep. I'm also wondering because of the original docstring specifies a single Brep as the return type. There's currently no OCC implementation so nothing to compare to, but I'm simply not sure what's the intention here.
Could you maybe provide a use-case for this method that illustrates what we should be able to make with it?
There was a problem hiding this comment.
I get that
CreatePlanarBrepsreturns a list of Breps but I imagined this function creating a solid from the outline of multiple faces of the (eventually) same brep.
this is the general use case. however if not all of the faces are joinable, how do you decide which ones to get rid of?
I'm also wondering because of the original docstring specifies a single Brep as the return type. There's currently no OCC implementation so nothing to compare to, but I'm simply not sure what's the intention here.
I can either update the docstring to return a list of Breps, or I can return None if the faces don't join into one single Brep. I would typically go for the former and have the user decide if they only accept one single Brep or if they use multiple Breps.
Could you maybe provide a use-case for this method that illustrates what we should be able to make with it?
I was developing this to build a brep of a timber plate in the way that the compas_model.Plate._compute_geometry() does it, that is by building faces from polyline points. That type builds a mesh from vertices and I want to build a Brep, obviously. sample code looks like this:
for i in range(len(self.outline_a)-1):
a = self.outline_a.points[i]
b = self.outline_a.points[i+1]
c = self.outline_b.points[i+1]
d = self.outline_b.points[i]
curves.append(NurbsCurve.from_points([a, b, c, d, a], degree=1))
plate_geo = Brep.from_curves(curves)
if len(plate_geo) != 1:
raise ValueError("The curves could not be joined into a single Brep.")
else:
plate_geo = plate_geo[0]
solves #1451
This adds implementation for
Brep.from_curvesfor rhino.What type of change is this?
Checklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.CHANGELOG.mdfile in theUnreleasedsection under the most fitting heading (e.g.Added,Changed,Removed).invoke test).invoke lint).compas.datastructures.Mesh.