Trims a surface or polysurface using an oriented cutter. The cutter can be a surface, a polysurface, or a plane.
The parts of the target surface or polysurface that lie to inside (opposite the normal) of the cutter are retained, while the parts to the outside (in the direction of the normal ) are discarded. If the cutter is a closed surface or polysurface, or is s plane, then a connected component of the target surface or polysurface that does not intersect the cutter is kept if and only if it is contained in the inside of cutter. That is the region bounded by the cutter opposite from the normal of the cutter, or in the case of a plane cutter the half-space opposite from the plan normal. If the cutter is not closed all these components are kept.
Rhino.TrimBrep (strObject, strCutter, dblTolerance)
Rhino.TrimBrep (strObject, arrPlane, dblTolerance)
strObject |
Required. String. The identifier of the surface or polysurface object to trim. |
strCutter |
Required. String. The identifier of the cutting surface or polysurface object. |
arrPlane |
Required. Array. The cutting plane. |
dblTolerance |
Optional. Number. The trimming tolerance. If omitted, the document's absolute tolerance is used. |
Array |
The identifiers of the retained components if successful. The identifier of the first element in the array will match the identifier of the target surface or polysurface. |
Null |
If not successful, or on error. |
Dim strObject, strCutter
strObject = Rhino.GetObject("Select surface or polysurface to trim", 8 + 16)
If Not IsNull(strObject) Then
strCutter = Rhino.GetObject("Select cutting surface or polysurface", 8 + 16)
If Not IsNull(strCutter) Then
Rhino.TrimBrep strObject, strCutter
End If
End If