I’ve struggled with one mesh topology modification problem for a long time. My question is simple: modify an existing ON_Mesh object instead of replacing old mesh object with new mesh.
My persudo code is listed as following:
m_pMesh = const_cast<ON_Mesh*>(pMeshObj->Mesh());
m_Topology = new ON_MeshTopology(m_pMesh->Topology());
My question is about the third line( it can’t pass compiling). I’ve searched opennurbs_mesh.h and found the copy construction and operator = overload functions are decleared as private.
In fact, I want to modify the mesh’s topology, so I need the raw topology firstly and also need add or remove some items in the topology to modify ON_Mesh (dynamically searching topology of ON_Mesh and modify ON_Mesh by the modified topology). But I can’t find a simple way to copy the mesh’s raw topology.
Any suggestion is welcome.