diff --git a/3d-viewer/3d_rendering/3d_render_ogl_legacy/clayer_triangles.cpp b/3d-viewer/3d_rendering/3d_render_ogl_legacy/clayer_triangles.cpp index 246b434779..76eea8aa32 100644 --- a/3d-viewer/3d_rendering/3d_render_ogl_legacy/clayer_triangles.cpp +++ b/3d-viewer/3d_rendering/3d_render_ogl_legacy/clayer_triangles.cpp @@ -224,7 +224,6 @@ void CLAYER_TRIANGLES::AddToMiddleContourns( const std::vector< SFVEC2F > &aCont if( aThroughHoles && aThroughHoles->IntersectAny( RAYSEG2D( v0, v1 ) ) ) continue; else - //if( aThroughHoles && aThroughHoles->IntersectAny( RAYSEG2D( v0, v1 ) ) ) { std::lock_guard lock( m_middle_layer_lock ); m_layer_middle_contourns_quads->AddQuad( SFVEC3F( v0.x, v0.y, zTop ), diff --git a/3d-viewer/3d_rendering/3d_render_raytracing/accelerators/ccontainer2d.cpp b/3d-viewer/3d_rendering/3d_render_raytracing/accelerators/ccontainer2d.cpp index 7b5b4a11aa..0134bc2aa2 100644 --- a/3d-viewer/3d_rendering/3d_render_raytracing/accelerators/ccontainer2d.cpp +++ b/3d-viewer/3d_rendering/3d_render_raytracing/accelerators/ccontainer2d.cpp @@ -276,12 +276,13 @@ void CBVHCONTAINER2D::BuildBVH() if( m_isInitialized ) destroy(); + m_isInitialized = true; + if( m_objects.empty() ) { return; } - m_isInitialized = true; m_Tree = new BVH_CONTAINER_NODE_2D; m_elements_to_delete.push_back( m_Tree );