3 #include <Draw/OglMaterial.h> 4 #include <Draw/SurfaceStyle.h> 66 static pMesh triangulationToMesh(
pConstShape shape,
bool highQuality, std::vector<int>* newToOldFaceIdxMap = 0);
68 static pShape convertMesh2Shape(
pConstMesh mesh, std::vector<std::vector<Geom::Pnt>>& defectPolygons);
70 static pShape convertMesh2Solid(
pConstMesh aMesh,
bool prefer_stiching,
bool onlyClosedSolid,
bool mergePlanarFaces);
72 static pShape convertMesh2Polyhedral(
pConstMesh mesh, std::vector<std::vector<Geom::Pnt>>& defectPolygons);
74 static pShape convertMesh2Brep_by_Face_Stiching(
pConstMesh mesh, std::vector<std::vector<Geom::Pnt>>& defectPolygons);
76 static pShape convertMesh2Shell(
pConstMesh mesh, std::vector<std::vector<Geom::Pnt>>& defectPolygons);
80 static pMesh makeMesh(
const std::vector<Geom::Pnt>& nodes,
81 const std::vector<int>& model,
82 const std::vector<Geom::Pnt2d>& textureCoords,
83 const std::vector<int>& textureCoordIndices,
84 const std::vector<Geom::Pnt>& normals);
86 static pMesh makeMesh(
const std::vector<Geom::Pnt>& nodes,
const std::vector<int>& model);
89 static pMesh makeMesh(
const std::vector<Geom::Pnt>& nodes,
const std::vector<int>& model,
const std::vector<Geom::Pnt>& normals);
93 double scaleFactor = 1.,
94 bool terrain =
false);
97 std::vector<Geom::Pnt>& nodes,
98 std::vector<int>& model,
99 std::vector<Draw::SurfaceStyle>& surfaceStyles,
100 std::vector<int>& faceIndices,
101 std::vector<int>& surfaceStyleIndices,
102 std::vector<Geom::Pnt2d>& textureCoords,
103 std::vector<int>& textureCoordIndices,
104 std::vector<Topo::LineItem>* lineItems = 0);
106 static bool getCreaseAngle(
pConstMesh mesh,
float& angle);
114 #ifndef LXAPI // INTERFACES BELOW ARE -NOT- PART OF THE LEXOCAD API 122 std::map<std::string, Core::Variant>* properties,
123 bool forceTerrainFrom2dr);
126 static std::map<int, std::array<Core::Variant, 6>> getHorizontalPointsFromOMFFile(
Core::CoreDocument* doc,
129 std::map<std::string, Core::Variant>* properties,
130 const double& scaleFactor = 1.);
131 static std::map<int, std::array<Core::Variant, 4>> getVerticalPointsFromOMFFile(
Core::CoreDocument* doc,
133 std::map<std::string, Core::Variant>* properties,
134 const double& scaleFactor = 1.);
137 static void getModel(
pConstMesh mesh, std::vector<int>& model);
138 static void getPoints(
pConstMesh mesh, std::vector<Geom::Pnt>& points);
142 static void __setDefaultMeshTool__(
Topo::MeshTool* tool) { _defaultTool = tool; }
144 static bool writeOmfFile(
const std::vector<App::Element*>& elems,
const Base::String&
fileName);
146 static bool getInventorMeshColors(
pConstMesh mesh, std::vector<Base::Color>& uniqueColors, std::vector<std::string>* colorNames = 0);
155 virtual pMesh _triangulationToMesh(
pConstShape shape,
bool highQuality, std::vector<int>* newToOldFaceIdxMap);
158 virtual void _getModel(
pConstMesh mesh, std::vector<int>& model);
159 virtual void _getPoints(
pConstMesh mesh, std::vector<Geom::Pnt>& points);
165 std::map<std::string, Core::Variant>* properties,
166 bool forceTerrainFrom2dr);
167 virtual std::map<int, std::array<Core::Variant, 6>> _getHorizontalPointsFromOMFFile(
Core::CoreDocument* doc,
169 std::map<std::string, Core::Variant>* properties,
170 const double& scaleFactor);
171 virtual std::map<int, std::array<Core::Variant, 4>> _getVerticalPointsFromOMFFile(
Core::CoreDocument* doc,
173 std::map<std::string, Core::Variant>* properties,
174 const double& scaleFactor);
175 virtual bool _writeOmfFile(
const std::vector<App::Element*>& elems,
const Base::String&
fileName);
176 virtual bool _getInventorMeshColors(
pConstMesh mesh, std::vector<Base::Color>& uniqueColors, std::vector<std::string>* colorNames);
177 virtual pMesh _makeMesh(
const std::vector<Geom::Pnt>& nodes,
178 const std::vector<int>& model,
179 const std::vector<Geom::Pnt2d>& textureCoords,
180 const std::vector<int>& textureCoordIndices,
181 const std::vector<Geom::Pnt>& normals);
182 virtual pMesh _makeMesh(
const std::vector<Geom::Pnt>& nodes,
const std::vector<int>& model);
183 virtual pMesh _makeMesh(
const std::vector<Geom::Pnt>& nodes,
const std::vector<int>& model,
const std::vector<Geom::Pnt>& normals);
186 std::vector<Geom::Pnt>& nodes,
187 std::vector<int>& model,
188 std::vector<Draw::SurfaceStyle>& surfaceStyles,
189 std::vector<int>& faceIndices,
190 std::vector<int>& surfaceStyleIndices,
191 std::vector<Geom::Pnt2d>& textureCoords,
192 std::vector<int>& textureCoordIndices,
193 std::vector<Topo::LineItem>* lineItems = 0);
195 virtual bool _getCreaseAngle(
pConstMesh mesh,
float& angle);
Definition: MeshTool.h:29
A Utf-16 (windows) or ucs4 (unix) encoded string class.
Definition: String.h:23
Definition: CoreDocument.h:210
std::shared_ptr< const Geom::BrepData > pConstBrepData
Definition: BrepData.h:31
Draw::OglMaterial material
Definition: MeshTool.h:32
std::shared_ptr< Topo::MeshShape > pMesh
Definition: Shape.h:77
std::shared_ptr< Topo::Shape const > pConstShape
Definition: Variant.h:77
std::shared_ptr< Topo::MeshShape const > pConstMesh
Definition: Shape.h:92
Base::String fileName
Definition: CoreDocument.h:186
std::shared_ptr< Topo::Shape > pShape
Definition: Variant.h:76
std::vector< Geom::Pnt > points
Definition: MeshTool.h:31