Local reparametrisation of BSpline surfaces to enforce tangetiality

Hello, OCC community,

I have a question about handling of BSpline surfaces belonging to two adjacent faces.

As in, I have two faces, built from 2 specific BSpline surfaces (got from an approximation algorithm and 2 wires resulting from a projection of adjacent rectangular regions made of edges projected on these surfaces) (see http://www.ledentsov.de/lj/surf1.jpg)
As these surfaces might seem quite nice from the first look, strictly speaking, the adjacent faces are not C1 continuous, or even not C0 continuous (see gap http://www.ledentsov.de/lj/gap1.jpg).
How could I connect those two surfaces to make them C1 continuous? And (sorry for a beginner's question) in which way would the TopoDS_Face underlying geometry be accessed for this local reparametrisation? (I do not intend to approximate these two regions together, since they can be of rather complicated geometries). I have used sewed the two topological objects, delivering

Number of input shapes : 2
Number of actual shapes : 2
Number of Bounds : 8
Number of Sections : 8
Number of Edges : 7
Number of Vertices : 8
Number of Nodes : 6
Number of Free Edges : 6
Number of Contigous Edges : 1
Number of Multiple Edges : 0
Number of Degenerated Edges : 0
however, as you can see from the picture, the underlying geometries, naturally, haven't been modified

Formulating in one sentence: I have two face surfaces with a gap between them, that I have to connect smoothly to get one C1 surface or more strictly speaking, one edge with an underlying C1 continuous surface.

Thanks a lot in advance


Roman Lygin's picture

Hi Dmitry,

What is your final expectation ?
A single face lying on C1 continous surface (i.e. with a single boundary wire without your current contiguous edge) ?
Or two faces each lying on respective surfaces which intersect (or connect) in a such a way that they represent smooth continuation of each other ? Or a subset of this - each face lies on different parts of the same C1 surface ?

dled_25121's picture

In fact, I would like to keep separate faces, but have either two geometric surfaces tangent to each other, or as you propose - one geometric surface as a superset of both of these faces. I feel, two tangent surfaces would be better, since the shapes I need can be quite complex

Roman Lygin's picture

Hi Dmitry,

Sorry for not replying before - there was simply no chance to come back.
For the first method (two separate surfaces, what could help you is to reapproximate your surfaces specifying a tangency constraints along the common boundary. You could do so for example, by evaluating tangencies along the boundary on each surface first and then using an avarage value thereof.
However, note that this will still be rather G1 continuity (not C1), which only requires common tangency (not the module of the derivative).

For the second method (one common surface definition) you could also apply similar reapproximation method using control points and tangencies received after first approximations of two separate surfaces.

Note also that you will probably need to update edges of your faces (tolerances and/or pcurves) since distance from original 3D curves to new surface may change.

Hope this helps.
Roman Lygin

P.S. ShapeUpgrade_ShapeDivideContinuity can be used to improve continuity with a shape (but it works face by face).