Commit 07b6c89f by Christophe Geuzaine

change default surface representation to "cross", even for OpenCASCADE models;

this is a temporary workaround for a bug in OpenCASCADE, which fails to triangulate quite a few surfaces (it just hangs, which freezes our GUI)
parent 6cdf0295
Pipeline #164 passed with stage
in 9 minutes 18 seconds
......@@ -913,7 +913,7 @@ StringXNumber GeometryOptions_Number[] = {
"Display geometry surfaces?" },
{ F|O, "SurfaceNumbers" , opt_geometry_surfaces_num , 0. ,
"Display surface numbers?" },
{ F|O, "SurfaceType" , opt_geometry_surface_type , 2. ,
{ F|O, "SurfaceType" , opt_geometry_surface_type , 0. ,
"Surface display type (0=cross, 1=wireframe, 2=solid)" },
{ F|O, "Tangents" , opt_geometry_tangents , 0. ,
......
......@@ -56,10 +56,10 @@ static void draw_stl(std::vector<SPoint3> &vertices, std::vector<SVector3> &norm
{
GLint mode[2];
glGetIntegerv(GL_POLYGON_MODE, mode);
if(CTX::instance()->geom.surfaceType > 1)
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
else
if(CTX::instance()->geom.surfaceType == 1)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
else
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glEnable(GL_LIGHTING);
glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
glColor4ubv((GLubyte *) & CTX::instance()->color.geom.highlight[0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment