Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5834

How to delete a face from a Brep and another question

$
0
0

Simply draw a Brep in Rhino, a cube, and run the following code

 var rhinoObject = doc.Objects.OfType<BrepObject>().FirstOrDefault();
            rhinoObject.BrepGeometry.Faces.RemoveAt(0);
            rhinoObject.BrepGeometry.Compact();
//Why is this line necessary?
            rhinoObject.CommitChanges();
            doc.Views.Redraw();
            return Result.Success;

Why do I need to call CommitChanges for changes to take effect?

Another question

We want to use the Brep.AddEdgeCurve method to dynamically build the model. Where can I use this API?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5834

Latest Images

Trending Articles



Latest Images