gradientspace / geometry3Sharp

C# library for 2D/3D geometric computation, mesh algorithms, and so on. Boost license.
http://www.gradientspace.com
Boost Software License 1.0
1.69k stars 380 forks source link

Some hints on implementing stamp tool similar to meshmixer #9

Closed saedrna closed 6 years ago

saedrna commented 6 years ago

Hi Ryan,

I would like to create a tool, in the future, for fixing meshes produced from aerial image reconstruction, e.g. Autodesk 123D, Pix4d or Bentley ContextCapture. A major issue is to create simple windows on the facades and I have found the stamp tool in meshmixer to be very helpful: Create a rectangle stamp on the window area -> offset a little outward for the windowsill -> extrude the windowsill.

The first thing is the stamp operation, I still have no idea on how to do it. It seems the edge of the stamp is spilt into several segments and of course the intersections between stamp and mesh edges are also considered.

Would you give me some hints on this? And again thanks for this awesome library.

Han

rms80 commented 6 years ago

I can't tell you exactly how the mm Stamp tool works, but similar operations were presented in this paper: http://www.dgp.toronto.edu/~rms/pubs/SurfaceTreeEG08.html and my PhD thesis: http://www.dgp.toronto.edu/~rms/pubs/PhDThesis10.html

also the demo software that eventually became meshmixer is open-source (although you need visual studio 2008 to build it, unless you update the third-party libs): http://www.dgp.toronto.edu/~rms/software/DragDropTool/index.html

I recently added an implementation of the Discrete Exponential Map to g3Sharp, which these are based on. But I don't have constrained delaunay triangulation, which they also used.

saedrna commented 6 years ago

Thanks for the information. If I remembered correctly, I think the discrete exponential map is mentioned in the GeoBrush paper. Because I'm new to interactive mesh editing, I thought this is straight forward, but it turns out maybe more background knowledge is required. I'll look into it first.