3 #include <Draw/OglMaterial.h> 4 #include <Draw/SurfaceStyle.h> 68 static pMesh triangulationToMesh(
pConstShape shape,
bool highQuality, std::vector<int>* newToOldFaceIdxMap = 0);
70 static pShape convertMesh2Shape(
pConstMesh mesh, std::vector<std::vector<Geom::Pnt>>& defectPolygons);
72 static pShape convertMesh2Solid(
pConstMesh aMesh,
bool prefer_stiching,
bool onlyClosedSolid,
bool mergePlanarFaces);
74 static pShape convertMesh2Polyhedral(
pConstMesh mesh, std::vector<std::vector<Geom::Pnt>>& defectPolygons);
76 static pShape convertMesh2Brep_by_Face_Stiching(
pConstMesh mesh, std::vector<std::vector<Geom::Pnt>>& defectPolygons);
78 static pShape convertMesh2Shell(
pConstMesh mesh, std::vector<std::vector<Geom::Pnt>>& defectPolygons);
82 static pMesh makeMesh(
const std::vector<Geom::Pnt>& nodes,
83 const std::vector<int>& model,
84 const std::vector<Geom::Pnt2d>& textureCoords,
85 const std::vector<int>& textureCoordIndices);
87 static pMesh makeMesh(
const std::vector<Geom::Pnt>& nodes,
const std::vector<int>& model);
91 double scaleFactor = 1.,
92 bool terrain =
false);
95 std::vector<Geom::Pnt>& nodes,
96 std::vector<int>& model,
97 std::vector<Draw::SurfaceStyle>& surfaceStyles,
98 std::vector<int>& faceIndices,
99 std::vector<int>& surfaceStyleIndices,
100 std::vector<Geom::Pnt2d>& textureCoords,
101 std::vector<int>& textureCoordIndices,
102 std::vector<Topo::LineItem>* lineItems = 0);
104 static bool getCreaseAngle(
pConstMesh mesh,
float& angle);
112 #ifndef LXAPI // INTERFACES BELOW ARE -NOT- PART OF THE LEXOCAD API 120 std::map<std::string, Core::Variant>* properties,
121 bool forceTerrainFrom2dr);
124 static std::map<int, std::array<Core::Variant, 6>> getHorizontalPointsFromOMFFile(
Core::CoreDocument* doc,
127 std::map<std::string, Core::Variant>* properties,
128 const double& scaleFactor = 1.);
129 static std::map<int, std::array<Core::Variant, 4>> getVerticalPointsFromOMFFile(
Core::CoreDocument* doc,
131 std::map<std::string, Core::Variant>* properties,
132 const double& scaleFactor = 1.);
135 static void getModel(
pConstMesh mesh, std::vector<int>& model);
136 static void getPoints(
pConstMesh mesh, std::vector<Geom::Pnt>& points);
140 static void __setDefaultMeshTool__(
Topo::MeshTool* tool) { _defaultTool = tool; }
142 static bool writeOmfFile(
const std::vector<App::Element*>& elems,
const Base::String&
fileName);
144 static bool getInventorMeshColors(
pConstMesh mesh, std::vector<Base::Color>& uniqueColors, std::vector<std::string>* colorNames = 0);
153 virtual pMesh _triangulationToMesh(
pConstShape shape,
bool highQuality, std::vector<int>* newToOldFaceIdxMap);
156 virtual void _getModel(
pConstMesh mesh, std::vector<int>& model);
157 virtual void _getPoints(
pConstMesh mesh, std::vector<Geom::Pnt>& points);
163 std::map<std::string, Core::Variant>* properties,
164 bool forceTerrainFrom2dr);
165 virtual std::map<int, std::array<Core::Variant, 6>> _getHorizontalPointsFromOMFFile(
Core::CoreDocument* doc,
167 std::map<std::string, Core::Variant>* properties,
168 const double& scaleFactor);
169 virtual std::map<int, std::array<Core::Variant, 4>> _getVerticalPointsFromOMFFile(
Core::CoreDocument* doc,
171 std::map<std::string, Core::Variant>* properties,
172 const double& scaleFactor);
173 virtual bool _writeOmfFile(
const std::vector<App::Element*>& elems,
const Base::String&
fileName);
174 virtual bool _getInventorMeshColors(
pConstMesh mesh, std::vector<Base::Color>& uniqueColors, std::vector<std::string>* colorNames);
175 virtual pMesh _makeMesh(
const std::vector<Geom::Pnt>& nodes,
176 const std::vector<int>& model,
177 const std::vector<Geom::Pnt2d>& textureCoords,
178 const std::vector<int>& textureCoordIndices);
179 virtual pMesh _makeMesh(
const std::vector<Geom::Pnt>& nodes,
const std::vector<int>& model);
182 std::vector<Geom::Pnt>& nodes,
183 std::vector<int>& model,
184 std::vector<Draw::SurfaceStyle>& surfaceStyles,
185 std::vector<int>& faceIndices,
186 std::vector<int>& surfaceStyleIndices,
187 std::vector<Geom::Pnt2d>& textureCoords,
188 std::vector<int>& textureCoordIndices,
189 std::vector<Topo::LineItem>* lineItems = 0);
191 virtual bool _getCreaseAngle(
pConstMesh mesh,
float& angle);
#define TOPO_EXPORT
Definition: topo_defines.h:8
Definition: MeshTool.h:31
A Utf-16 (windows) or ucs4 (unix) encoded string class.
Definition: String.h:29
Definition: CoreDocument.h:197
std::shared_ptr< const Geom::BrepData > pConstBrepData
Definition: BrepData.h:37
Draw::OglMaterial material
Definition: MeshTool.h:34
std::shared_ptr< Topo::MeshShape > pMesh
Definition: Shape.h:78
std::shared_ptr< Topo::Shape const > pConstShape
Definition: Variant.h:81
std::shared_ptr< Topo::MeshShape const > pConstMesh
Definition: Shape.h:93
Base::String fileName
Definition: CoreDocument.h:161
std::shared_ptr< Topo::Shape > pShape
Definition: Variant.h:80
std::vector< Geom::Pnt > points
Definition: MeshTool.h:33