diff --git a/Geo/GModelFactory.cpp b/Geo/GModelFactory.cpp index 88ca017b3a18f3452b379cdabcfa42b66f6d152a..86ec7d5a62ec3291c2d1df52d1eb4212f080d7c2 100644 --- a/Geo/GModelFactory.cpp +++ b/Geo/GModelFactory.cpp @@ -463,64 +463,121 @@ GFace *GeoFactory::_addPlanarFace(GModel *gm, const std::vector<std::vector<GEdg } #if defined(HAVE_OCC) -#include "OCCIncludes.h" #include "GModelIO_OCC.h" #include "OCCVertex.h" #include "OCCEdge.h" #include "OCCFace.h" #include "OCCRegion.h" -#include "BRepBuilderAPI_MakeVertex.hxx" -#include "BRepOffsetAPI_MakePipe.hxx" -#include "BRepBuilderAPI_MakeEdge.hxx" -#include "BRepPrimAPI_MakeRevol.hxx" -#include "BRepPrimAPI_MakePrism.hxx" -#include "BRepBuilderAPI_MakeWire.hxx" -#include "BRepOffsetAPI_ThruSections.hxx" -#include "BRepOffsetAPI_MakeFilling.hxx" -#include "BRepBuilderAPI_MakeFace.hxx" -#include <GC_MakeArcOfCircle.hxx> -#include <gp_Pnt.hxx> -#include <gp_Vec.hxx> -#include <gce_MakeCirc.hxx> -#include <gce_MakePln.hxx> -#include <ElCLib.hxx> -#include <Geom_Circle.hxx> -#include <Geom_TrimmedCurve.hxx> -#include <Geom_BezierCurve.hxx> -#include <Geom_BSplineCurve.hxx> + +#include <BRepAdaptor_Curve.hxx> +#include <BRepAdaptor_Surface.hxx> +#include <BRepAlgoAPI_Common.hxx> +#include <BRepAlgoAPI_Cut.hxx> +#include <BRepAlgoAPI_Fuse.hxx> +#include <BRepAlgoAPI_Section.hxx> +#include <BRepBndLib.hxx> +#include <BRepBuilderAPI_MakeEdge.hxx> +#include <BRepBuilderAPI_MakeFace.hxx> +#include <BRepBuilderAPI_MakeShell.hxx> +#include <BRepBuilderAPI_MakeSolid.hxx> +#include <BRepBuilderAPI_MakeVertex.hxx> +#include <BRepBuilderAPI_MakeWire.hxx> #include <BRepBuilderAPI_Transform.hxx> -#include <TColgp_HArray1OfPnt.hxx> -#include <TColStd_HArray1OfReal.hxx> -#include <TColStd_HArray1OfInteger.hxx> -#include <BRep_Builder.hxx> +#include <BRepCheck_Analyzer.hxx> +#include <BRepFilletAPI_MakeFillet.hxx> +#include <BRepGProp.hxx> +#include <BRepLProp_SLProps.hxx> +#include <BRepLib.hxx> +#include <BRepMesh.hxx> +#include <BRepMesh_IncrementalMesh.hxx> +#include <BRepOffsetAPI_MakeFilling.hxx> +#include <BRepOffsetAPI_MakePipe.hxx> +#include <BRepOffsetAPI_Sewing.hxx> +#include <BRepOffsetAPI_ThruSections.hxx> #include <BRepPrimAPI_MakeBox.hxx> -#include <BRepPrimAPI_MakeTorus.hxx> -#include <BRepPrimAPI_MakeSphere.hxx> +#include <BRepPrimAPI_MakeCone.hxx> #include <BRepPrimAPI_MakeCylinder.hxx> -#include <GeomLProp_SLProps.hxx> - -#include <BRepAlgoAPI_Section.hxx> +#include <BRepPrimAPI_MakePrism.hxx> +#include <BRepPrimAPI_MakeRevol.hxx> +#include <BRepPrimAPI_MakeSphere.hxx> +#include <BRepPrimAPI_MakeTorus.hxx> +#include <BRepTools.hxx> +#include <BRepTools_WireExplorer.hxx> +#include <BRep_Builder.hxx> +#include <BRep_Tool.hxx> +#include <Bnd_Box.hxx> +#include <ElCLib.hxx> +#include <GC_MakeArcOfCircle.hxx> #include <GProp_GProps.hxx> -#include <BRepGProp.hxx> +#include <Geom2d_Curve.hxx> +#include <GeomAPI_ExtremaCurveCurve.hxx> +#include <GeomAPI_PointsToBSpline.hxx> +#include <GeomAPI_ProjectPointOnCurve.hxx> +#include <GeomAPI_ProjectPointOnSurf.hxx> +#include <GeomLProp_SLProps.hxx> +#include <Geom_BSplineCurve.hxx> +#include <Geom_BezierCurve.hxx> +#include <Geom_Circle.hxx> +#include <Geom_Curve.hxx> +#include <Geom_Surface.hxx> +#include <Geom_TrimmedCurve.hxx> +#include <IGESControl_Reader.hxx> +#include <IGESControl_Writer.hxx> +#include <IGESToBRep_Reader.hxx> +#include <Interface_Static.hxx> +#include <Poly_Array1OfTriangle.hxx> +#include <Poly_Triangle.hxx> +#include <Poly_Triangulation.hxx> +#include <Precision.hxx> +#include <STEPControl_Reader.hxx> +#include <STEPControl_StepModelType.hxx> +#include <STEPControl_Writer.hxx> +#include <ShapeAnalysis.hxx> +#include <ShapeAnalysis_CheckSmallFace.hxx> +#include <ShapeAnalysis_DataMapOfShapeListOfReal.hxx> +#include <ShapeAnalysis_ShapeContents.hxx> +#include <ShapeAnalysis_ShapeTolerance.hxx> +#include <ShapeBuild_ReShape.hxx> +#include <ShapeFix.hxx> +#include <ShapeFix_FixSmallFace.hxx> +#include <ShapeFix_Shape.hxx> +#include <ShapeFix_Wireframe.hxx> +#include <ShapeUpgrade_ShellSewing.hxx> +#include <Standard_ErrorHandler.hxx> +#include <Standard_Failure.hxx> +#include <Standard_Version.hxx> +#include <StlAPI_Writer.hxx> +#include <TColStd_HArray1OfInteger.hxx> +#include <TColStd_HArray1OfReal.hxx> +#include <TColgp_Array1OfPnt2d.hxx> +#include <TColgp_HArray1OfPnt.hxx> +#include <TopExp.hxx> +#include <TopExp_Explorer.hxx> +#include <TopTools_DataMapOfIntegerShape.hxx> +#include <TopTools_DataMapOfShapeInteger.hxx> +#include <TopTools_IndexedMapOfShape.hxx> +#include <TopTools_ListIteratorOfListOfShape.hxx> +#include <TopTools_ListOfShape.hxx> +#include <TopoDS.hxx> +#include <TopoDS_Compound.hxx> +#include <TopoDS_Edge.hxx> +#include <TopoDS_Face.hxx> +#include <TopoDS_Iterator.hxx> #include <TopoDS_Shape.hxx> -#include <BRepTools.hxx> -#include <BRepBndLib.hxx> +#include <TopoDS_Solid.hxx> +#include <TopoDS_Wire.hxx> +#include <gce_MakeCirc.hxx> +#include <gce_MakePln.hxx> #include <gp.hxx> #include <gp_Ax1.hxx> #include <gp_Ax2.hxx> #include <gp_Ax2d.hxx> #include <gp_Dir.hxx> #include <gp_Dir2d.hxx> +#include <gp_Pnt.hxx> #include <gp_Pnt2d.hxx> #include <gp_Trsf.hxx> -#include <TopExp_Explorer.hxx> -#include <TopoDS.hxx> -#include <TopoDS_Edge.hxx> -#include <TopoDS_Face.hxx> -#include <TopoDS_Wire.hxx> -#include <TopoDS_Compound.hxx> -#include <TopTools_ListOfShape.hxx> -#include <GeomAPI_PointsToBSpline.hxx> +#include <gp_Vec.hxx> GVertex *OCCFactory::addVertex(GModel *gm, double x, double y, double z, double lc) { diff --git a/Geo/GModelIO_GEO.h b/Geo/GModelIO_GEO.h index ef2a815b8b5ebd82f7d8ca3635f6b36881064b96..5a214f9fdabaa3a35e0936069f4bd0fef1595854 100644 --- a/Geo/GModelIO_GEO.h +++ b/Geo/GModelIO_GEO.h @@ -89,8 +89,6 @@ class GEO_Internals{ List_T *PhysicalGroups; int MaxPointNum, MaxLineNum, MaxLineLoopNum, MaxSurfaceNum; int MaxSurfaceLoopNum, MaxVolumeNum, MaxPhysicalNum; - - // FIXME this should not be stored in GEO_internals, but directly set in GModel std::multimap<int, std::vector<int> > meshCompounds; }; diff --git a/Geo/GModelIO_OCC.cpp b/Geo/GModelIO_OCC.cpp index 8c4c1ee96f98aba3f814d5f7b56e7d21ec220ccf..ea042560c31419c99219d9b4583631a6056a2098 100644 --- a/Geo/GModelIO_OCC.cpp +++ b/Geo/GModelIO_OCC.cpp @@ -18,34 +18,62 @@ #if defined(HAVE_OCC) -#include <TopTools_DataMapIteratorOfDataMapOfShapeInteger.hxx> -#include <TopTools_DataMapIteratorOfDataMapOfIntegerShape.hxx> +#include <BRepAlgoAPI_Common.hxx> +#include <BRepAlgoAPI_Cut.hxx> +#include <BRepAlgoAPI_Fuse.hxx> +#include <BRepAlgoAPI_Section.hxx> +#include <BRepBuilderAPI_Copy.hxx> #include <BRepBuilderAPI_MakeEdge.hxx> -#include <BRepBuilderAPI_MakeWire.hxx> #include <BRepBuilderAPI_MakeFace.hxx> -#include <BRepBuilderAPI_Copy.hxx> -#include <BRepPrimAPI_MakeSphere.hxx> +#include <BRepBuilderAPI_MakeShell.hxx> +#include <BRepBuilderAPI_MakeSolid.hxx> +#include <BRepBuilderAPI_MakeVertex.hxx> +#include <BRepBuilderAPI_MakeWire.hxx> +#include <BRepBuilderAPI_Sewing.hxx> +#include <BRepCheck_Analyzer.hxx> +#include <BRepFilletAPI_MakeFillet.hxx> +#include <BRepGProp.hxx> +#include <BRepLib.hxx> +#include <BRepOffsetAPI_MakeFilling.hxx> +#include <BRepOffsetAPI_MakePipe.hxx> +#include <BRepOffsetAPI_MakeThickSolid.hxx> +#include <BRepOffsetAPI_Sewing.hxx> +#include <BRepOffsetAPI_ThruSections.hxx> #include <BRepPrimAPI_MakeBox.hxx> -#include <BRepPrimAPI_MakeCylinder.hxx> #include <BRepPrimAPI_MakeCone.hxx> -#include <BRepPrimAPI_MakeTorus.hxx> -#include <BRepPrimAPI_MakeWedge.hxx> +#include <BRepPrimAPI_MakeCylinder.hxx> #include <BRepPrimAPI_MakePrism.hxx> #include <BRepPrimAPI_MakeRevol.hxx> -#include <BRepOffsetAPI_MakeFilling.hxx> -#include <BRepOffsetAPI_MakePipe.hxx> -#include <BRepOffsetAPI_ThruSections.hxx> -#include <BRepOffsetAPI_MakeThickSolid.hxx> -#include <gce_MakeCirc.hxx> -#include <gce_MakeElips.hxx> -#include <gce_MakePln.hxx> +#include <BRepPrimAPI_MakeSphere.hxx> +#include <BRepPrimAPI_MakeTorus.hxx> +#include <BRepPrimAPI_MakeWedge.hxx> +#include <BRepTools.hxx> +#include <BRep_Tool.hxx> #include <ElCLib.hxx> +#include <GProp_GProps.hxx> +#include <GeomAPI_PointsToBSpline.hxx> +#include <Geom_BSplineCurve.hxx> +#include <Geom_BezierCurve.hxx> #include <Geom_Circle.hxx> #include <Geom_Ellipse.hxx> #include <Geom_TrimmedCurve.hxx> -#include <Geom_BezierCurve.hxx> -#include <Geom_BSplineCurve.hxx> -#include <GeomAPI_PointsToBSpline.hxx> +#include <IGESControl_Reader.hxx> +#include <IGESControl_Writer.hxx> +#include <STEPControl_Reader.hxx> +#include <STEPControl_Writer.hxx> +#include <ShapeBuild_ReShape.hxx> +#include <ShapeFix_FixSmallFace.hxx> +#include <ShapeFix_Shape.hxx> +#include <ShapeFix_Wireframe.hxx> +#include <Standard_Version.hxx> +#include <TopExp.hxx> +#include <TopExp_Explorer.hxx> +#include <TopTools_DataMapIteratorOfDataMapOfIntegerShape.hxx> +#include <TopTools_DataMapIteratorOfDataMapOfShapeInteger.hxx> +#include <TopoDS.hxx> +#include <gce_MakeCirc.hxx> +#include <gce_MakeElips.hxx> +#include <gce_MakePln.hxx> OCC_Internals::OCC_Internals() { @@ -54,6 +82,19 @@ OCC_Internals::OCC_Internals() _changed = true; } +void OCC_Internals::reset() +{ + for(int i = 0; i < 6; i++) _maxTagConstraints[i] = 0; + for(int i = 0; i < 4; i++) meshAttributes[i].clear(); + _somap.Clear(); _shmap.Clear(); _fmap.Clear(); _wmap.Clear(); _emap.Clear(); + _vmap.Clear(); + _vertexTag.Clear(); _edgeTag.Clear(); _faceTag.Clear(); _solidTag.Clear(); + _tagVertex.Clear(); _tagEdge.Clear(); _tagFace.Clear(); _tagSolid.Clear(); + _wireTag.Clear(); _shellTag.Clear(); + _tagWire.Clear(); _tagShell.Clear(); + _changed = true; +} + void OCC_Internals::bind(TopoDS_Vertex vertex, int tag) { _vertexTag.Bind(vertex, tag); diff --git a/Geo/GModelIO_OCC.h b/Geo/GModelIO_OCC.h index a94e357be1cf08d3a5292b58ed8f15df826d7fc5..3049319dfa1bfc527f1c6549ec9fd84c0ac9033b 100644 --- a/Geo/GModelIO_OCC.h +++ b/Geo/GModelIO_OCC.h @@ -6,13 +6,25 @@ #ifndef _GMODELIO_OCC_H_ #define _GMODELIO_OCC_H_ +#include <vector> +#include <map> #include "GmshConfig.h" #include "GmshMessage.h" #include "GModel.h" -#include "OCCIncludes.h" #if defined(HAVE_OCC) -#include <vector> + +#include <TopoDS_Shape.hxx> +#include <TopoDS_Vertex.hxx> +#include <TopoDS_Edge.hxx> +#include <TopoDS_Wire.hxx> +#include <TopoDS_Face.hxx> +#include <TopoDS_Shell.hxx> +#include <TopoDS_Solid.hxx> +#include <TopTools_IndexedMapOfShape.hxx> +#include <TopTools_DataMapOfShapeInteger.hxx> +#include <TopTools_DataMapOfIntegerShape.hxx> +#include <BRepBuilderAPI_Transform.hxx> class OCC_Internals { public: @@ -77,18 +89,7 @@ class OCC_Internals { bool getChanged() const { return _changed; } // reset all maps - void reset() - { - for(int i = 0; i < 6; i++) _maxTagConstraints[i] = 0; - for(int i = 0; i < 4; i++) meshAttributes[i].clear(); - _somap.Clear(); _shmap.Clear(); _fmap.Clear(); _wmap.Clear(); _emap.Clear(); - _vmap.Clear(); - _vertexTag.Clear(); _edgeTag.Clear(); _faceTag.Clear(); _solidTag.Clear(); - _tagVertex.Clear(); _tagEdge.Clear(); _tagFace.Clear(); _tagSolid.Clear(); - _wireTag.Clear(); _shellTag.Clear(); - _tagWire.Clear(); _tagShell.Clear(); - _changed = true; - } + void reset(); // bind and unbind OpenCASCADE shapes to tags void bind(TopoDS_Vertex vertex, int tag); diff --git a/Geo/OCCEdge.cpp b/Geo/OCCEdge.cpp index 0f06b1e75cc5e949bec4b241d8dbc9a9b08bd37f..38b9e74e738408dfc42e35406037b9a1034a2251 100644 --- a/Geo/OCCEdge.cpp +++ b/Geo/OCCEdge.cpp @@ -7,13 +7,15 @@ #include "GmshConfig.h" #include "GmshMessage.h" #include "GModel.h" +#include "GModelIO_OCC.h" #include "OCCEdge.h" #include "OCCFace.h" #include "Context.h" #if defined(HAVE_OCC) -#include "GModelIO_OCC.h" + #include <Standard_Version.hxx> +#include <TopoDS.hxx> #include <Geom2dLProp_CLProps2d.hxx> #include <Geom_BezierCurve.hxx> #include <Geom_OffsetCurve.hxx> @@ -25,6 +27,13 @@ #include <Geom_Line.hxx> #include <Geom_Conic.hxx> #include <Geom_BSplineCurve.hxx> +#include <GeomAPI_ProjectPointOnCurve.hxx> +#include <Bnd_Box.hxx> +#include <BRepLProp_CLProps.hxx> +#include <BRepBndLib.hxx> +#include <BRepAdaptor_Curve.hxx> +#include <BRepAdaptor_Surface.hxx> +#include <BRep_Builder.hxx> #if (OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR < 6) #include <BOPTools_Tools.hxx> #else diff --git a/Geo/OCCEdge.h b/Geo/OCCEdge.h index 71fbb4587cd92ec094a312930e93e0b13a0c930d..81de69068e0f2c0b91e271aeb888f56947a0b2d1 100644 --- a/Geo/OCCEdge.h +++ b/Geo/OCCEdge.h @@ -9,13 +9,17 @@ #include "GmshConfig.h" #include "GEdge.h" #include "GModel.h" -#include "OCCVertex.h" #include "Range.h" class OCCFace; #if defined(HAVE_OCC) +#include <TopoDS_Edge.hxx> +#include <Geom_Curve.hxx> +#include <Geom2d_Curve.hxx> +#include <BRep_Tool.hxx> + class OCCEdge : public GEdge { protected: TopoDS_Edge _replacement; diff --git a/Geo/OCCFace.cpp b/Geo/OCCFace.cpp index f259862aab7696fa4deb31578a52192f97f14252..44b3413454c4e08946858666a414e65102a35098 100644 --- a/Geo/OCCFace.cpp +++ b/Geo/OCCFace.cpp @@ -6,6 +6,7 @@ #include "GmshConfig.h" #include "GmshMessage.h" #include "GModel.h" +#include "GModelIO_OCC.h" #include "GEdgeLoop.h" #include "OCCVertex.h" #include "OCCEdge.h" @@ -14,8 +15,10 @@ #include "Context.h" #if defined(HAVE_OCC) -#include "GModelIO_OCC.h" + #include <Standard_Version.hxx> +#include <gp_Pln.hxx> +#include <Bnd_Box.hxx> #include <Geom_CylindricalSurface.hxx> #include <Geom_ConicalSurface.hxx> #include <Geom_BSplineSurface.hxx> @@ -24,15 +27,17 @@ #include <Geom_SurfaceOfRevolution.hxx> #include <Geom_BezierSurface.hxx> #include <Geom_Plane.hxx> -#include <gp_Pln.hxx> +#include <GeomAPI_ProjectPointOnSurf.hxx> #include <BRepMesh_FastDiscret.hxx> - +#include <BRepBndLib.hxx> +#include <BRepLProp_SLProps.hxx> +#include <BRep_Builder.hxx> #if ((OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR >= 6)) || (OCC_VERSION_MAJOR >= 7) -# if ((OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR < 8)) -# include <BOPInt_Context.hxx> -# else -# include <IntTools_Context.hxx> -# endif +#if ((OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR < 8)) +#include <BOPInt_Context.hxx> +#else +#include <IntTools_Context.hxx> +#endif #include <BOPTools_AlgoTools2D.hxx> #include <BOPTools_AlgoTools.hxx> #else @@ -40,6 +45,9 @@ #include <BOPTools_Tools2D.hxx> #include <BOPTools_Tools3D.hxx> #endif +#include <TopoDS.hxx> +#include <TopExp_Explorer.hxx> +#include <ShapeAnalysis.hxx> OCCFace::OCCFace(GModel *m, TopoDS_Face _s, int num) : GFace(m, num), s(_s) diff --git a/Geo/OCCFace.h b/Geo/OCCFace.h index 2412c745615fb3cec3214bb370d9fcf12e135a86..b8d7850e7b5d2741ff9ad0db7792a8fde888f030 100644 --- a/Geo/OCCFace.h +++ b/Geo/OCCFace.h @@ -9,12 +9,12 @@ #include "GmshConfig.h" #include "GFace.h" #include "GModel.h" -#include "OCCVertex.h" -#include "OCCEdge.h" #include "Range.h" #if defined(HAVE_OCC) +#include <TopoDS_Face.hxx> + class OCCFace : public GFace { protected: TopoDS_Face _replaced; diff --git a/Geo/OCCIncludes.h b/Geo/OCCIncludes.h deleted file mode 100644 index 9a61243fb32fda52e22b5795864ee08dba32ca62..0000000000000000000000000000000000000000 --- a/Geo/OCCIncludes.h +++ /dev/null @@ -1,128 +0,0 @@ -// Gmsh - Copyright (C) 1997-2017 C. Geuzaine, J.-F. Remacle -// -// See the LICENSE.txt file for license information. Please report all -// bugs and problems to the public mailing list <gmsh@onelab.info>. - -#ifndef _OCC_INCLUDES_ -#define _OCC_INCLUDES_ - -#include "GmshConfig.h" - -#if defined(HAVE_OCC) - -#include <iostream> -using std::iostream; - -#include <Standard_Version.hxx> -#if !defined(HAVE_NO_OCC_CONFIG_H) && (OCC_VERSION_MAJOR < 7) -#include <config.h> -#endif - -#include <BRep_Tool.hxx> -#include <Geom_Curve.hxx> -#include <Geom2d_Curve.hxx> -#include <Geom_Surface.hxx> -#include <GeomAPI_ProjectPointOnSurf.hxx> -#include <GeomAPI_ProjectPointOnCurve.hxx> -#include <BRepTools.hxx> -#include <TopExp.hxx> -#include <BRepBuilderAPI_MakeVertex.hxx> -#include <BRepBuilderAPI_MakeShell.hxx> -#include <BRepBuilderAPI_MakeSolid.hxx> -#include <BRepBuilderAPI_Transform.hxx> -#include <BRepOffsetAPI_Sewing.hxx> -#include <BRepLProp_SLProps.hxx> -#include <BRepAdaptor_Surface.hxx> -#include <Poly_Triangulation.hxx> -#include <Poly_Array1OfTriangle.hxx> -#include <TColgp_Array1OfPnt2d.hxx> -#include <Poly_Triangle.hxx> -#include <GProp_GProps.hxx> -#include <BRepGProp.hxx> -#include <Geom_Surface.hxx> -#include <TopExp.hxx> -#include <gp_Pnt.hxx> -#include <TopoDS.hxx> -#include <TopoDS_Solid.hxx> -#include <TopExp_Explorer.hxx> -#include <BRep_Tool.hxx> -#include <BRep_Builder.hxx> -#include <Geom_Curve.hxx> -#include <Geom2d_Curve.hxx> -#include <Geom_Surface.hxx> -#include <GeomAPI_ProjectPointOnSurf.hxx> -#include <GeomAPI_ProjectPointOnCurve.hxx> -#include <TopoDS_Wire.hxx> -#include <BRepTools_WireExplorer.hxx> -#include <BRepTools.hxx> -#include <TopTools_IndexedMapOfShape.hxx> -#include <TopTools_DataMapOfShapeInteger.hxx> -#include <TopTools_DataMapOfIntegerShape.hxx> -#include <TopExp.hxx> -#include <BRepBuilderAPI_MakeVertex.hxx> -#include <BRepBuilderAPI_MakeShell.hxx> -#include <BRepBuilderAPI_MakeSolid.hxx> -#include <BRepOffsetAPI_Sewing.hxx> -#include <BRepLProp_CLProps.hxx> -#include <BRepLProp_SLProps.hxx> -#include <BRepAdaptor_Surface.hxx> -#include <BRepAdaptor_Curve.hxx> -#include <Poly_Triangulation.hxx> -#include <Poly_Array1OfTriangle.hxx> -#include <Poly_Triangle.hxx> -#include <GProp_GProps.hxx> -#include <BRepGProp.hxx> -#include <IGESControl_Reader.hxx> -#include <STEPControl_Reader.hxx> -#include <TopoDS_Shape.hxx> -#include <TopoDS_Face.hxx> -#include <IGESToBRep_Reader.hxx> -#include <Interface_Static.hxx> -#include <GeomAPI_ExtremaCurveCurve.hxx> -#include <Standard_ErrorHandler.hxx> -#include <Standard_Failure.hxx> -#include <ShapeUpgrade_ShellSewing.hxx> -#include <ShapeFix_Shape.hxx> -#include <ShapeFix_Wireframe.hxx> -#include <BRepMesh.hxx> -#include <BRepMesh_IncrementalMesh.hxx> -#include <BRepBndLib.hxx> -#include <Bnd_Box.hxx> -#include <ShapeAnalysis.hxx> -#include <ShapeBuild_ReShape.hxx> -#include <IGESControl_Writer.hxx> -#include <STEPControl_Writer.hxx> -#include <StlAPI_Writer.hxx> -#include <STEPControl_StepModelType.hxx> -#include <ShapeAnalysis_ShapeTolerance.hxx> -#include <ShapeAnalysis_ShapeContents.hxx> -#include <ShapeAnalysis_CheckSmallFace.hxx> -#include <ShapeAnalysis_DataMapOfShapeListOfReal.hxx> -#include <BRepAlgoAPI_Fuse.hxx> -#include <BRepCheck_Analyzer.hxx> -#include <BRepLib.hxx> -#include <ShapeBuild_ReShape.hxx> -#include <ShapeFix.hxx> -#include <ShapeFix_FixSmallFace.hxx> -#include <TopoDS_Compound.hxx> -#include <TopoDS_Iterator.hxx> -#include <BRepPrimAPI_MakeSphere.hxx> -#include <BRepPrimAPI_MakeBox.hxx> -#include <BRepPrimAPI_MakeCylinder.hxx> -#include <BRepPrimAPI_MakeCone.hxx> -#include <BRepPrimAPI_MakeTorus.hxx> -#include <TopTools_ListIteratorOfListOfShape.hxx> -#include <Precision.hxx> -#include <BRepAlgoAPI_Common.hxx> -#include <BRepAlgoAPI_Cut.hxx> -#include <BRepAlgoAPI_Section.hxx> -#include <BRepAlgoAPI_Fuse.hxx> -#include <BRepFilletAPI_MakeFillet.hxx> -#endif - -#if defined(WIN32) -#undef min -#undef max -#endif - -#endif diff --git a/Geo/OCCRegion.cpp b/Geo/OCCRegion.cpp index f88a61fef15c9ccbcf2313ef07beea6202907ea0..d4ac7e351f7fd89e3f4dd813091605a1dcbc9213 100644 --- a/Geo/OCCRegion.cpp +++ b/Geo/OCCRegion.cpp @@ -6,13 +6,20 @@ #include "GmshConfig.h" #include "GmshMessage.h" #include "GModel.h" +#include "GModelIO_OCC.h" #include "OCCVertex.h" #include "OCCEdge.h" #include "OCCFace.h" #include "OCCRegion.h" #if defined(HAVE_OCC) -#include "GModelIO_OCC.h" + +#include <Bnd_Box.hxx> +#include <TopoDS.hxx> +#include <TopoDS_Compound.hxx> +#include <TopExp_Explorer.hxx> +#include <BRep_Builder.hxx> +#include <BRepBndLib.hxx> OCCRegion::OCCRegion(GModel *m, TopoDS_Solid _s, int num) : GRegion(m, num), s(_s) diff --git a/Geo/OCCRegion.h b/Geo/OCCRegion.h index 589a2a825b5f5601fe878564961fd2ad6c223dc9..e815f917c539b6d61177280665413542c66930f2 100644 --- a/Geo/OCCRegion.h +++ b/Geo/OCCRegion.h @@ -11,6 +11,8 @@ #if defined(HAVE_OCC) +#include <TopoDS_Solid.hxx> + class OCCRegion : public GRegion { protected: TopoDS_Solid s; diff --git a/Geo/OCCVertex.h b/Geo/OCCVertex.h index 2e49204046b81f8a53986658933be1741021b5cf..ab7077e8ac892fda8c28fe968b001539879436f4 100644 --- a/Geo/OCCVertex.h +++ b/Geo/OCCVertex.h @@ -9,10 +9,11 @@ #include "GmshConfig.h" #include "GModel.h" #include "GVertex.h" -#include "OCCIncludes.h" #if defined(HAVE_OCC) +#include <TopoDS_Vertex.hxx> + class OCCVertex : public GVertex { protected: TopoDS_Vertex _v;