Bert

public static class Bert
Fits a bicubic NURBS surface to an open mesh with a single boundary loop. The mesh is first flattened onto the unit square with a Tutte or mean value Laplacian, then the surface is found as the Riesz representative of the L2 pairing with the flattened mesh in the tensor-product B-spline basis, with the four corner control points pinned to the snapped corner vertices. Thin wrapper over RhBertFitSurface in cmdMathias.cpp (namespace Bert), reached through rhcommon_c; all linear algebra runs natively.

Methods

FitSurface

#
public static NurbsSurface FitSurface(Mesh mesh, Point3d c0, Point3d c1, Point3d c2, Point3d c3, int uCount, int vCount, bool meanValueWeights, List<Message> messages = null)
Fit a bicubic NURBS surface to an open mesh with a single boundary loop.
mesh (Mesh)Mesh to fit. Must be open with exactly one boundary loop.
c0 (Point3d)First corner. Each corner is snapped to the nearest mesh boundary vertex.
c1 (Point3d)Second corner.
c2 (Point3d)Third corner.
c3 (Point3d)Fourth corner.
uCount (int)Number of control points in the U direction (4 to 24).
vCount (int)Number of control points in the V direction (4 to 24).
meanValueWeights (bool)True for mean value Laplacian weights, false for uniform (Tutte) weights.
messages (List<Message> = null)Optional list receiving warnings and errors.
The fitted surface, or null. When null, messages contains an Error.