//
// CC++ : Fonctions Interface Cascade
//
-// 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
//
#include "HexKas_functions.hxx"
-
-#ifndef NO_CASCADE
+// #include "HexEdge.hxx"
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <gp_Pnt.hxx>
+#include <sstream>
+
BEGIN_NAMESPACE_HEXA
// ====================================================== same_coords
pz = g_point.Z();
return HOK;
}
-END_NAMESPACE_HEXA
+// ====================================================== clear_associations
+// void clear_associations (Edge* edge)
+// {
+ // edge->clearAssociation();
+ // edge->getVertex(V_AMONT)->clearAssociation();
+ // edge->getVertex(V_AVAL )->clearAssociation();
+// }
+// ====================================================== clean_brep
+void clean_brep (string& brep)
+{
+ TopoDS_Shape shape;
+ BRep_Builder builder;
+ istringstream stream_brep (brep);
-#else // *************************************************** NO_CASCADE
+ BRepTools::Read (shape, stream_brep, builder);
+ BRepTools::Clean (shape);
-BEGIN_NAMESPACE_HEXA
-int geom_brep2point (rcstring b, double& x, double& y, double& z) {return HOK;}
-int geom_brep2shape (rcstring brep, TopoDS_Shape& shape) {return HOK ; }
-TopoDS_Shape geom_brep2shape (rcstring brep) {return O ; }
+ ostringstream stream_shape;
+ BRepTools::Write (shape, stream_shape);
+ brep = stream_shape.str();
+}
END_NAMESPACE_HEXA
-#endif