明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1533|回复: 3

[求助]3dface

[复制链接]
发表于 2004-3-24 20:02:00 | 显示全部楼层 |阅读模式
谁有办法降3dface转换为pline
发表于 2004-3-24 21:35:00 | 显示全部楼层
Sub main()
Dim Sel As AcadSelectionSet
Do While ThisDrawing.SelectionSets.Count <> 0
ThisDrawing.SelectionSets.Item(0).Delete
Loop
Set Sel = ThisDrawing.SelectionSets.Add("3DFace")
Sel.SelectOnScreen Dim Obj As AcadObject, My3DFace As Acad3DFace, Poins
For Each Obj In Sel
If TypeName(Obj) = "IAcad3DFace" Then
Set My3DFace = Obj
Poins = My3DFace.Coordinates
ReDim Preserve Poins(UBound(Poins) + 3)
Poins(UBound(Poins) - 2) = Poins(0)
Poins(UBound(Poins) - 1) = Poins(1)
Poins(UBound(Poins)) = Poins(2)
ThisDrawing.ModelSpace.AddPolyline Poins
Obj.Delete
End If
Next
End Sub
发表于 2004-3-24 21:36:00 | 显示全部楼层
用SendCommand方法来炸开,然后再把线组合成Pline
发表于 2004-3-24 22:26:00 | 显示全部楼层
3楼的方法在速度上会更快一些。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2025-2-23 04:37 , Processed in 0.206411 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表