From 488bdd3ca29b97de95a802f7c9ed160f781ce71d Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 13 Jul 2026 17:49:55 +0200 Subject: [PATCH] EgtGeomKernel : - correzione a calcolo Silhouette di Trimesh (versioni dirette dai triangoli). --- SurfTriMesh.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SurfTriMesh.cpp b/SurfTriMesh.cpp index cb7f6c0..4507228 100644 --- a/SurfTriMesh.cpp +++ b/SurfTriMesh.cpp @@ -1183,7 +1183,7 @@ SurfTriMesh::GetSilhouette( const Vector3d& vtDir, double dTol, POLYLINEVECTOR& ( ! bAllTria && Tria.GetN() * vtVers > EPS_ZERO)) && Tria.Scale( frOCS, 1, 1, 0) && Tria.GetSqMinHeight() > SQ_EPS_SMALL) { PtrOwner pSfrTria( GetBasicSurfFlatRegion( GetSurfFlatRegionFromTriangle( Tria))) ; - if ( ! IsNull( pSfrTria)) { + if ( ! IsNull( pSfrTria) && pSfrTria->IsValid()) { if ( bAllTria && Tria.GetN() * vtVers < 0) pSfrTria->Invert() ; pSfrTria->Offset( dTol, ICurve::OFF_FILLET) ; @@ -1261,7 +1261,7 @@ SurfTriMesh::GetSilhouette( const Plane3d& plPlane, double dTol, POLYLINEVECTOR& // lo proietto sul piano e creo la regione if ( pgTria.Scale( frOCS, 1, 1, 0)) { PtrOwner pSfrTria( GetBasicSurfFlatRegion( GetSurfFlatRegionFromPolyLine( pgTria.GetPolyLine()))) ; - if ( ! IsNull( pSfrTria)) { + if ( ! IsNull( pSfrTria) && pSfrTria->IsValid()) { if ( bAllTria && Tria.GetN() * vtVers < 0) pSfrTria->Invert() ; pSfrTria->Offset( dTol, ICurve::OFF_FILLET) ;