newer 发表于 2014-12-6 22:11:33

转换3DFACE到POLYLINE

Converting 3dface to a polyline

Issue
How do I convert 3dFaces to polylines ?

Solution
There's no mechanism available to do this directly. What you'll need to do is
collect the 3dFace vertex data, and create a polyline using that information.
Since a 3dFace will probably be construced with differing X,Y, and Z coordinates
you can only re-create them as a 3dPolyline. If the face's Z coordinates are on
the same elevation, you could re-create them as a 2d polyline. Here's some lisp
code to demonstrate this:

**** Hidden Message *****

wzg356 发表于 2014-12-6 22:29:46

辛苦了,因为你们有更多的人进步

dnbcgrass 发表于 2014-12-6 22:54:56

回复看看!:lol

Free-Lancer 发表于 2014-12-6 23:21:22

还有更简单的?

(defun c:tt ()
(fy:begin)
(if (ssget '((0 . "3dface")))
    (progn (mapcar '(lambda (x)
                      (vlax-put        (vlax-invoke
                                  (fy:acspace)
                                  'Add3dPoly
                                  (vlax-get x 'Coordinates)
                                )
                                "Closed"
                                :vlax-true
                      )
                  )
                   (fy:cset->objs)
           )
           (vl-cmdf ".erase" "P" "")
    )
)
(princ)
)

牢固 发表于 2014-12-6 23:40:07

代码还应考虑下ucs和捕捉的问题!
(command "3DPOLY" "non" (trans pt1 0 1) "non" (trans pt2 0 1) "non" (trans pt3 0 1))

cre8o 发表于 2014-12-7 06:54:17

xuexi Le

q3_2006 发表于 2014-12-7 07:52:55

看看什么方法....

杜流浪人 发表于 2014-12-7 11:46:12

学习了   

819534890 发表于 2014-12-7 12:22:37

看看学习一下

kwok 发表于 2014-12-7 12:46:35

3d线转pline?

cable2004 发表于 2014-12-8 00:08:28

回复看看!

xingwan2013 发表于 2014-12-25 14:34:28

谢谢分享~~~

cwmfj 发表于 2015-3-24 22:00:53

这东西不错

瀛州流水 发表于 2015-3-25 12:59:02

学习学习学习学习学习学习

zjy2999 发表于 2015-3-26 09:44:47

学习!!!!!!!!!!!!!!!!!!!!!
页: [1] 2 3
查看完整版本: 转换3DFACE到POLYLINE