马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
使用AcGeCircArc2d的set方法
AcGeCircArc2d & set( const AcGeCurve2d& curve1, const AcGeCurve2d& curve2, const AcGeCurve2d& curve3, double& param1, double& param2, double& param3, Adesk::Boolean& success); curve1 | Input any 2D curve | curve2 | Input any 2D curve | curve3 | Input any 2D curve | param1 | Input parameter value on curve1 where arc touches curve | param2 | Input parameter value on curve2 where arc touches curve | param3 | Input parameter value on curve3 where arc touches curve | success | Output to indicate whether the arc was computed successfully | Changes the definition of the arc to be tangent to the three input curves. This function always returns a full circle. If this function returns a value for success that is Adesk::kFalse, then this function has not changed the object.
- (defun c:tt ()
- (while (and
- (setq e1 (xdrx_entsel
- "\n拾取曲线1<退出>:"
- '((0 . "*LINE,ARC,CIRCLE,ELLIPSE"))
- )
- )
- (setq e2 (xdrx_entsel
- "\n拾取曲线2<退出>:"
- '((0 . "*LINE,ARC,CIRCLE,ELLIPSE"))
- )
- )
- (setq e3 (xdrx_entsel
- "\n拾取曲线3<退出>:"
- '((0 . "*LINE,ARC,CIRCLE,ELLIPSE"))
- )
- )
- )
- (if (and
- (setq p1 (cadr e1))
- (setq e1 (car e1))
- (setq p2 (cadr e2))
- (setq e2 (car e2))
- (setq p3 (cadr e3))
- (setq e3 (car e3))
- (setq g1 (xdge::constructor e1)) ;构建曲线1几何对象
- (setq g2 (xdge::constructor e2)) ;构建曲线2几何对象
- (setq g3 (xdge::constructor e3)) ;构建曲线2几何对象
- (setq pa1 (xdge::getpropertyvalue g1 "paramof" p1))
- ;曲线1上拾取点的参数值
- (setq pa2 (xdge::getpropertyvalue g2 "paramof" p2))
- ;曲线2上拾取点的参数值
- (setq pa3 (xdge::getpropertyvalue g3 "paramof" p3))
- ;曲线2上拾取点的参数值
- (setq g-1 (xdge::entity:3d->2d g1));3d几何对象转2d
- (setq g-2 (xdge::entity:3d->2d g2));3d几何对象转2d
- (setq g-3 (xdge::entity:3d->2d g3));3d几何对象转2d
- (setq garc (xdge::constructor "kcircarc2d"))
- ;构建AcGeCircArc2d对象
- (xdge::setpropertyvalue garc "set" g-1 g-2 g-3 pa1 pa2 pa3)
- ;set方法,成功修改garc到公切圆弧
- )
- (progn
- (xdge::entity:make garc) ;生成数据库圆弧实体
- (xdrx_setpropertyvalue (entlast) "color" 2) ;设置颜色2
- )
- )
- (xdge::free g1 g2 g3 g-1 g-2 g-3 garc) ;释放创建的几何对象
- )
- (princ)
- )
|