Skip to content

Commit

Permalink
Add patches to properly compile with OCCT 7
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Marie Verdun committed Jul 9, 2016
1 parent edc576e commit 16ab467
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 22 deletions.
2 changes: 1 addition & 1 deletion configure
Expand Up @@ -15352,7 +15352,7 @@ fi

if test a$occon = atrue ; then

OCCFLAGS="-DOCCGEOMETRY -I$occdir/inc -I/usr/include/opencascade"
OCCFLAGS="-DOCCGEOMETRY -I$occdir/include/opencascade -I/usr/include/opencascade"

OCCLIBS="-L$occdir/lib -lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKIGES -lTKBRep -lTKSTEPBase -lTKSTEP -lTKSTL -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF -lFWOSPlugin"

Expand Down
7 changes: 4 additions & 3 deletions libsrc/occ/Partition_Inter2d.hxx
Expand Up @@ -28,19 +28,20 @@
#define _Partition_Inter2d_HeaderFile

#ifndef _Handle_BRepAlgo_AsDes_HeaderFile
#include <Handle_BRepAlgo_AsDes.hxx>
#include <BRepAlgo_AsDes.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#include <TopTools_MapOfShape.hxx>
class BRepAlgo_AsDes;
class TopoDS_Face;
class TopTools_MapOfShape;
// class TopTools_MapOfShape;
class TopoDS_Vertex;
class TopTools_ListOfShape;
// class TopTools_ListOfShape;
class TopoDS_Edge;


Expand Down
9 changes: 5 additions & 4 deletions libsrc/occ/Partition_Inter3d.hxx
Expand Up @@ -28,7 +28,7 @@
#define _Partition_Inter3d_HeaderFile

#ifndef _Handle_BRepAlgo_AsDes_HeaderFile
#include <Handle_BRepAlgo_AsDes.hxx>
#include <BRepAlgo_AsDes.hxx>
#endif
#ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
#include <TopTools_DataMapOfShapeListOfShape.hxx>
Expand All @@ -42,11 +42,12 @@
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#include <TopTools_DataMapOfShapeShape.hxx>
class BRepAlgo_AsDes;
class TopTools_ListOfShape;
class TopTools_DataMapOfShapeShape;
// class TopTools_ListOfShape;
// class TopTools_DataMapOfShapeShape;
class TopoDS_Face;
class TopTools_MapOfShape;
// class TopTools_MapOfShape;
class TopoDS_Shape;
class TopoDS_Vertex;
class TopoDS_Edge;
Expand Down
2 changes: 1 addition & 1 deletion libsrc/occ/Partition_Loop.hxx
Expand Up @@ -38,7 +38,7 @@
#endif
class TopoDS_Face;
class TopoDS_Edge;
class TopTools_ListOfShape;
// class TopTools_ListOfShape;


#ifndef _Standard_HeaderFile
Expand Down
1 change: 1 addition & 0 deletions libsrc/occ/Partition_Loop2d.cxx
Expand Up @@ -51,6 +51,7 @@
#include <TopoDS_Wire.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#define PI 3.14159265358979323846

//=======================================================================
//function : Partition_Loop2d
Expand Down
2 changes: 1 addition & 1 deletion libsrc/occ/Partition_Loop2d.hxx
Expand Up @@ -24,7 +24,7 @@
#endif
class TopoDS_Face;
class TopoDS_Edge;
class TopTools_ListOfShape;
// class TopTools_ListOfShape;
class BRepAlgo_Image;


Expand Down
8 changes: 5 additions & 3 deletions libsrc/occ/Partition_Loop3d.hxx
Expand Up @@ -9,7 +9,9 @@

#ifndef _Partition_Loop3d_HeaderFile
#define _Partition_Loop3d_HeaderFile

#include <TopTools_ShapeMapHasher.hxx>
#include <TopTools_OrientedShapeMapHasher.hxx>
#include <TopTools_MapOfOrientedShape.hxx>
#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
#endif
Expand All @@ -23,8 +25,8 @@
#include <Standard_Real.hxx>
#endif
class TopoDS_Shape;
class TopTools_ListOfShape;
class TopTools_MapOfOrientedShape;
// class TopTools_ListOfShape;
// class TopTools_MapOfOrientedShape;
class TopoDS_Edge;
class TopoDS_Face;
class gp_Vec;
Expand Down
4 changes: 2 additions & 2 deletions libsrc/occ/Partition_Spliter.hxx
Expand Up @@ -29,7 +29,7 @@
#include <TopTools_DataMapOfShapeShape.hxx>
#endif
#ifndef _Handle_BRepAlgo_AsDes_HeaderFile
#include <Handle_BRepAlgo_AsDes.hxx>
#include <BRepAlgo_AsDes.hxx>
#endif
#ifndef _BRepAlgo_Image_HeaderFile
#include <BRepAlgo_Image.hxx>
Expand All @@ -45,7 +45,7 @@
#endif
class BRepAlgo_AsDes;
class TopoDS_Shape;
class TopTools_ListOfShape;
// class TopTools_ListOfShape;
class TopoDS_Edge;


Expand Down
21 changes: 14 additions & 7 deletions libsrc/occ/occgeom.cpp
Expand Up @@ -8,17 +8,20 @@
#include "ShapeAnalysis_CheckSmallFace.hxx"
#include "ShapeAnalysis_DataMapOfShapeListOfReal.hxx"
#include "ShapeAnalysis_Surface.hxx"
#include "BRepAlgoAPI_Fuse.hxx"

#include "BRepCheck_Analyzer.hxx"
#include "BRepLib.hxx"
#include "ShapeBuild_ReShape.hxx"
#include "ShapeFix.hxx"
#include "ShapeFix_Edge.hxx"
#include "ShapeFix_FixSmallFace.hxx"
#include "StlTransfer.hxx"
#include "TopoDS_Iterator.hxx"
#include "Partition_Spliter.hxx"


namespace netgen
{

void OCCGeometry :: PrintNrShapes ()
{
TopExp_Explorer e;
Expand Down Expand Up @@ -937,11 +940,15 @@ namespace netgen

void OCCGeometry :: CalcBoundingBox ()
{
Bnd_Box bb;
BRepBndLib::Add (shape, bb);
Bnd_Box b;

// SDS Not defined !

BRepBndLib::Add ((const TopoDS_Shape) shape, b,(Standard_Boolean)true);

// SDS
double x1,y1,z1,x2,y2,z2;
bb.Get (x1,y1,z1,x2,y2,z2);
b.Get (x1,y1,z1,x2,y2,z2);
Point<3> p1 = Point<3> (x1,y1,z1);
Point<3> p2 = Point<3> (x2,y2,z2);

Expand Down Expand Up @@ -1038,9 +1045,9 @@ namespace netgen
{
cout << "writing stl..."; cout.flush();
StlAPI_Writer writer;
writer.RelativeMode() = Standard_False;
// writer.RelativeMode() = Standard_False;

writer.SetDeflection(0.02);
// writer.SetDeflection(0.02);
writer.Write(shape,filename);

cout << "done" << endl;
Expand Down

0 comments on commit 16ab467

Please sign in to comment.