I am attempting to create a BREP/Surface/Mesh using a set of point coordinates inside a list (which I can turn into Rhino.Geometry.Point3d objects and also to Curve objects), that describe irregular polygons (sometimes with holes or ‘Inner Loops’, according to BREP terminology). A sample shape (EDIT: a planar surface with six inner loops and one outer loop) is attached as .3dm here:
sample.3dm (54.4 KB)
and it looks like this:
Previously, I was using CreateFromCornerPoints (which I understand creates one BREP face) to make quadrilaterals.
However, based on what I’ve seen in the Developer methods and also on the forum, creating a BREP from scratch using scripting appears to be very difficult. How then do I best go about creating BREP/Surface from scratch using a set of Point3d/Curve objects in Python and Rhinocommon? Are there workarounds to direct BREP construction? If you could provide me with links to similar discussions (which I may have missed) or with a simple example for an irregular polygon with one inner loop as Rhino Geometry (so that they can first be previewed using Grasshopper, and are not added to the Rhino document right away), then I can take it from there.
The output would need to be a Surface (trimmed in this case), and it would need to be able to handle any number of sides and Inner Loops. I understand that after the main BREP face is made, then one ‘trims’ it with the BREP faces that serve as ‘holes’.
TLDR; I want to recreate a shape like the one above as a BREP/Surface, but the only data I have about that shape are its coordinates (Point3d objects), normal, u and v vectors. How do I do it in Python with the output being Rhino.Geometry (not GUIDs) in the least painful way?