Hello!
I’ve been working on a quad mesher, and a prototype version is now available in the latest WIP. Please try it out!
The command name is QuadMesh
Note: The quad mesher still needs a lot of work. Expect to get models that are partially broken in some places, and expect to have to fiddle with the options in order to get most out of the command for now.
What you can expect:
- Turn breps, extrusions and meshes into pure quad meshes
- Quads can be oriented along the principal curvature directions of the surface.
- Creating a quad mesh from a general surface is computationally very demanding. Expect run times ranging from a second to tens of seconds to several minutes depending on the complexity and size of the model.
- Using a mesh as input has been tested much less than brep/extrusion input, so expect less robustness here.
Suggestions:
- Try small and simple object first, and if successful move on to more challenging objects.
- Make sure the target quad edge length is small enough to fit between nearby singularity points.
- If the quad mesher fails and the resulting quad mesh has holes in it, try reducing the quad edge length.
Things to avoid for now:
- Models with cone-shaped features where the tip of the cone is sharp and is a single point/vertex. These are tricky for a number of reasons, and are not supported very well at the moment.
Below you can find more in-depth documentation and an explanation of what the QuadMesh command options do.
QuadMesh
QuadMesh is a command that creates a quad mesh from a brep, extrusion or mesh. The result is a pure quad mesh, which means it contains only quads. The size and alignment of a specific quad is determined by the local curvature of the surface at the quad’s location.
In order to be able to compute the quad layout, a direction field needs to be defined over the surface. This direction field can be aligned along the principal curvature directions of the surface in order to best approximate the shape of the original surface.
When the QuadMesh command is executed, the user is presented with the direction field on the surface of the input object. The user can adjust parameters to change the way the direction field flows on the surface. In addition to the direction field, singularity points of the field are also shown. Singularity points are locations on the mesh which will become valence 3 or valence 5 vertices in the resulting quad mesh. By adjusting parameters the locations of the singularity points may change and possibly end up in more appropriate locations.
QuadMesh command options
QuadEdgeLength - This parameter controls the preferred quad edge length. The final length of quad edges can still be smaller or larger than this value.
CurvatureAlignmentThreshold - This parameter controls which parts of the direction field point along the principal curvatures. The value is a percentage of the range of curvature values to use as alignment. For example, a value of 50 would take 50% of the largest curvature values on the surface and force the direction field to align to it. The rest of the field is determined by interpolation.
FieldInterpolation ( SmoothAndSlow | UnevenAndFast ) - This option controls the method for how to interpolate direction field values. SmoothAndSlow uses a more sophisticated algorithm to interpolate directions smoothly, while UnevenAndFast interpolates the directions very coarsely.
FieldAlignToSeams ( Yes | No ) - Controls whether the direction field is forced to be aligned along seams.
QuadAlign ( Crease | CreaseAndSeam ) - Controls whether quad edges will be aligned to creases and seams.
Cancel - Cancels the command.
Update - Updates the visual feedback based on new parameter values.
Create - Creates the quad mesh.
Some examples of successful results:
It can require a lot of fiddling with the options to get quad meshes like the ones above. There’s still a lot of work to be done in making the command more robust, so for now, expect things to fail quite often.
Please go ahead and try it! (Command name QuadMesh
)
-David