|
(defun subSEG (ent pt / pam pam1 p1 p2 dis dis1 pv) (setq pt (vlax-curve-getclosestpointto ent pt) pam (fix (vlax-curve-getparamatpoint ent pt)) pam1 (1+ pam) dis (- (vlax-curve-getdistatparam ent pam1) (vlax-curve-getdistatparam ent pam) ) p1 (vlax-curve-getpointatparam ent pam) p2 (vlax-curve-getpointatparam ent pam1) dis1 (distance p1 p2) ) (if (equal dis1 dis) (list '(0 . "LINE") (cons "LEN" dis) (cons "STP" p1) (cons "ENP" p2) ) (list '(0 . "ARC") (cons "LEN" dis) (cons "STP" p1) (cons "ENP" p2) (cons "CEN" (polar pt (angle (setq pv (vlax-curve-getsecondderiv ent (vlax-curve-getparamatpoint ent pt) ) ) '(0. 0.) ) (distance pv '(0. 0.)) ) ) ) ) )
|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )
GMT+8, 2024-5-14 16:28 , Processed in 0.244915 second(s), 23 queries , Gzip On.
Powered by Discuz! X3.5
© 2001-2024 Discuz! Team.