EgtExchange 2.1g1 :
- in import BTL aggiunto flag per sort travi secondo il numero di serie (SINGLEMEMBERNUMBER) - in import BTL aggiunto controllo creazione facce di feature che non siano praticamente insignificanti.
This commit is contained in:
+24
-2
@@ -4260,7 +4260,7 @@ BtlGeom::AddFreeContour( int nGroup, int nProc, int nSide, const string& sDes, i
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
BtlGeom::CreatePolygonInBox( const Point3d& ptP, const Vector3d& vtN, int nSide, Polygon3d& Polyg)
|
||||
BtlGeom::CreatePolygonInBox( const Point3d& ptP, const Vector3d& vtN, int nSide, Polygon3d& Polyg, double dMinDim)
|
||||
{
|
||||
// calcolo il piano
|
||||
Plane3d plPlane ;
|
||||
@@ -4272,7 +4272,29 @@ BtlGeom::CreatePolygonInBox( const Point3d& ptP, const Vector3d& vtN, int nSide,
|
||||
plPlane.ToGlob( frRef) ;
|
||||
}
|
||||
// creo il poligono, limitandolo al box dell'oggetto (trave/parete)
|
||||
return Polyg.FromPlaneTrimmedWithBox( plPlane, ORIG, ORIG + m_vtDim) ;
|
||||
if ( ! Polyg.FromPlaneTrimmedWithBox( plPlane, ORIG, ORIG + m_vtDim))
|
||||
return false ;
|
||||
// verifico che il materiale lasciato non sia inferiore al minimo
|
||||
for ( int nS = BTL_SIDE_FRONT ; nS < BTL_SIDE_LEFT ; ++ nS) {
|
||||
// confronto con ogni faccia del box della trave quasi opposta
|
||||
Plane3d plFace = GetSidePlane( nS) ;
|
||||
if ( plPlane.GetVersN() * plFace.GetVersN() < -0.5) {
|
||||
// cerco minima profondità negativa
|
||||
PNTVECTOR vVert = Polyg.GetVertices() ;
|
||||
double dMinDist = 0 ;
|
||||
for ( const auto& ptV : vVert) {
|
||||
double dDist = DistPointPlane( ptV, plFace) ;
|
||||
if ( dDist < dMinDist)
|
||||
dMinDist = dDist ;
|
||||
}
|
||||
// se profondità non sufficicente, allora elimino la faccia
|
||||
if ( dMinDist > - abs( dMinDim)) {
|
||||
Polyg.Clear() ;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user