Different surface types when adding same sweep result brep to document

Hi @dale, I am using the same sweep method in the plugin command and plugin’s RhinoReplaceObjectEventListener but adding the result of the sweep method to the document produces different types of surfaces. On command, the added brep is “open polysurface” but on RhinoReplaceObjectEventListener adding the same brep gives a “surface” type object. Can you help me with that?

Left one is result of command (open polysurface) , Right one is result of listener method (surface).

I have tried SweepOneRail, SweepTwoRail, Brep.CreateFromSweep, Brep.CreateFromSweepSegmented but all results same. I guess this is something related to the fired method type?

Are there any trick to convert “surface” to “open polysurface”? I have tried to duplicate the brep and add that but it didn’t help either.

Hi everyone,

I have fixed the issue by setting “splitKinkySurfaces” variable to true while adding brep to document.

Guid guid = RhinoDoc.ActiveDoc.Objects.AddBrep(brep, new ObjectAttributes {}, null, false, true);

Hi @tahirhan,

Just keep in mind that kinked surface can cause problems down stream. Booleans and mass properties come to mind. Thus, Rhino splits kinked surfaces (by default) when adding Breps to the document.

– Dale

Thanks for the valuable information @dale! I just need those breps for visual so I guess it won’t be a problem in my case.