@@ -840,17 +840,22 @@ class ConverterOSG : public StatusCallback
840
840
double minFaceArea = eps;
841
841
bool dumpMeshes = false ;
842
842
GeomProcessingParams params (m_geom_settings, dumpMeshes);
843
- MeshOps::retriangulateMeshSetForExport (item_meshset, params);
844
- drawMeshSet (item_meshset, geode, crease_angle, min_triangle_area, false , disableBackfaceCulling);
843
+ PolyInputCache3D poly (0.001 );
844
+ MeshOps::retriangulateMeshSetForExport (item_meshset, poly, params);
845
+
846
+ std::map<std::string, std::string> mesh_input_options;
847
+ shared_ptr<carve::mesh::MeshSet<3 > > meshsetTriangulated (poly.m_poly_data ->createMesh (mesh_input_options, eps));
848
+
849
+ drawMeshSet (meshsetTriangulated, geode, crease_angle, min_triangle_area, false , disableBackfaceCulling);
845
850
846
851
if (m_render_crease_edges)
847
852
{
848
- renderMeshsetCreaseEdges (item_meshset , geode, m_crease_edges_max_delta_angle, m_crease_edges_line_width);
853
+ renderMeshsetCreaseEdges (meshsetTriangulated , geode, m_crease_edges_max_delta_angle, m_crease_edges_line_width);
849
854
}
850
855
851
856
if (m_draw_bounding_box)
852
857
{
853
- carve::geom::aabb<3 > bbox = item_meshset ->getAABB ();
858
+ carve::geom::aabb<3 > bbox = meshsetTriangulated ->getAABB ();
854
859
osg::ref_ptr<osg::Geometry> bbox_geom = new osg::Geometry ();
855
860
drawBoundingBox (bbox, bbox_geom);
856
861
geode->addDrawable (bbox_geom);
@@ -859,7 +864,7 @@ class ConverterOSG : public StatusCallback
859
864
#ifdef _DEBUG
860
865
// vec4 color(0.6f, 0.6f, 0.6f, 0.1f);
861
866
// GeomDebugDump::moveOffset(1);
862
- // GeomDebugDump::dumpMeshset(item_meshset , color, false, true, true);
867
+ // GeomDebugDump::dumpMeshset(meshsetTriangulated , color, false, true, true);
863
868
#endif
864
869
}
865
870
}
0 commit comments