EgtGeomKernel :
- correzione per split vicini a joint in RuledByIsoParamSet.
This commit is contained in:
+22
-8
@@ -6525,18 +6525,32 @@ SurfBezier::CreateByIsoParamSet( const ICurve* pCurve0, const ICurve* pCurve1, c
|
||||
return false ;
|
||||
}
|
||||
// se ho una corrispondenza tra punti ( e non sono alla fine del tratto) allora non aggiungo split
|
||||
if ( abs( vdParamPos0[c0] - vdParamPos1[c1]) < EPS_PARAM && vdParamPos0[c0] < 1) {
|
||||
++c0 ;
|
||||
++c1 ;
|
||||
++nLastParam0 ;
|
||||
++nLastParam1 ;
|
||||
vPairs.emplace_back( nLastParam0 + nSplit0, nLastParam1 + nSplit1) ;
|
||||
if ( abs( vdParamPos0[c0] - vdParamPos1[c1]) < EPS_SMALL && (vdParamPos0[c0] < 1 || vdParamPos1[c1] < 1)) {
|
||||
if ( (vdParamPos0[c0] < 1 - EPS_SMALL || vdParamPos1[c1] < 1 - EPS_SMALL)) {
|
||||
++c0 ;
|
||||
++c1 ;
|
||||
++nLastParam0 ;
|
||||
++nLastParam1 ;
|
||||
vPairs.emplace_back( nLastParam0 + nSplit0, nLastParam1 + nSplit1) ;
|
||||
}
|
||||
else {
|
||||
if ( vdParamPos0[c0] > 1 - EPS_SMALL && c0 < ssize( vdParamPos0) - 1) {
|
||||
bIntParam0 = true ;
|
||||
dParam0 = round( dParam0) ;
|
||||
}
|
||||
if ( vdParamPos1[c1] > 1 - EPS_SMALL && c1 < ssize( vdParamPos1) - 1) {
|
||||
bIntParam1 = true ;
|
||||
dParam1 = round( dParam1) ;
|
||||
}
|
||||
c0 = ssize( vdParamPos0) - 1 ;
|
||||
c1 = ssize( vdParamPos1) - 1 ;
|
||||
}
|
||||
}
|
||||
// se non ho corrispondenza allora aggiungo uno split sulla curva a cui manca il punto corrispondente
|
||||
else if ( vdParamPos0[c0] < vdParamPos1[c1]) {
|
||||
double dPar ; CrvU1.GetParamAtLength( dLenPrev1 + dLen1 * vdParamPos0[c0], dPar) ;
|
||||
if ( dPar > dLastParam1 + EPS_PARAM) {
|
||||
if ( abs( dPar - round( dPar)) > EPS_PARAM) {
|
||||
if ( abs( dPar - round( dPar)) > EPS_SMALL) {
|
||||
vdSplit1.push_back( dPar) ;
|
||||
nSplit1 = vdSplit1.size() ;
|
||||
}
|
||||
@@ -6554,7 +6568,7 @@ SurfBezier::CreateByIsoParamSet( const ICurve* pCurve0, const ICurve* pCurve1, c
|
||||
double dPar ; CrvU0.GetParamAtLength( dLenPrev0 + dLen0 * vdParamPos1[c1], dPar) ;
|
||||
// se lo split non è in prossimità di una joint già esistente allora lo aggiungo
|
||||
if ( dPar > dLastParam0 + EPS_PARAM) {
|
||||
if ( abs( dPar - round( dPar)) > EPS_PARAM) {
|
||||
if ( abs( dPar - round( dPar)) > EPS_SMALL) {
|
||||
vdSplit0.push_back( dPar) ;
|
||||
nSplit0 = vdSplit0.size() ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user