EgtExchange 2.6j1 :
- in import BTL le feature FreeContour torte ora sono meglio approssimate utilizzando nei calcoli anche le superfici di Bezier.
This commit is contained in:
+18
-6
@@ -37,6 +37,7 @@
|
||||
#include "/EgtDev/Include/EGkExtText.h"
|
||||
#include "/EgtDev/Include/EGkStmFromCurves.h"
|
||||
#include "/EgtDev/Include/EGkStmFromTriangleSoup.h"
|
||||
#include "/EgtDev/Include/EGkSbzFromCurves.h"
|
||||
#include "/EgtDev/Include/EGkSfrCreate.h"
|
||||
#include "/EgtDev/Include/EGkDistLineLine.h"
|
||||
#include "/EgtDev/Include/EGkIntersLinePlane.h"
|
||||
@@ -7673,6 +7674,7 @@ BtlGeom::CreateFreeContours( void)
|
||||
}
|
||||
}
|
||||
// verifico se ci sono torsioni, nel qual caso spezzo opportunamente
|
||||
bool bTwist = false ;
|
||||
if ( ! bTrans && PL.GetPointNbr() == PL2.GetPointNbr()) {
|
||||
// recupero le liste di punti delle due polilinee
|
||||
PNTULIST& lstPU1 = PL.GetUPointList() ;
|
||||
@@ -7687,6 +7689,7 @@ BtlGeom::CreateFreeContours( void)
|
||||
double dDist ;
|
||||
DistLineLine dstDiag( PU1p->first, PU2s->first, PU2p->first, PU1s->first) ;
|
||||
if ( dstDiag.GetDist( dDist) && dDist > FC_TWIST_DIAG_DIST) {
|
||||
bTwist = true ;
|
||||
// inserisco punti medi
|
||||
lstPU1.emplace( PU1s, Media( PU1p->first, PU1s->first), ( PU1p->second + PU1s->second) / 2) ;
|
||||
lstPU2.emplace( PU2s, Media( PU2p->first, PU2s->first), ( PU2p->second + PU2s->second) / 2) ;
|
||||
@@ -7703,13 +7706,22 @@ BtlGeom::CreateFreeContours( void)
|
||||
}
|
||||
}
|
||||
}
|
||||
// creo la superficie rigata corrispondente
|
||||
pStm.Set( CreateSurfTriMesh()) ;
|
||||
if ( IsNull( pStm)) {
|
||||
bOk = false ;
|
||||
continue ;
|
||||
// Creo la superficie rigata corrispondente
|
||||
// Se con torsione e senza svuotatura, tramite bezier
|
||||
if ( bTwist && ! ( bClosed && bPocket)) {
|
||||
PtrOwner<ISurfBezier> pSbz( GetSurfBezierRuled( pCrvCompo, pCrvCompo2, ISurfBezier::RLT_B_ISOPAR)) ;
|
||||
if ( ! IsNull( pSbz))
|
||||
pStm.Set( pSbz->GetApproxSurf( 10 * EPS_SMALL)) ;
|
||||
}
|
||||
if ( pStm->CreateByTwoCurves( PL, PL2, ISurfTriMesh::RLT_ISOPAR_SMOOTH)) {
|
||||
// altrimenti direttamente
|
||||
else {
|
||||
pStm.Set( CreateSurfTriMesh()) ;
|
||||
if ( ! IsNull( pStm)) {
|
||||
if ( ! pStm->CreateByTwoCurves( PL, PL2, ISurfTriMesh::RLT_ISOPAR_SMOOTH))
|
||||
pStm.Reset() ;
|
||||
}
|
||||
}
|
||||
if ( ! IsNull( pStm)) {
|
||||
if ( ( nGroup == 4 && bTwoBottom) || ( nGroup != 4 && ! bTwoBottom))
|
||||
pStm->Invert() ;
|
||||
// se chiusa e con flag di svuotatura
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user