From 3ea15b8b4cd4207d8d973db5b5234462a674cd49 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 13 Mar 2017 05:35:15 +0000
Subject: [PATCH] fix compile

---
 Geo/GModelIO_OCC.cpp | 15 +++++++++------
 Geo/GModelIO_OCC.h   |  9 +++++----
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/Geo/GModelIO_OCC.cpp b/Geo/GModelIO_OCC.cpp
index d28a991094..591dbdca69 100644
--- a/Geo/GModelIO_OCC.cpp
+++ b/Geo/GModelIO_OCC.cpp
@@ -31,6 +31,7 @@
 #include <BRepBuilderAPI_MakeVertex.hxx>
 #include <BRepBuilderAPI_MakeWire.hxx>
 #include <BRepBuilderAPI_Sewing.hxx>
+#include <BRepBuilderAPI_Transform.hxx>
 #include <BRepCheck_Analyzer.hxx>
 #include <BRepFilletAPI_MakeFillet.hxx>
 #include <BRepGProp.hxx>
@@ -43,6 +44,8 @@
 #include <BRepPrimAPI_MakeBox.hxx>
 #include <BRepPrimAPI_MakeCone.hxx>
 #include <BRepPrimAPI_MakeCylinder.hxx>
+#include <BRepPrimAPI_MakePrism.hxx>
+#include <BRepPrimAPI_MakeRevol.hxx>
 #include <BRepPrimAPI_MakeSphere.hxx>
 #include <BRepPrimAPI_MakeTorus.hxx>
 #include <BRepPrimAPI_MakeWedge.hxx>
@@ -1863,7 +1866,7 @@ void OCC_Internals::applyBooleanOperator
 }
 
 void OCC_Internals::_transform(const std::vector<std::pair<int, int> > &inDimTags,
-                               BRepBuilderAPI_Transform &tfo)
+                               BRepBuilderAPI_Transform *tfo)
 {
   for(unsigned int i = 0; i < inDimTags.size(); i++){
     int dim = inDimTags[i].first;
@@ -1873,12 +1876,12 @@ void OCC_Internals::_transform(const std::vector<std::pair<int, int> > &inDimTag
                  dim, tag);
       return;
     }
-    tfo.Perform(find(dim, tag), Standard_False);
-    if(!tfo.IsDone()){
+    tfo->Perform(find(dim, tag), Standard_False);
+    if(!tfo->IsDone()){
       Msg::Error("Could not apply transformation");
       return;
     }
-    bind(tfo.Shape(), dim, tag);
+    bind(tfo->Shape(), dim, tag);
   }
 }
 
@@ -1888,7 +1891,7 @@ void OCC_Internals::translate(const std::vector<std::pair<int, int> > &inDimTags
   gp_Trsf t;
   t.SetTranslation(gp_Pnt(0, 0, 0), gp_Pnt(dx, dy, dz));
   BRepBuilderAPI_Transform tfo(t);
-  _transform(inDimTags, tfo);
+  _transform(inDimTags, &tfo);
 }
 
 void OCC_Internals::rotate(const std::vector<std::pair<int, int> > &inDimTags,
@@ -1899,7 +1902,7 @@ void OCC_Internals::rotate(const std::vector<std::pair<int, int> > &inDimTags,
   gp_Ax1 axisOfRevolution(gp_Pnt(x, y, z), gp_Dir(ax, ay, az));
   t.SetRotation(axisOfRevolution, angle);
   BRepBuilderAPI_Transform tfo(t);
-  _transform(inDimTags, tfo);
+  _transform(inDimTags, &tfo);
 }
 
 void OCC_Internals::copy(const std::vector<std::pair<int, int> > &inDimTags,
diff --git a/Geo/GModelIO_OCC.h b/Geo/GModelIO_OCC.h
index 99bbd5182f..e0f8fdb00f 100644
--- a/Geo/GModelIO_OCC.h
+++ b/Geo/GModelIO_OCC.h
@@ -28,11 +28,12 @@ class ExtrudeParams;
 #include <TopTools_DataMapOfShapeInteger.hxx>
 #include <TopTools_DataMapOfIntegerShape.hxx>
 #include <TopTools_ShapeMapHasher.hxx>
-#include <BRepBuilderAPI_Transform.hxx>
-#include <BRepPrimAPI_MakePrism.hxx>
-#include <BRepPrimAPI_MakeRevol.hxx>
 #include <NCollection_DataMap.hxx>
 
+class BRepPrimAPI_MakePrism;
+class BRepPrimAPI_MakeRevol;
+class BRepBuilderAPI_Transform;
+
 class OCC_Internals {
  public:
   enum BooleanOperator { Union, Intersection, Difference, Section, Fragments };
@@ -82,7 +83,7 @@ class OCC_Internals {
 
   // apply a geometrical transformation
   void _transform(const std::vector<std::pair<int, int> > &inDimTags,
-                  BRepBuilderAPI_Transform &tfo);
+                  BRepBuilderAPI_Transform *tfo);
 
   // add circle or ellipse arc
   void _addArc(int tag, int startTag, int centerTag, int endTag, int mode);
-- 
GitLab