乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 146|回复: 5

请问如何取AcadLWPolyline里的弧段属性?

[复制链接]

1

主题

1

帖子

1

银币

初来乍到

Rank: 1

铜币
5
发表于 2011-1-18 11:44:00 | 显示全部楼层 |阅读模式
在cad输入Pline时,可以开始画线,再输入a 回车,
就可以在连续线内开始画孤,
可是当从程式里取AcadLWPolyline的属性时,
我只有找到坐标阵列,记录每个点,
弧的中心点,半径,在哪一个属性?
请各位告诉我。或是告诉我如何知道AcadLWPolyline里是否有弧段?
谢谢大家。
回复

使用道具 举报

25

主题

219

帖子

6

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
319
发表于 2011-1-20 20:15:00 | 显示全部楼层
Sub Example_GetBulge()
    ' This example creates a lightweight polyline in model space.
    ' It then finds and changes the bulge for a given segment.
   
    Dim plineObj As AcadLWPolyline
    Dim points(0 To 11) As Double
   
    ' Define the 2D polyline points
    points(0) = 1: points(1) = 1
    points(2) = 1: points(3) = 2
    points(4) = 2: points(5) = 2
    points(6) = 3: points(7) = 2
    points(8) = 4: points(9) = 4
    points(10) = 4: points(11) = 1
        
    ' Create a lightweight Polyline object in model space
    Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points)
    ZoomAll
   
    ' Find the bulge of the third segment
    Dim currentBulge As Double
    currentBulge = plineObj.GetBulge(3)
    MsgBox "The bulge for the third segment is " & plineObj.GetBulge(3), , "GetBulge Example"
   
    ' Change the bulge of the third segment
    plineObj.SetBulge 3, -0.5
    plineObj.Update
    MsgBox "The bulge for the third segment is now " & plineObj.GetBulge(3), , "GetBulge Example"
   
End Sub
多看看帮助
  
回复

使用道具 举报

0

主题

2

帖子

1

银币

初来乍到

Rank: 1

铜币
2
发表于 2011-6-8 16:16:00 | 显示全部楼层
这个没有回答上面的问题吧!
回复

使用道具 举报

1

主题

6

帖子

3

银币

初来乍到

Rank: 1

铜币
10
发表于 2015-8-29 10:12:00 | 显示全部楼层
vba没有list的功能,但是可以计算出来。如下:
首先获取该点的凸度,getbulge
如果不为0,继续获取下一点坐标
通过这两点和凸度,就可以出半径,圆心坐标了
回复

使用道具 举报

3

主题

16

帖子

2

银币

初来乍到

Rank: 1

铜币
28
发表于 2015-8-30 18:07:00 | 显示全部楼层
你要的数据只能通过圆弧段的凸度计算出来,凸度是圆心角的1/4正切值,凸度为正时圆弧为逆时针方向,为负时,圆弧为顺时针方向,为0时,该断为直线段.有了圆心角你就可以计算出半径和圆心坐标了!公式自己去查吧!
回复

使用道具 举报

3

主题

16

帖子

2

银币

初来乍到

Rank: 1

铜币
28
发表于 2015-8-30 18:08:00 | 显示全部楼层
哎,四年前的贴子了,我还回复个毛线啊!
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-14 21:17 , Processed in 0.362650 second(s), 64 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表