X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FOCC2VTK%2FOCC2VTK_Tools.h;h=1364cf491163815ef3004632f8ed9b70335a33d8;hb=f312091eb5bf90096c0a8d4d0ed4be68f34fbd9b;hp=96735961756410808eb0b9c0f1a73e3170b557c0;hpb=73555c78ebf12a1fdb85157b8e7934ad566ae90a;p=modules%2Fgeom.git diff --git a/src/OCC2VTK/OCC2VTK_Tools.h b/src/OCC2VTK/OCC2VTK_Tools.h index 967359617..1364cf491 100755 --- a/src/OCC2VTK/OCC2VTK_Tools.h +++ b/src/OCC2VTK/OCC2VTK_Tools.h @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE // // 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 @@ -25,26 +25,44 @@ #include #include +class GEOM_VertexSource; class GEOM_EdgeSource; class GEOM_WireframeFace; class GEOM_ShadingFace; +class vtkPolyData; namespace GEOM { - // moved from GEOM_AssemblyBuilder - OCC2VTK_EXPORT void MeshShape(const TopoDS_Shape theShape, - float& theDeflection, - bool theForced = true); - - // moved from GEOM_Actor - OCC2VTK_EXPORT void SetShape(const TopoDS_Shape& theShape, - const TopTools_IndexedDataMapOfShapeListOfShape& theEdgeMap, - bool theIsVector, - GEOM_EdgeSource* theIsolatedEdgeSource, - GEOM_EdgeSource* theOneFaceEdgeSource, - GEOM_EdgeSource* theSharedEdgeSource, - GEOM_WireframeFace* theWireframeFaceSource, - GEOM_ShadingFace* theShadingFaceSource); + /*! + * \brief Convert shape to the VTK data sources + * \param theShape shape + * \param theEdgeMape map that stores face-to-edge relations + * \param theIsVector boolen flag, when \c true causes generating additional + * dataset for edges orientation vectors + * \param theStandaloneVertexSource output standalone vertices data source + * \param theIsolatedEdgeSource output standalone edges data source + * \param theOneFaceEdgeSource output face edges data source + * \param theSharedEdgeSource output face shared edges data source + * \param theWireframeFaceSource output wireframe mode faces data source + * \param theShadingFaceSource output shading mode faces data source + */ + OCC2VTK_EXPORT void ShapeToVTK( const TopoDS_Shape& theShape, + const TopTools_IndexedDataMapOfShapeListOfShape& theEdgeMap, + bool theIsVector, + GEOM_VertexSource* theStandaloneVertexSource, + GEOM_EdgeSource* theIsolatedEdgeSource, + GEOM_EdgeSource* theOneFaceEdgeSource, + GEOM_EdgeSource* theSharedEdgeSource, + GEOM_WireframeFace* theWireframeFaceSource, + GEOM_ShadingFace* theShadingFaceSource ); + + /*! + * \brief Get VTK mesh data from the shape + * \param theShape shape + * \param theDeflection requested deflection coefficient + * \return VTK data set + */ + OCC2VTK_EXPORT vtkPolyData* GetVTKData( const TopoDS_Shape& theShape, float theDeflection ); } #endif // OCC2VTK_TOOLS_H