- UID
- 1
- 积分
- 15891
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-1-3
- 最后登录
- 1970-1-1
|
发表于 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 实体了。 |
|