EgtExecutor 2.2d2 :

- aggiustamenti vari per IsFlat, FromPlaneTrimmedWithBox e GetSurfTriMeshPlaneInBox
- aggiunta funzione Exe e Lua TrimFlatCurveWithBox.
This commit is contained in:
Dario Sassi
2020-04-13 09:07:32 +00:00
parent 8824491888
commit 54c8818cc5
6 changed files with 148 additions and 8 deletions
+4 -4
View File
@@ -354,7 +354,7 @@ MyCreateSurfTmPlaneInBBox( int nParentId, const Point3d& ptP, const Vector3d& vt
// costruisco il piano nel box
Plane3d plPlane ;
plPlane.Set( ptP, vtN) ;
PtrOwner<ISurfTriMesh> pStm( GetSurfTriMeshPlaneInBox( plPlane, b3Box)) ;
PtrOwner<ISurfTriMesh> pStm( GetSurfTriMeshPlaneInBox( plPlane, b3Box, true, false)) ;
if ( IsNull( pStm))
return GDB_ID_NULL ;
// recupero il riferimento locale del gruppo destinazione
@@ -534,12 +534,12 @@ MyCreateSurfTmConvexHullInBBox( int nParentId, int nId, const BBox3d& b3Box, int
return MyCreateSurfTmPlaneInBBox( nParentId, vTria[nPlane1].GetP( 0), vTria[nPlane1].GetN(), b3Box, nRefType) ;
// altrimenti due piani validi
Polygon3d Polyg1 ;
if ( ! Polyg1.FromPlaneTrimmedWithBox( vTria[nPlane1].GetPlane(), b3Box.GetMin(), b3Box.GetMax()))
if ( ! Polyg1.FromPlaneTrimmedWithBox( vTria[nPlane1].GetPlane(), b3Box.GetMin(), b3Box.GetMax(), true, false))
return GDB_ID_NULL ;
Polygon3d Polyg2 ;
if ( ! Polyg2.FromPlaneTrimmedWithBox( vTria[nPlane2].GetPlane(), b3Box.GetMin(), b3Box.GetMax()))
if ( ! Polyg2.FromPlaneTrimmedWithBox( vTria[nPlane2].GetPlane(), b3Box.GetMin(), b3Box.GetMax(), true, false))
return GDB_ID_NULL ;
if ( ! Polyg1.Trim( Polyg2, true, true) || ! Polyg2.Trim( Polyg1, true, false))
if ( ! Polyg1.Trim( Polyg2, true, true, false) || ! Polyg2.Trim( Polyg1, true, false, false))
return GDB_ID_NULL ;
// creo la trimesh dalle due facce
PtrOwner<ISurfTriMesh> pChStm( CreateSurfTriMesh()) ;