Question: brep.AddSurface() doesn't create faces, just stores them in the brep instance?

I observe that when adding surfaces using Rhino.Geometry.Brep.AddSurface() it apparently “just” stores the surface on Brep.Surfaces list, but it has no other impact on breps.Faces list. To actually append a new face, I need to explicitly add them using Brep.Faces.Add()

So, breps AddSurface() “stores” surfaces and nothing more? no “topological” impact… nothing? just store a surface? in such a way that brep.Surfaces contains both surfaces that actually are used by faces and surfaces that are just there without no impact (apart of using memory)?

Just want to understand it correctly.
thanks

Yes, Brep.AddSurface adds a Surface to the Brep.

Notice that BrepFaceList.Add requires either the Surface index or a Surface, the latter removing the need to use Brep.AddSurface:
https://developer.rhino3d.com/api/RhinoCommon/html/Overload_Rhino_Geometry_Collections_BrepFaceList_Add.htm

“Yes” to the three questions in your second paragraph.

1 Like