1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-24 13:50:49 +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);
TheCurveTool::D1(curve,w,Psurf,D1U);
Standard_Real Norm = NSurf.Magnitude();
if(Norm>TOLERANCE_ANGULAIRE) {
if(Norm>TOLERANCE_ANGULAIRE &&
D1U.SquareMagnitude() > TOLERANCE_ANGULAIRE) {
D1U.Normalize();
CosDir = NSurf.Dot(D1U);
CosDir/=Norm;