This study is to illustrate the function circle packing from mesh with its added options 25xFD03 (partial and Gen mesh).
now, with this function
- I get a triangular mesh with tangent incircles
- and in addition get easily the projection of the pedal centers of the triangles
- and also the modified (more harmonious) triangular mesh and its edges
It is important to model the soap film effect already, like few months ago.
This time, I made a try on smooth transition from a triangular mesh to its dual. it requires the same property! incircles must touch their neighbours.
here are the modeling details for a sphere surface. I hope I have enough time to make it on a more complex surface...
with few glitches to be solved later but more control on the mesh...
set the initial triangular mesh from a voronoi set of point on the sphere.
I got some troubles with voronoi on surface this time, so I used a workaround
- to intersect the surface with a standard voronoi
- get curve network vertices. it requires to use a group by tangency in order to avoid the surface Brep
- make the polyline from the vertices
- get the centers of the polylines
- generate mesh from the centers
the mesh is close to the dual mesh of the voronoi,so the mesh you get will be triangles
Optimize the mesh to make the incircles of the triangles tangent to each others.
this is to have common projection of the pedal centers between adjacent triangles. the projections will be used to rotate the edges and get a smooth transition between the triangular mesh and its dual.
just use Circle Packing from mesh with partial and Gen mesh (NEW 25xFD03!!! thank you RD)
Then you have as outpout the new mesh and the incircles only
Rotation of the triangle edges
- for all mesh vertex, get and group its the neighbouring edges,
- this is easy because you have the deformed mesh edges
- for all these edges, get the projection of the pedal center (center of the incircles)
- this is easy because you have the incircle
- group the projections and the edges that are around a vertex (for all vertices)
rotate the edges around the respective pedal center projections, around the axis which normal to the surface
Creation of the polygon of the dual mesh
- extrapol the rotated edges so that they will intersect after extrusion
- extrude them normal to the surface
- because it is not flat. there will be no intersection otherwise
- Create the intersections of the surfaces
- slice all the surfaces at all the intersections
- keep only the portions closest to the central vertex
- project the central vertex to all the portions
- keep the projections that succeed
- join them and intersect with original surface
Creation of the transition triangle
do the same as above from the set of edge of a triangle. it is grouped around a incircle.
