最初由 lzxlzx 发布
[B]如何求形心????? [/B]
使用:AcDbRegion::createFromCurves 从封闭的POLYLINE创建一个临时的“面域”实体,然后利用:AcDbRegion::getAreaProp

- AcDbRegion::getAreaProp Function virtual Acad::ErrorStatus
- getAreaProp(
- const AcGePoint3d& origin,
- const AcGeVector3d& xAxis,
- const AcGeVector3d& yAxis,
- double& perimeter,
- double& area,
- AcGePoint2d& centroid,
- double momInertia[2],
- double& prodInertia,
- double prinMoments[2],
- AcGeVector2d prinAxes[2],
- double radiiGyration[2],
- AcGePoint2d& extentsLow,
- AcGePoint2d& extentsHigh) const;
- origin Input origin of the region
- xAxis Input X axis of the region
- yAxis Input Y axis of the region
- perimeter Returns perimeter of the region
- area Returns area of the region
- centroid Returns centroid of the region
- momInertia[2] Returns moment of inertia of the region
- prodInertia Returns product of inertia of the region
- prinMoments[2] Returns principal moments of the region
- prinAxes[2] Returns principle axes of the region
- radiiGyration[2] Returns radii of gyration of the region
- extentsLow Returns minimum extents point of the region
- extentsHigh Returns maximum extents point of the region
就可以获得你需要的“型心”。 |