@spb wrote:
AddSurface.3dm (18.1 KB) contains an invalid 1-face brep.
_Untrim will convert it into a valid 1-face brep of the underlying surface.
If the same is attempted via RhinoCommon, such as by using the code below, a 3-face brep is created.
Should a polysurface ever be created by scriptcontext.doc.Objects.AddSurface()?
import rhinoscriptsyntax as rs import scriptcontext as sc def main(): idBrep = rs.GetObject("Select surface", rs.filter.surface, preselect=True) if idBrep is None: return rgFace = rs.coercesurface(idBrep) print rgFace.IsValid rgSrf = rgFace.UnderlyingSurface() print rgSrf.IsValid sc.doc.Objects.AddSurface(rgSrf) sc.doc.Views.Redraw() if __name__ == '__main__': main()
Thank you,
Steve
Posts: 5
Participants: 2