Constrained filling (PLATE)

Quaoar

Administrator
Staff member
@Jojain Awesome job, kudos!

Reading it I realized that I have absolutely no idea about NLPlate, which seems to be unused in OpenCascade itself. Currently I use Plate for gap filling and face merging, but both problems are interpolatory in principle and can be solved well on quite moderate number of pinpoint constraints. Also, as some experiments show, switching to modern libraries like Eigen for solving the formulated linear systems is a huge improvement by itself, so we can possibly make a fork for Plate + Eigen (if that makes any sense).

Another question is how many of these ideas (the ones presented in this document) saw the light of day before the development was abandonned. We'd need to do some housekeeping job to see what really works and what doesn't.
 

Quaoar

Administrator
Staff member
I came across this topic from McNeel's forum where xNURBS plugin for Rhino is being discussed: https://discourse.mcneel.com/t/xnurbs-releases-a-ground-breaking-nurbs-software/49049/274

This topic does not shed much light on the theoretical aspects of constraint filling, but for me, it was an exciting reading. The most interesting piece of that is the comments by Rhino users, who seem to be doing professional surfacing, including class A for automotive. Their conversation with the xNURBS developer(s?) is worth reading as it demystifies the marketing bs around the variational surface filling. Few points that I marked for myself:
  1. The class-A surfaces are most of the time low-poles Bezier as you might want to control the shape after it was constructed. High-complexity splines would not allow this. Therefore, if what you're doing is some car body design, then such tools as variational constrained filling are of limited use (corner filling and class-B surfaces are still Ok to be done with them).
  2. xNURBS is all about trimmed surfaces, they seem to disrespect 4-sided Coons-like patches saying it's an "old technology" (however, other folks seem not to agree with that statement). Therefore, adopting a variational surface builder would require supplementary curve projections/approximations, and here we're good to go with OpenCascade.
  3. xNURBS is good for patch filling, but it's not class A. Since the principle behind OpenCascade's Plate is the same variational method, the algorithms look quite similar, and Plate is unlikely to be class A as well. Especially given that Plate is interpolation and not an approximation (unlike PlateFE which is not open-sourced). Still, a good variational algorithm should unlikely target this "class A" market as constructing high-quality surfaces for the areas like automotive is a) a niche thing; b) a highly manual process.
  4. "Static highlights" are better than dynamic zebra according to one of the guys (Tom) on the forum. That's just something that I personally wanted to hear ;) Btw, everything that was written by Tom is worth reading. He identified the approach by xNURBS as somewhat similar to "mesh relaxation."
  5. Many models are dirty, and a good filling solution should deal with inaccuracies. If you have a perfect layout of patches, you might not even need a constrained filling algorithm. If your tool works only for accurate curve/patch layout, you're probably developing an "academic" product and not a commercial one. That's a banality, but even some commercial players seem hardly understand it.
And I couldn't resist bringing this here (why the hell Russians are to blame? :D):

The “somehow and sometimes rude approach of Xnurbs”. I wonder if they’re Russians.
Exact same attitude of another Russian developer (fStorm) delivering an outstanding product, but definitely unpolite and missing most of common marketing principles
 
Last edited:

Quaoar

Administrator
Staff member
The only reference given by xNURBS dev is this one: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.85.5865&rep=rep1&type=pdf
(its author George Celniker is btw a CTO of SMLib company).

But it came with an attitude like "only students write papers," so I doubt that they really followed any of the published approaches. Still, after spending the entire morning trying to find the roots of this package, I think that they do not try to oversimplify things. I.e., probably they are not using quadratic bending energy that leads to solving linear systems in one pass:

"xNurbs is a non-linear system. I guess that you don’t understand the difference between a linear system and a non-linear system." (source)
"It would just be a lie for anyone who claims that a linear surfacing tool can produce a better quality surface than a non-linear surfacing tool."
...
"xNURBS supports degree 1 up to degree 20."

If what they are doing is finite elements, then it should be similar to the PlateFE commercial package of OCC. I'll go through the posted paper to see if I could understand anything from it.

