1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0025104: Prism from BSpline curve can not be chamfered

Protection from zero-length vectors has been added.
This commit is contained in:
aml 2017-11-02 12:08:18 +03:00 committed by bugmaster
parent f16a6cc5aa
commit 90f0fdad2a
5 changed files with 16 additions and 14 deletions

View File

@ -1436,7 +1436,8 @@ void IntCurveSurface_ComputeTransitions(const TheCurve& curve,
NSurf = D1U.Crossed(D1V); NSurf = D1U.Crossed(D1V);
TheCurveTool::D1(curve,w,Psurf,D1U); TheCurveTool::D1(curve,w,Psurf,D1U);
Standard_Real Norm = NSurf.Magnitude(); Standard_Real Norm = NSurf.Magnitude();
if(Norm>TOLERANCE_ANGULAIRE) { if(Norm>TOLERANCE_ANGULAIRE &&
D1U.SquareMagnitude() > TOLERANCE_ANGULAIRE) {
D1U.Normalize(); D1U.Normalize();
CosDir = NSurf.Dot(D1U); CosDir = NSurf.Dot(D1U);
CosDir/=Norm; CosDir/=Norm;

View File

@ -996,15 +996,22 @@ Standard_Boolean IntTools_EdgeEdge::IsIntersection(const Standard_Real aT11,
} }
// //
Standard_Real anAngleCriteria; Standard_Real anAngleCriteria;
Standard_Real anAngle1, anAngle2; Standard_Real anAngle1 = 0.0,
anAngle2 = 0.0;
// //
anAngleCriteria = 5.e-3; anAngleCriteria = 5.e-3;
if (bSmall_11_21 && bSmall_12_22) { if (aV11.SquareMagnitude() > Precision::SquareConfusion() &&
anAngle1 = aV11.Angle(aV21); aV12.SquareMagnitude() > Precision::SquareConfusion() &&
anAngle2 = aV12.Angle(aV22); aV21.SquareMagnitude() > Precision::SquareConfusion() &&
} else { aV22.SquareMagnitude() > Precision::SquareConfusion() )
anAngle1 = aV11.Angle(aV22); {
anAngle2 = aV12.Angle(aV21); if (bSmall_11_21 && bSmall_12_22) {
anAngle1 = aV11.Angle(aV21);
anAngle2 = aV12.Angle(aV22);
} else {
anAngle1 = aV11.Angle(aV22);
anAngle2 = aV12.Angle(aV21);
}
} }
// //
if (((anAngle1 < anAngleCriteria) || ((M_PI - anAngle1) < anAngleCriteria)) || if (((anAngle1 < anAngleCriteria) || ((M_PI - anAngle1) < anAngleCriteria)) ||

View File

@ -1,5 +1,3 @@
puts "TODO OCC25104 Windows: ERROR: OCC25104 is reproduced."
puts "========" puts "========"
puts "OCC25104" puts "OCC25104"
puts "========" puts "========"

View File

@ -1,5 +1,3 @@
puts "TODO OCC25693 Windows: Wire of BSplines fails bopcheck"
puts "============" puts "============"
puts "OCC25693" puts "OCC25693"
puts "============" puts "============"

View File

@ -1,5 +1,3 @@
puts "TODO OCC25693 Windows: Wire of BSplines fails bopcheck"
puts "============" puts "============"
puts "OCC25693" puts "OCC25693"
puts "============" puts "============"