Overview | Statement List | Example


使用边界对象修剪曲线

Synopsis

obj = CRVTRM/curve,REF, {pt1|x,y,z},FIRST,limit1[,REF,{pt1|x,y,z}] [,INT,{pt2|x,y,z}][,NOTRIM][,SECOND,limit2 [,REF,{pt1|x,y,z}][,INT,{pt2|x,y,z}][,NOTRIM]] ,STATUS,status[,IFERR, label:]

Description

Allows you to trim an existing curve using one or two bounding objects such as points, curves, and faces.

NOTE: A null object (&NULENT) is returned unless the curve is trimmed into two segments. If you remove the center part of a curve and allow the two ends of the curve to remain, then one end retains the original object identifier and the other end receives an object identifier which is returned by the CRVTRM command.

Parameters

Parameter

Description

curve

An existing curve to be trimmed.

REF

Minor word indicating that a reference point follows. That reference point can either be a point object, or three coordinates. The segment of the curve that is closest to the reference point is trimmed when you have a single bounding curve. When you have two bounding curves there are two cases that can occur: the reference point is inside the bounding curves or outside the bounding curves. In Figure below, the two straight lines are the bounding curves and the arc is the curve to trim. The "plus" signs indicate the reference points. When the reference point is outside the bounding curve, all segments outside the bounding curves are trimmed. When the reference point is inside the bounding curves, all segments inside the bounding curves are trimmed.

CRVTRM with Two Bounding Curves

pt1

An existing reference point object that defines what section of the curve is removed or extended.

x,y,z

Coordinates specifying a reference point if an existing point is not used.

FIRST

Required minor word indicating that the first bounding object follows.

limit1

Specifies the first boundary object.

REF

Minor word indicating that a reference point follows. That reference point can either be a point object, or three coordinates.

pt1

An existing reference point object that defines what end of the curve is removed.

x,y,z

Coordinates specifying a reference point if an existing point is not used.

INT

Optional minor word indicating that a reference point for the intersection between the curve and the bounding object follows. The reference point is used when multiple intersections exist. That reference point can either be a point object or three coordinates.

pt2

An existing reference point object for the intersection between the curve and the bounding object.

x,y,z

Coordinates specifying a reference point if an existing point is not used.

NOTRIM

Optional minor word indicating not to trim the associated bounding object. If the bounding object is not a curve (i.e. a point or face), then no trim is performed whether NOTRIM is used or not.

SECOND

Optional minor word indicating that the second bounding object follows.

limit2

Specifies the second boundary object.

REF

Minor word indicating that a reference point follows. That reference point can either be a point object, or three coordinates.

pt1

An existing reference point object that defines what end of the curve is removed.

x,y,z

Coordinates specifying a reference point if an existing point is not used.

INT

Optional minor word indicating that a reference point for the intersection between the curve and the bounding object follows. The reference point is used when multiple intersections exist. That reference point can either be a point object or three coordinates.

pt2

An existing reference point object for the intersection between the curve and the bounding object.

x,y,z

Coordinates specifying a reference point if an existing point is not used.

NOTRIM

Optional minor word indicating not to trim the associated bounding object. If the bounding object is not a curve (i.e. a point or face), then no trim is performed whether NOTRIM is used or not.

STATUS

Required minor word indicating a trim status value follows.

status

Required variable which indicates the trim status value as follows:

-5 = invalid boundary object
-4 = invalid trim object
-3 = can't find intersection between bound obj 2 and curve to trim.
-2 = can't find intersection between bound obj 1 and curve to trim.
-1 = unable to allocate enough memory
0 = unable to perform trim
1 = only curve to trim was trimmed
2 = curve to trim and limiting object 1 were trimmed.
3 = curve to trim, limiting obj 1 and limiting obj 2 were trimmed.
4 = curve to trim and limiting obj 2 were trimmed.

IFERR,label:

Specifies a label to which program execution jumps if an error occurs during trim. This is optional.

See Also

The CTRIM statement allows you to trim a curve by a specified arclength.

Results of CRVTRM Example


Copyright ©2015 胡君NX二次开发官网(www.UGapi.com) QQ:85585969 All Rights Reserved.