@A-U, are still looking into this? Will be interesting to know about your progress.

Update: another paper mentioned at McNeel's: https://www.cad-journal.net/files/vol_11/CAD_11(4)_2014_369-380.pdf (seems to be linear)
 
Last edited:

A-U

Active CAD practitioner
Not a lot. Papers of Xiaodong Liu did indeed caught my attention. If I ever am going to do something like this I'll indeed try an optimization like approach with soft constraints and look into optimizing parametrization too.
 

A-U

Active CAD practitioner
To be more specific, this is the most interesting paper:

Liu, Xiaodong. "Filling N-sided holes with trimmed B-spline surfaces based on energy-minimization method." Journal of Computing and Information Science in Engineering 15.1 (2015).

Another approach that would be nice to try (or maybe even combine with the former):

Shi, K-L., et al. "Polar NURBS surface with curvature continuity." Computer Graphics Forum. Vol. 32. No. 7. 2013.
 

xuzhongxing

Looking around for some CAD
The algorithm used in occt plate module is the thin-plate spline basis function interpolation described in the book Scattered Data Approximation by Professor Wendland.

With that theory in mind, the code is less obscure to read. The most esoteric function in the module is the Plate_Plate::SolEm(). This function is actually computing the symbolic partial derivative of the thin plate spline basis function, which can be reproduced by the following sympy code:

Python:
from sympy import *
from sympy import *

U, V, m = symbols('U V m', real=True)
R = symbols('R', real=True)

f = (U**2+V**2)**(m-1) * log(U**2+V**2)

pd10 = diff(f, U)

result = simplify(factor(pd10))

print(result)

pd11 = diff(f, U, V)

result = simplify(factor(pd11))
print(result)

pd20 = diff(f, U, U)

result = simplify(factor(pd20.subs(V**2, R-U**2)))

print(result)

pd21 = diff(f, U, U, V)

result = simplify(factor(pd21.subs(V**2, R-U**2)))

print(result)

pd60 = diff(f, U, U, U, U, U, U)

result = simplify(factor(pd60.subs(V**2, R-U**2)))

print(result)

U, V, m = symbols('U V m', real=True)
R = symbols('R', real=True)

f = (U**2+V**2)**(m-1) * log(U**2+V**2)

pd10 = diff(f, U)

result = simplify(factor(pd10))

print(result)

pd11 = diff(f, U, V)

result = simplify(factor(pd11))
print(result)

pd20 = diff(f, U, U)

result = simplify(factor(pd20.subs(V**2, R-U**2)))

print(result)

pd21 = diff(f, U, U, V)

result = simplify(factor(pd21.subs(V**2, R-U**2)))

print(result)

pd60 = diff(f, U, U, U, U, U, U)

result = simplify(factor(pd60.subs(V**2, R-U**2)))

print(result)

I wrote some notes when I was reading this part of the code. Unfortunately they are in Chinese. Nevertheless, the equations are recognizable.


Some additional references:

[1] Robert L. Harder and Robert N. Desmarais. Interpolation using surface
splines. Journal of Aircraft, 9, 1972.
[2] Nira Dyn. Interpolation of scattered data by radial functions. In Topics
in Multivariate Approximation. 1987.
[3] Jean Duchon.
Splines minimizing rotation-invariant semi-norms in
sobolev spaces. In Constructive Theory of Functions of Several Vari-
ables. 1972.
[4] Gregory E. Fasshauer. Meshfree Approximation Methods with MATLAB.
World Scientific, 2007.
[5] S. K. Lodha and R. Franke. Scattered data techniques for surfaces. In
Scientific Visualization Conference (dagstuhl ’97). 1997.
[6] Wu Zongmin. Hermite-Birkhoff interpolation of scattered data by radial
basis functions. Approximation Theory and its Applications, 8, 1992.
[7] A practical guide to radial basis functions.
[8] Holger Wendland. Scattered Data Approximation. Cambridge University
Press, 2005.
 
Last edited:
Top