-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for OCCT 7.6
- Loading branch information
Showing
16 changed files
with
353 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import os | ||
|
||
# Specify the files to diff | ||
a = '' | ||
b = '' | ||
|
||
# Specify the patch filename | ||
patch = '.patch' | ||
|
||
# Call git diff | ||
cmd = 'git diff --no-index {} {} > {}'.format(a, b, patch) | ||
os.system(cmd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
diff --git a/src/GEOMUtils/GEOMUtils.cxx b/src/GEOMUtils/GEOMUtils.cxx | ||
--- a/src/GEOMUtils/GEOMUtils.cxx | ||
+++ b/src/GEOMUtils/GEOMUtils.cxx | ||
@@ -94,8 +94,6 @@ | ||
#include <sstream> | ||
#include <algorithm> | ||
|
||
-#include <V3d_Coordinate.hxx> | ||
- | ||
#include <Standard_Failure.hxx> | ||
#include <Standard_NullObject.hxx> | ||
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC | ||
@@ -1028,7 +1026,7 @@ Standard_Real GEOMUtils::GetMinDistance | ||
//======================================================================= | ||
gp_Pnt GEOMUtils::ConvertClickToPoint( int x, int y, Handle(V3d_View) aView ) | ||
{ | ||
- V3d_Coordinate XEye, YEye, ZEye, XAt, YAt, ZAt; | ||
+ Standard_Real XEye, YEye, ZEye, XAt, YAt, ZAt; | ||
aView->Eye( XEye, YEye, ZEye ); | ||
|
||
aView->At( XAt, YAt, ZAt ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
diff --git a/src/SMESHUtils/SMESH_ControlPnt.cxx b/src/SMESHUtils/SMESH_ControlPnt.cxx | ||
--- a/src/SMESHUtils/SMESH_ControlPnt.cxx | ||
+++ b/src/SMESHUtils/SMESH_ControlPnt.cxx | ||
@@ -170,7 +170,11 @@ void SMESHUtils::createPointsSampleFromFace( const TopoDS_Face& theFace, | ||
// GetNodes | ||
int nbNodes = aTri->NbNodes(); | ||
TColgp_Array1OfPnt nodes(1,nbNodes); | ||
- nodes = aTri->Nodes(); | ||
+ // nodes = aTri->Nodes(); | ||
+ for (int i = 1; i <= nbNodes; i++) | ||
+ { | ||
+ nodes.SetValue(i, aTri->Node(i)); | ||
+ } | ||
|
||
// Iterate on triangles and subdivide them | ||
thePoints.reserve( thePoints.size() + nbTriangles ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx | ||
--- a/src/Controls/SMESH_Controls.cxx | ||
+++ b/src/Controls/SMESH_Controls.cxx | ||
@@ -4375,7 +4375,7 @@ private: | ||
bool (Classifier::* myIsOutFun)(const gp_Pnt& p); | ||
BRepClass3d_SolidClassifier* mySolidClfr; // ptr because of a run-time forbidden copy-constructor | ||
Bnd_B3d myBox; | ||
- GeomAPI_ProjectPointOnSurf myProjFace; | ||
+ GeomAPI_ProjectPointOnSurf* myProjFace; // ptr because of deleted copy constructor in OCCT 7.6 in Extrema_GenExtPS.hxx | ||
GeomAPI_ProjectPointOnCurve myProjEdge; | ||
gp_Pnt myVertexXYZ; | ||
TopoDS_Shape myShape; | ||
@@ -4740,7 +4740,7 @@ void ElementsOnShape::Classifier::Init( const TopoDS_Shape& theShape, | ||
else | ||
{ | ||
surf->Bounds( u1,u2,v1,v2 ); | ||
- myProjFace.Init(surf, u1,u2, v1,v2, myTol ); | ||
+ myProjFace->Init(surf, u1,u2, v1,v2, myTol ); | ||
myIsOutFun = & ElementsOnShape::Classifier::isOutOfFace; | ||
} | ||
break; | ||
@@ -4839,12 +4839,12 @@ bool ElementsOnShape::Classifier::isOutOfBox( const gp_Pnt& p ) | ||
bool ElementsOnShape::Classifier::isOutOfFace( const gp_Pnt& p ) | ||
{ | ||
if ( isOutOfBox( p )) return true; | ||
- myProjFace.Perform( p ); | ||
- if ( myProjFace.IsDone() && myProjFace.LowerDistance() <= myTol ) | ||
+ myProjFace->Perform( p ); | ||
+ if ( myProjFace->IsDone() && myProjFace->LowerDistance() <= myTol ) | ||
{ | ||
// check relatively to the face | ||
Standard_Real u, v; | ||
- myProjFace.LowerDistanceParameters(u, v); | ||
+ myProjFace->LowerDistanceParameters(u, v); | ||
gp_Pnt2d aProjPnt (u, v); | ||
BRepClass_FaceClassifier aClsf ( TopoDS::Face( myShape ), aProjPnt, myTol ); | ||
if ( aClsf.State() == TopAbs_IN || aClsf.State() == TopAbs_ON ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff --git a/src/SMESHUtils/SMESH_MeshAlgos.cxx b/src/SMESHUtils/SMESH_MeshAlgos.cxx | ||
--- a/src/SMESHUtils/SMESH_MeshAlgos.cxx | ||
+++ b/src/SMESHUtils/SMESH_MeshAlgos.cxx | ||
@@ -41,10 +41,13 @@ | ||
#include <GC_MakeSegment.hxx> | ||
#include <GeomAPI_ExtremaCurveCurve.hxx> | ||
#include <Geom_Line.hxx> | ||
-#include <IntAna_IntConicQuad.hxx> | ||
-#include <IntAna_Quadric.hxx> | ||
+#include <gp_Cone.hxx> | ||
+#include <gp_Cylinder.hxx> | ||
+#include <gp_Sphere.hxx> | ||
#include <gp_Lin.hxx> | ||
#include <gp_Pln.hxx> | ||
+#include <IntAna_IntConicQuad.hxx> | ||
+#include <IntAna_Quadric.hxx> | ||
#include <NCollection_DataMap.hxx> | ||
|
||
#include <limits> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
diff --git a/src/SMESHUtils/SMESH_Slot.cxx b/src/SMESHUtils/SMESH_Slot.cxx | ||
--- a/src/SMESHUtils/SMESH_Slot.cxx | ||
+++ b/src/SMESHUtils/SMESH_Slot.cxx | ||
@@ -27,8 +27,6 @@ | ||
#include "SMDS_Mesh.hxx" | ||
#include "SMDS_MeshGroup.hxx" | ||
|
||
-#include <IntAna_IntConicQuad.hxx> | ||
-#include <IntAna_Quadric.hxx> | ||
#include <NCollection_DataMap.hxx> | ||
#include <NCollection_Map.hxx> | ||
#include <Precision.hxx> | ||
@@ -39,6 +37,10 @@ | ||
#include <gp_Pln.hxx> | ||
#include <gp_Pnt.hxx> | ||
#include <gp_Vec.hxx> | ||
+#include <gp_Cone.hxx> | ||
+#include <gp_Sphere.hxx> | ||
+#include <IntAna_IntConicQuad.hxx> | ||
+#include <IntAna_Quadric.hxx> | ||
|
||
#include <Utils_SALOME_Exception.hxx> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
diff --git a/src/StdMeshers/StdMeshers_Adaptive1D.cxx b/src/StdMeshers/StdMeshers_Adaptive1D.cxx | ||
--- a/src/StdMeshers/StdMeshers_Adaptive1D.cxx | ||
+++ b/src/StdMeshers/StdMeshers_Adaptive1D.cxx | ||
@@ -34,6 +34,7 @@ | ||
|
||
#include <Utils_SALOME_Exception.hxx> | ||
|
||
+#include <Standard_Version.hxx> | ||
#include <BRepAdaptor_Curve.hxx> | ||
#include <BRepAdaptor_Surface.hxx> | ||
#include <BRepBndLib.hxx> | ||
@@ -319,13 +320,26 @@ namespace // internal utils | ||
{ | ||
myFaceTol = SMESH_MesherHelper::MaxTolerance( face ); | ||
myTree = triaTree; | ||
+#if OCC_VERSION_HEX < 0x070600 | ||
myNodes = & tr->Nodes(); | ||
+#else | ||
+ TColgp_Array1OfPnt* trNodes = new TColgp_Array1OfPnt(1, tr->NbNodes()); | ||
+ for (Standard_Integer i = myNodes->Lower(); i <= myNodes->Upper(); i++) | ||
+ { | ||
+ trNodes->SetValue(i, tr->Node(i)); | ||
+ } | ||
+ myNodes = trNodes; | ||
+ myOwnNodes = true; | ||
+#endif | ||
myPolyTrias = & tr->Triangles(); | ||
myTriasDeflection = tr->Deflection(); | ||
if ( !loc.IsIdentity() ) // transform nodes if necessary | ||
{ | ||
TColgp_Array1OfPnt* trsfNodes = new TColgp_Array1OfPnt( myNodes->Lower(), myNodes->Upper() ); | ||
trsfNodes->Assign( *myNodes ); | ||
+#if OCC_VERSION_HEX >= 0x070600 | ||
+ delete myNodes; | ||
+#endif | ||
myNodes = trsfNodes; | ||
myOwnNodes = true; | ||
const gp_Trsf& trsf = loc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
diff --git a/src/StdMeshers/StdMeshers_Projection_2D.cxx b/src/StdMeshers/StdMeshers_Projection_2D.cxx | ||
--- a/src/StdMeshers/StdMeshers_Projection_2D.cxx | ||
+++ b/src/StdMeshers/StdMeshers_Projection_2D.cxx | ||
@@ -58,8 +58,11 @@ | ||
#include <GeomAPI_ExtremaCurveCurve.hxx> | ||
#include <GeomAPI_ProjectPointOnSurf.hxx> | ||
#include <GeomAdaptor_Curve.hxx> | ||
+#include <Standard_Version.hxx> | ||
+#if OCC_VERSION_HEX < 0x070600 | ||
#include <GeomAdaptor_HCurve.hxx> | ||
#include <GeomAdaptor_HSurface.hxx> | ||
+#endif | ||
#include <GeomAdaptor_Surface.hxx> | ||
#include <GeomLib_IsPlanarSurface.hxx> | ||
#include <Geom_Line.hxx> | ||
@@ -1526,8 +1529,13 @@ namespace { | ||
SMESHDS_Mesh* tgtMeshDS = tgtMesh->GetMeshDS(); | ||
|
||
Handle(Geom_Surface) tgtSurface = BRep_Tool::Surface( theTgtFace ); | ||
+#if OCC_VERSION_HEX < 0x070600 | ||
Handle(GeomAdaptor_HSurface) tgtSurfAdaptor = new GeomAdaptor_HSurface( tgtSurface ); | ||
Handle(GeomAdaptor_HCurve) piercingCurve = new GeomAdaptor_HCurve( thePiercingLine ); | ||
+#else | ||
+ Handle(GeomAdaptor_Surface) tgtSurfAdaptor = new GeomAdaptor_Surface(tgtSurface); | ||
+ Handle(GeomAdaptor_Curve) piercingCurve = new GeomAdaptor_Curve(thePiercingLine); | ||
+#endif | ||
IntCurveSurface_HInter intersect; | ||
|
||
SMESH_MesherHelper* srcHelper = theSrcWires[0]->FaceHelper(); |
Oops, something went wrong.