mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
0030100: Modeling Algorithms - ShapeUpgrade_UnifySameDomain is unable to unify faces based on the same toroidal surface
When performing intersection of toroidal faces check first if they are based on the same surface. Test cases for the issue.
This commit is contained in:
@@ -2473,33 +2473,32 @@ void IntAna_QuadQuadGeo::Perform(const gp_Torus& Tor1,
|
||||
aRMaj1 = Tor1.MajorRadius();
|
||||
aRMin2 = Tor2.MinorRadius();
|
||||
aRMaj2 = Tor2.MajorRadius();
|
||||
if (aRMin1 >= aRMaj1 || aRMin2 >= aRMaj2) {
|
||||
typeres = IntAna_NoGeometricSolution;
|
||||
return;
|
||||
}
|
||||
//
|
||||
const gp_Ax1 anAx1 = Tor1.Axis();
|
||||
const gp_Ax1 anAx2 = Tor2.Axis();
|
||||
const gp_Ax1& anAx1 = Tor1.Axis();
|
||||
const gp_Ax1& anAx2 = Tor2.Axis();
|
||||
//
|
||||
const gp_Pnt& aLoc1 = anAx1.Location();
|
||||
const gp_Pnt& aLoc2 = anAx2.Location();
|
||||
//
|
||||
gp_Lin aL1(anAx1);
|
||||
if (!anAx1.IsParallel(anAx2, myEPSILON_AXES_PARA) ||
|
||||
(aL1.Distance(anAx2.Location()) > myEPSILON_DISTANCE)) {
|
||||
(aL1.Distance(aLoc2) > myEPSILON_DISTANCE)) {
|
||||
typeres = IntAna_NoGeometricSolution;
|
||||
return;
|
||||
}
|
||||
//
|
||||
gp_Pnt aLoc1, aLoc2;
|
||||
//
|
||||
aLoc1 = anAx1.Location();
|
||||
aLoc2 = anAx2.Location();
|
||||
//
|
||||
if (aLoc1.IsEqual(aLoc2, Tol) &&
|
||||
(Abs(aRMin1 - aRMin2) <= Tol) &&
|
||||
(Abs(aRMin1 - aRMin2) <= Tol) &&
|
||||
(Abs(aRMaj1 - aRMaj2) <= Tol)) {
|
||||
typeres = IntAna_Same;
|
||||
return;
|
||||
}
|
||||
//
|
||||
if (aRMin1 >= aRMaj1 || aRMin2 >= aRMaj2) {
|
||||
typeres = IntAna_NoGeometricSolution;
|
||||
return;
|
||||
}
|
||||
//
|
||||
Standard_Real aDist;
|
||||
gp_Pnt aP1, aP2;
|
||||
//
|
||||
|
Reference in New Issue
Block a user