找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 780|回复: 2

[求助]:请教,知道一个AcGePoint3dArray数组,它的Z都是0.0如何生成AcDbRegion实体?

[复制链接]
发表于 2005-3-18 21:59:30 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
请教,知道一个AcGePoint3dArray数组,它的Z都是0.0如何生成AcDbRegion实体?本人没用过AcDbRegion见笑啦!
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!

已领礼包: 145个

财富等级: 日进斗金

发表于 2005-3-18 22:07:05 | 显示全部楼层

Re: [求助]:请教,知道一个AcGePoint3dArray数组,它的Z都是0.0如何生成AcDbRegion实体?

最初由 yusongrong 发布
[B]请教,知道一个AcGePoint3dArray数组,它的Z都是0.0如何生成AcDbRegion实体?本人没用过AcDbRegion见笑啦! [/B]



你可以使用AcDbRegion类下面的:

[php]
AcDbRegion::createFromCurves Function static Acad::ErrorStatus

createFromCurves(

const AcDbVoidPtrArray& curveSegments,

AcDbVoidPtrArray& regions);

curveSegments Input array of pointers to curve entities used to define the region's perimeter(s)
regions Returns containing pointers to the AcDbRegion objects created

This static member function creates a set of AcDbRegion objects from the closed loops represented by the curves contained in the curveSegments array. The newly created region objects are returned in the regions array.

The curveSegments array must contain only pointers to AcDbLine, AcDbArc, AcDbEllipse, AcDbCircle, AcDbSpline, AcDb3dPolyline, or AcDbPolyline objects.

Note It is the calling application's responsibility to either add the AcDbRegion objects returned in the regions array to an AcDbDatabase or to delete them when they are no longer needed.

Returns Acad::eOk if the function is completely successful.

If there is any problem during the creation of an AcDbRegion from any of the curves in curveSegments, then this function returns Acad::eInvalidInput and the regions array contains pointers to any AcDbRegion objects that were created before the error occurred. So, do not assume that a non-Acad::eOk return status indicates a total failure with no dynamically-allocated AcDbRegion objects returned.

[/php]

由你的AcGePoint3dArray先生成封闭曲线实体,得到AcDbVoidPointArray 数组后,用上面的方法就可以生成AcDbRegion 实体了。
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-3-19 14:43:26 | 显示全部楼层
我想求两个AcGePoint3dArray数组围成的面积的交集,又不想生成AcDbRegion 实体后再求,以免占用资源,请问有什么好的方法?
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-9-22 11:34 , Processed in 0.173235 second(s), 35 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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