利用者:Witt/GSoC2017/Reports/weekly12
目次
Weekly Report #12 - Silhouette Operator
One week and ~800 Lines of code later all features are in. Now I will work on fixing Bugs and write the documentation. I invested a lot of extra time this week so a lot has been done:
Calculating interior and exterior vertices
Based on the intersection ring and the surface normals i developed a method to calculate whether vertices are inside the original mesh or outside. This also takes multiple rings into account supporting complex intersections. (3ab49cae0e8c) (fa86bbb05428)
Flooding Bugs
The method to calculate the vertices depends on a continuous intersection ring. Otherwise there is no in/outside. I tried two intersection methods and different tolerances. I was able to improve it but errors still occur. Turns out: Cross PBVH-Node intersections have faulty bounding boxes. I can track this down to another bug I tried fixing last week but wasn’t successful yet. (4c567c578ab1)
After that I collected and copied all necessary data for final geometry generation. For the fillets I only need the two edge loops and the exact points on the intersection. (30aea5e13e74)
Generating the fillet geometry
The fillet geometry is generated in 3 steps:
- Find a “smooth” triangulation mapping between the two loops
- Calculate an intermediate step on the exact intersection
- Generate verts/edges/loops/polys
Step one took by far the longest time. I designed an Algorithm which decides a smooth triangulation dependent on multiple aspects.
- Orientation, 180° should be connected to 180° on both rings
- Position, closest points should be connected
- Order, no crossing, maximise points connected
Depending on the triangulation the closest points on the exact intersection are calculated. With this results new vertices are added and edges, loops, polys with it. (d0cb5c8fd964) (b0b11017166f) (30d32fa602e2)
Clipping functionality
I added a subtract mode to the operator! Since the Silhouette intersection calculates which parts are on the inside and which are on the outside, flipping in and out results in a subtract mode. So with just a flip of a bool the silhouette operator now supports a “clipping brush” like behaviour. (b77d3ecb5c94)
I created a small gif which demonstrates the new methods:
Bugs
A lot of new code means a lot of new bugs. The operator rarely works currently. Now I will work as hard as possible to resolve bugs. Two or three big bugs are currently invalidating almost every second stroke. If I resolve those I expect the operator to run better.
So next week bug fixing and documentation!