@catalin wrote:
Hello, I try to use the CreateFromBox method and I cant get breps by doing that. This is part my code:
Dim bbox = brep.GetBoundingBox(True) Dim corner = bbox.GetCorners() For i = dt To corner(4).Z Step dt For j = 0 To 3 Step 1 cor(j) = corner(j).Z + dt1 Dim bb As New Rhino.Geometry.BoundingBox(corner(0).X, corner(0).Y, corner(0).Z, corner(j).X, corner(j).Y, cor(j)) Dim b As New Geometry.Box(bb) Dim bbrep = Geometry.Brep.CreateFromBox(b) RhinoApp.WriteLine(bbrep.ToString) Dim inters As Brep() = Brep.CreateBooleanIntersection(brep, bbrep, 1) Next dt1 = dt1 + dt Next
I get this error: “Value cannot be null.” from Dim inters As Brep() = Brep.CreateBooleanIntersection(brep, bbrep, 1). And RhinoApp.WriteLine(bbrep.ToString) give me “Object reference not set to an instance of an object.”
Can someone tell me how to solve this problem please?
Thanks.
Posts: 11
Participants: 3