
ARX function prototype
SPLINE:AcGeNurbCurve3d::hardTrimByParams Function
AcGeNurbCurve3d &
hardTrimByParams(
double newStartParam,
double newEndParam);
newStartParam | Enter new parameters for spline start point |
newEndParam | Enter new parameters for spline end point |
Clipping the spline using new start and end parameters. This is accomplished by adding and removing control points and nodes, rather than resetting the spacing that defines the spline.
Other Curve:AcGeCurve3d::setInterval Function
Adesk::Boolean
setInterval(
const AcGeInterval& intrvl);
Main functions:
(xdge::setpropertyvalue ge "hardTrimByParams" from to)
(xdge::setpropertyvalue ge "setInterval" in)(defun c:tt
(/ e ge p1 p2 pam1 pam2 in typ from to
) e (xdrx_entsel
"\nPick Curve: "
'((0 . "LWPOLYLINE,ARC,LINE,ELLIPSE,CIRCLE,SPLINE"))
)
)
(setq ge
(xdge::constructor
(car e
))) (setq pam1
(xdge::getpropertyvalue
ge
"paramOf"
(xdge::getpropertyvalue ge "closestPointTo" p1)
)
pam2 (xdge::getpropertyvalue
ge
"paramOf"
(xdge::getpropertyvalue ge "closestPointTo" p2)
)
)
)
(if (= typ
"kNurbCurve3d") (xdge::setpropertyvalue ge "hardTrimByParams" from to)
;|
Trims the spline to the new start and end parameters. This is done by adding and removing control points and knots, and is not done by just resetting the interval on which the spline is defined.
|;
)
;;(mapcar 'set '(from to) (vl-sort (list pam1 pam2) '<))
(setq in
(xdge::constructor
"AcGeInterval" pam1 pam2
)) (xdge::setpropertyvalue ge "setInterval" in)
)
)
(setq e
(xdge::entity:make ge
)) (xd::drag:simplemove e "\nInsert Point:" 5 t)
)
(xdge::free)
)
)
=============
The above LISP code uses the XDRX-API, which can be downloaded from
https://github.com/xdcad/XDrx-APIThe XDRX API encapsulates AcDb, AcEd, AcGe, AcBr... C++ library, using C++ methods to develop LISP programs.Thousands of Lisp functions are available.
Modify message