]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
SALOME 6.5.0 preparation: add patch for OCCT 6.5.3
authorinv <inv@opencascade.com>
Tue, 22 May 2012 08:01:10 +0000 (08:01 +0000)
committerinv <inv@opencascade.com>
Tue, 22 May 2012 08:01:10 +0000 (08:01 +0000)
config_files/OCCT.sh
config_files/patches/OCCT-6.5.3.patch [new file with mode: 0644]

index cfcd6d8c391abd436d31b55864818f673b829a47..4034d9b4ae8994fdf5c3e271bfc778577e0fceed 100755 (executable)
@@ -86,6 +86,9 @@ source ${INSTALL_WORK}/$SHRC
 # unpack
 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
 
+# apply patch (if there's any)
+( test -f patches/${PRODUCT}.patch && cp patches/${PRODUCT}.patch ${PRODUCT_SRC_DIR} && cd ${PRODUCT_SRC_DIR} && patch -p1 < ${PRODUCT}.patch )
+
 # to generate environment scripts
 try_preinstalled
 }
diff --git a/config_files/patches/OCCT-6.5.3.patch b/config_files/patches/OCCT-6.5.3.patch
new file mode 100644 (file)
index 0000000..a22ac33
--- /dev/null
@@ -0,0 +1,78 @@
+diff -Naur --exclude=CVS OCCT-6.5.3_SRC_orig/inc/ApproxInt_PrmPrmSvSurfaces.gxx OCCT-6.5.3_SRC_patch/inc/ApproxInt_PrmPrmSvSurfaces.gxx
+--- OCCT-6.5.3_SRC_orig/inc/ApproxInt_PrmPrmSvSurfaces.gxx     2012-04-13 16:38:37.000000000 +0400
++++ OCCT-6.5.3_SRC_patch/inc/ApproxInt_PrmPrmSvSurfaces.gxx    2012-05-18 12:29:02.000000000 +0400
+@@ -24,6 +24,7 @@
+ #include <TColStd_Array1OfReal.hxx>
+ #include <math_FunctionSetRoot.hxx>
++#include <Precision.hxx>
+ #define Debug(expr)  cout<<" expr :"<<expr;
+ #define MySurf1 MyIntersectionOn2S.Function().AuxillarSurface1()
+@@ -173,7 +174,12 @@
+   TgTU = Tg.Dot(TU);
+   TgTV = Tg.Dot(TV);
+   DIS  = TUTU * TVTV - TUTV * TUTV;
+-  
++  if(fabs(DIS)<Precision::Angular()) { 
++    MyIsTangent=Standard_False;
++    MyHasBeenComputed = MyHasBeenComputedbis = Standard_False;
++    return(Standard_False); 
++  }
++
+   DeltaU = (TgTU * TVTV - TgTV * TUTV ) / DIS ; 
+   DeltaV = (TgTV * TUTU - TgTU * TUTV ) / DIS ;
+@@ -189,7 +195,12 @@
+   TUTV = TU.Dot(TV);
+   TgTU = Tg.Dot(TU);
+   TgTV = Tg.Dot(TV);
+-  DIS  = TUTU * TVTV - TUTV * TUTV;
++  DIS  = TUTU * TVTV - TUTV * TUTV; 
++  if(fabs(DIS)<Precision::Angular()) { 
++    MyIsTangent=Standard_False;
++    MyHasBeenComputed = MyHasBeenComputedbis = Standard_False;
++    return(Standard_False); 
++  }
+   DeltaU = (TgTU * TVTV - TgTV * TUTV ) / DIS ; 
+   DeltaV = (TgTV * TUTU - TgTU * TUTV ) / DIS ;
+diff -Naur --exclude=CVS OCCT-6.5.3_SRC_orig/src/ApproxInt/ApproxInt_PrmPrmSvSurfaces.gxx OCCT-6.5.3_SRC_patch/src/ApproxInt/ApproxInt_PrmPrmSvSurfaces.gxx
+--- OCCT-6.5.3_SRC_orig/src/ApproxInt/ApproxInt_PrmPrmSvSurfaces.gxx   2012-04-13 16:38:37.000000000 +0400
++++ OCCT-6.5.3_SRC_patch/src/ApproxInt/ApproxInt_PrmPrmSvSurfaces.gxx  2012-05-18 12:29:02.000000000 +0400
+@@ -24,6 +24,7 @@
+ #include <TColStd_Array1OfReal.hxx>
+ #include <math_FunctionSetRoot.hxx>
++#include <Precision.hxx>
+ #define Debug(expr)  cout<<" expr :"<<expr;
+ #define MySurf1 MyIntersectionOn2S.Function().AuxillarSurface1()
+@@ -173,7 +174,12 @@
+   TgTU = Tg.Dot(TU);
+   TgTV = Tg.Dot(TV);
+   DIS  = TUTU * TVTV - TUTV * TUTV;
+-  
++  if(fabs(DIS)<Precision::Angular()) { 
++    MyIsTangent=Standard_False;
++    MyHasBeenComputed = MyHasBeenComputedbis = Standard_False;
++    return(Standard_False); 
++  }
++
+   DeltaU = (TgTU * TVTV - TgTV * TUTV ) / DIS ; 
+   DeltaV = (TgTV * TUTU - TgTU * TUTV ) / DIS ;
+@@ -189,7 +195,12 @@
+   TUTV = TU.Dot(TV);
+   TgTU = Tg.Dot(TU);
+   TgTV = Tg.Dot(TV);
+-  DIS  = TUTU * TVTV - TUTV * TUTV;
++  DIS  = TUTU * TVTV - TUTV * TUTV; 
++  if(fabs(DIS)<Precision::Angular()) { 
++    MyIsTangent=Standard_False;
++    MyHasBeenComputed = MyHasBeenComputedbis = Standard_False;
++    return(Standard_False); 
++  }
+   DeltaU = (TgTU * TVTV - TgTV * TUTV ) / DIS ; 
+   DeltaV = (TgTV * TUTU - TgTU * TUTV ) / DIS ;