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:
Dario Sassi
2019-11-11 07:30:29 +00:00
parent 48ca1d7856
commit f031160066
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -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