EgtGeomKernel :
- a Polygon3d aggiunta GetCentroid - modificata PolygonPlane per gestire correttamente i triangoli dando solo i tre vertici senza ripeterne uno.
This commit is contained in:
@@ -210,6 +210,18 @@ Polygon3d::GetPolyLine( void) const
|
||||
return PL ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
Point3d
|
||||
Polygon3d::GetCentroid( void) const
|
||||
{
|
||||
PolygonPlane PolyPlane ;
|
||||
for ( const auto& ptP : m_vVert)
|
||||
PolyPlane.AddPoint( ptP) ;
|
||||
Point3d ptCen ;
|
||||
PolyPlane.GetCentroid( ptCen) ;
|
||||
return ptCen ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
double
|
||||
Polygon3d::GetPerimeter( void) const
|
||||
|
||||
Reference in New Issue
Block a user