马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
ARX函数原型
AcGeNurbCurve3d::hardTrimByParams Function AcGeNurbCurve3d & hardTrimByParams( double newStartParam, double newEndParam); 使用新的起点和终点参数裁剪样条曲线。这通过添加和删除控制点和节点,而不是重设定义样条曲线的间距来实现。
AcGeCurve3d::setInterval Function Adesk::Boolean setInterval(
const AcGeInterval& intrvl);
主要函数: (xdge::setpropertyvalue ge "hardTrimByParams" from to) (xdge::setpropertyvalue ge "setInterval" in)
 - (defun c:tt (/ e ge p1 p2 pam1 pam2 in typ from to)
- (if
- (and (setq
- e (xdrx_entsel
- "\nPick Curve: "
- '((0 . "LWPOLYLINE,ARC,LINE,ELLIPSE,CIRCLE,SPLINE"))
- )
- )
- (setq ge (xdge::constructor (car e)))
- (setq p1 (cadr e))
- (setq p2 (getpoint p1 "\nSecond Point: "))
- (setq pam1 (xdge::getpropertyvalue
- ge
- "paramOf"
- (xdge::getpropertyvalue ge "closestPointTo" p1)
- )
- pam2 (xdge::getpropertyvalue
- ge
- "paramOf"
- (xdge::getpropertyvalue ge "closestPointTo" p2)
- )
- )
- (setq typ (xdge::type ge))
- )
- (progn
- (if (= typ "kNurbCurve3d")
- (progn
- (mapcar 'set '(from to) (vl-sort (list pam1 pam2) '<))
- (xdge::setpropertyvalue ge "hardTrimByParams" from to)
- (xdge::entity:make ge)
- (xdrx_entity_setcolor (entlast) 1)
- )
- (progn
- ;;(mapcar 'set '(from to) (vl-sort (list pam1 pam2) '<))
- (setq in (xdge::constructor "AcGeInterval" pam1 pam2))
- (xdge::setpropertyvalue ge "setInterval" in)
- (xdge::entity:make ge)
- (xdrx_entity_setcolor (entlast) 1)
- )
- )
- (vl-cmdf ".move" "l" "" p1)
- )
- (xdge::free)
- )
- (princ)
- )
|