From 08cd2f3ec5f958da4584aef24635c69092c218df Mon Sep 17 00:00:00 2001 From: Jonathan Lambrechts <jonathan.lambrechts@uclouvain.be> Date: Thu, 16 Sep 2010 08:31:46 +0000 Subject: [PATCH] clean up GModeelFactory so that it can be built without HAVE_OCC --- Geo/GModelFactory.cpp | 64 ++++++++++++++++++++++--------------------- Geo/GModelFactory.h | 10 +++---- 2 files changed, 38 insertions(+), 36 deletions(-) diff --git a/Geo/GModelFactory.cpp b/Geo/GModelFactory.cpp index 6bb549ec12..a6bfb66a55 100644 --- a/Geo/GModelFactory.cpp +++ b/Geo/GModelFactory.cpp @@ -5,14 +5,6 @@ #include "GModelFactory.h" -#if defined(HAVE_OCC) - -#include "OCCIncludes.h" -#include "GModelIO_OCC.h" -#include "OCCVertex.h" -#include "OCCEdge.h" -#include "OCCFace.h" -#include "OCCRegion.h" #include "ListUtils.h" #include "Context.h" #include "GVertex.h" @@ -20,30 +12,8 @@ #include "gmshEdge.h" #include "gmshFace.h" #include "gmshRegion.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 <BRepBuilderAPI_Transform.hxx> -#include <TColgp_HArray1OfPnt.hxx> -#include <TColStd_HArray1OfReal.hxx> -#include <TColStd_HArray1OfInteger.hxx> #include "MLine.h" +#include "GModel.h" GVertex *GeoFactory::addVertex(GModel *gm, double x, double y, double z, double lc) @@ -189,6 +159,38 @@ GRegion* GeoFactory::addVolume (GModel *gm, std::vector<std::vector<GFace *> > f //--------------------------------------------------------------------------------- +#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 <BRepBuilderAPI_Transform.hxx> +#include <TColgp_HArray1OfPnt.hxx> +#include <TColStd_HArray1OfReal.hxx> +#include <TColStd_HArray1OfInteger.hxx> + + GVertex *OCCFactory::addVertex(GModel *gm, double x, double y, double z, double lc) { if (!gm->_occ_internals) diff --git a/Geo/GModelFactory.h b/Geo/GModelFactory.h index b4a25cf0f8..f080f01a98 100644 --- a/Geo/GModelFactory.h +++ b/Geo/GModelFactory.h @@ -8,14 +8,14 @@ #include <vector> #include "GmshConfig.h" -#include "fullMatrix.h" -#include "SPoint3.h" -#include "GEntity.h" +class GEntity; class GVertex; class GEdge; +class GFace; +class GRegion; class GModel; -class Field; +class SPoint3; // Abstract CAD creation factory. class GModelFactory { @@ -145,7 +145,7 @@ class OCCFactory : public GModelFactory { public: OCCFactory(){} GVertex *addVertex(GModel *gm,double x, double y, double z, double lc); - virtual GEdge *addLine(GModel *gm,GVertex *v1, GVertex *v2); + GEdge *addLine(GModel *gm,GVertex *v1, GVertex *v2); GEdge *addCircleArc(GModel *gm,const arcCreationMethod &method, GVertex *start, GVertex *end, const SPoint3 &aPoint); -- GitLab