Replies: 2 comments 13 replies
-
No, that make_shared call copies the underlying vectors. |
Beta Was this translation helpful? Give feedback.
-
Floats must be good for realtime graphics, but for CAD-like stuff doubles are mandatory. So I switched to the Manifold while keeping old CGAL functional in some places. The speed improvement is roughly 3700 times for the booleans, plus robustness. The memory issues was on my side, I fixed most of them. So this new MeshGL6432 works fine. |
Beta Was this translation helpful? Give feedback.
-
Scallop sample contains this function:
Manifold Scallop()
There is
MeshGL64 scallop;
declaration inside. The "scallop" is the structure's instance created on a stack, it contains several std::vector inside.
At the end of the function I see this function call:
return Manifold::Smooth(scallop, sharpenedEdges);
Which handles the scallop like this:
std::shared_ptr impl = std::make_shared(meshGL);
So, it creates pointer "impl" to original "MeshGL64 scallop" created on a stack and returns Manifold(impl).
Then, after original function "Manifold Scallop()" is done, all stack-created instances are deleted.
Including "MeshGL64 scallop;" , pointer to which is returned.
Does this makes sense?
Beta Was this translation helpful? Give feedback.
All reactions