X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHEXABLOCK%2FHexNewShape.cxx;h=fc4e23f64fe148e0418e5a54950b2dee073398ef;hb=b226934c20469bf67d940e79062230aff91c0b94;hp=301852657e908b2567f1b3393e27bdf89398d223;hpb=175cce9a07f43a5d440082133ef76bd949c97145;p=modules%2Fhexablock.git diff --git a/src/HEXABLOCK/HexNewShape.cxx b/src/HEXABLOCK/HexNewShape.cxx index 3018526..fc4e23f 100755 --- a/src/HEXABLOCK/HexNewShape.cxx +++ b/src/HEXABLOCK/HexNewShape.cxx @@ -1,12 +1,12 @@ // C++ : Gestion des Shapes (Hexa v5) -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D +// Copyright (C) 2009-2016 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -17,8 +17,8 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ -// or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #include "HexNewShape.hxx" #include "HexSubShape.hxx" @@ -55,6 +55,7 @@ #include #include +#include BEGIN_NAMESPACE_HEXA @@ -178,8 +179,12 @@ int NewShape::transfoShape (Matrix& matrice, SubShape* shape) gp_Trsf transfo; double a11,a12,a13,a14, a21,a22,a23,a24, a31,a32,a33,a34; matrice.getCoeff (a11,a12,a13,a14, a21,a22,a23,a24, a31,a32,a33,a34); +#if OCC_VERSION_LARGE > 0x06070100 + transfo.SetValues (a11,a12,a13,a14, a21,a22,a23,a24, a31,a32,a33,a34); +#else transfo.SetValues (a11,a12,a13,a14, a21,a22,a23,a24, a31,a32,a33,a34, Epsil2, Epsil2); +#endif TopoDS_Shape shape_orig = shape->getShape (); BRepBuilderAPI_Transform builder (shape_orig, transfo, Standard_True); @@ -463,6 +468,14 @@ int NewShape::saveBrep () fclose (fic); return HOK; } +// ===================================================== getBrep +cpchar NewShape::getBrep () +{ + int ier = updateBrep (); + if (ier != HOK) + return NULL; + return geo_brep.c_str(); +} // ====================================================== saveXml void NewShape::saveXml (XmlWriter* xml) {