The below one is solid brep, after using “rg.CreateSolid” or “rg.MergeBreps” or “rg.JoinBreps” in GHPython
In in the middle is surface in GH, after explode the brep.
The top one is the solid brep after bake into Rhino.
Why the below one’s side face divide into 3 part? Is there any way to let it display flat?
I think this is due to the use of Point3d.Unset for the start and end points. I do not think that it’s possible to use no start point and no end point in this case, because there are only two curves to loft.
If I change rg.Point3d.Unset, rg.Point3d.Unset
to rs.CurveStartPoint(crv1), rs.CurveStartPoint(crv2),
the problem goes away. Does it help?
Also, incidentally, may I ask if you are seeing the background shadow as moved as in the screenshot above?
What is your setup?
Thanks
Giulio
–
Giulio Piacentino
for Robert McNeel & Associates giulio@mcneel.com
Thanks Giulio Piacentino! That solved the display problem.
Yes, the background shadow is moved. There is about static 120 pix shift with ghpy edit window. It’s 2560*1440 display resolution in Win10 64.
Sorry Giulio, the display problem solved but the geometry can’t bake right into Rhino.
I tried several code but still can’t figure out where is the problem.
Your Brep draws odd because it contains kinked surfaces. Recall you lofted a Brep from two polyline curves. The solution is to split kinky surfaces. For example:
import rhinoscriptsyntax as rs
import Rhino.Geometry as rg
import scriptcontext as sc
crv1 = rs.coercecurve(x)
crv2 = crv1.Duplicate()
crv2.Translate(0.0, 0.0, 10.0)
brep = rg.Brep.CreateFromLoft([crv1, crv2], rg.Point3d.Unset, rg.Point3d.Unset, rg.LoftType.Normal, False)[0]
if brep:
brep.Faces.SplitKinkyFaces()
brep = brep.CapPlanarHoles(sc.doc.ModelAbsoluteTolerance)
if brep:
if brep.SolidOrientation == rg.BrepSolidOrientation.Inward:
brep.Flip()
a = brep