How to create a Periodic BSpline Surface with Geom_BSpline Surface ?

Hello,

I am trying to create a BSpline Surface from its definition data (e.g.: poles, weights, knots, mults, etc...) which I extract from a STEP file via a different library (not OpenCASCADE).

Every time the input data refers to a PERIODIC and RATIONAL BSpline Surface, an exception is raised telling me that the input parameters are wrong (Construction_Error). More specifically, it complains about the Multiplicies table (which has a value > degree).

The header of the class Geom_BSplineSurface describes how to create the tables of KNOTS and MULTIPLICIES for the NON-PERIODIC case. However, for the PERIODIC surfaces it just says that "the data structure tables for a periodic BSpline surface are more complex than those of a non-periodic one".

Unfortunately, this description does not clarify the things.

Does anyone have an idea on how the input data should be organized?

PS: Maybe that's not the most appropriate approach, but I'm actually depending on that external library to get the needed data for surface creation...

Thanks a lot in advance.

Best regards,
Fernando

Pawel's picture

Hi Fernando,

below a couple of observations on periodic BSpline curves. However, they should be applicable for surfaces also.

Remember, for each spline you have to satisfy the equation: m = n + p + 1, where
m + 1 is the number of the knots (each knot counted separately, no multiplicity)
n + 1 is the number of control points
p is the curve degree

The OCC documentation says (for Geom_BSplieCurve):
Knot(i+k) = Knot(i) + period
Pole(i+p) = Pole(i)
so you have to exclude the repeating control point from the description of the spline and the 'redundant' knots. Then it will work.

I hope this clarifies a bit. This has to be applicable for surfaces too.

If you need an example:
- download Total Engineer: http://www.tes-cax.de/index-en/download.html
- install and run the scripts: 'cs_script_add_curves.cs' or 'cs_script_add_shapes.cs'
- in the TopologyExplorer pick a sphere or a circle -> right-click -> Convert to Nurbs
- in the PropertiesExplorer you can 'see' the OCC structure of the spline curve/surface.

Hope this helps
Pawel