User strings lost

(Karol Wierzbicki) #1


I met a problem with splitting brep. I need to split it with Curve, but I can’t split brep this way directly. i trird to use BrepFace.Split(Curve), but I am losing user strings this way. Is there a way to split a Brep with use of curve without loosing stirngs?

How I do it in c#:
var splitBrepFace = face.Split(curve, tolerance);

(Dale Fugier) #2

Hi @karol_wierzbick,

BrepFace.Split only splits a single face in a Brep. It does not split the entire Brep into one or more Brep pieces. For an example, run the SplitFace command.

The Rhino SDK does not have a function that splits a Brep with a cutting curve. To do this, you’ll will need to make a surface from the curve and then use Brep.Split.

If you have user text on the target Brep, then you might consider harvesting it before performing the splitting. Sometimes, user data attached to geometry does not survive traumatic operations such as splitting. In these cases it is better to attach user data to an object’s attributes (instead).

– Dale