Join few spline curves into one?

Is it possible to convert few sequential splines (curves) on the surface edge info one resulting spline (curve)?

How to insert new resulting spline instead of sequence of spline in the CAD model?

Thank you in advance.

Le Pharaon's picture

Yep, it’s definitely possible to turn a few connected splines or curves along an edge into one continuous spline — you just need to use the right “join” and “fit” tools for your CAD software.

The basic process is:

Join the curves – make sure all spline endpoints actually touch (no gaps). Most programs have a Join or Combine Curves command for that.

Create a single smooth curve – use a Fit Spline, Rebuild, or Merge Curves tool to generate one continuous spline that runs through all the joined segments. You can usually control tolerance, degree, and smoothness here.

Check continuity – if you need a perfectly smooth (G1/G2) transition, use a continuity check or “match curve” tool to be sure everything flows cleanly.

Once you’ve got your new unified spline:

Hide or suppress the old ones first.

Insert or project the new spline back onto your surface or model edge (depending on what you’re working with).

Reassign any features or sketches that referenced the old curves — for example, lofts, sweeps, trims, etc.

When everything updates properly, you can delete the old splines.

For example, in SolidWorks you’d use:
Insert → Curve → Composite Curve to join them,
then Insert → Curve → Fit Spline to turn it into one clean, smooth curve.

Magnum Cluster's picture

As said by Le Pharaon it's possible to join curves using OCC. For example use this code snippet to concatenate 4 curves (aCurveA, aCurveB, aCurveC, aCurveD) that are at least G0 continuous:

bool ratio = true ;
int ErrorStatus = 0;
GeomConvert_CompCurveToBSplineCurve aComp( aCurveA ) ;

bool res = aComp.Add( aCurveB, Precision::Confusion(), true, ratio ) ;

if( !res )
{
ErrorStatus = 1 ;
return ErrorStatus;
}
res = aComp.Add( aCurveC, Precision::Confusion(), true, ratio ) ;
if( !res )
{
ErrorStatus = 1 ;
return ErrorStatus;
}
res = aComp.Add( aCurveD, Precision::Confusion(), true, ratio ) ;
if( !bb )
{
ErrorStatus = 1 ;
return ErrorStatus;
}

Handle(Geom_BSplineCurve) aConcatCurve = aComp.BSplineCurve() ;

Magnum

Michael Ermakov's picture

Dear @Le Pharaon and @Magnum Cluster thank you for your advices.
I agree with both of them. However, the simplest case for me became a use of heal-small-edges tool of Analysis Situs. It worked well (practically perfect) to join curves within edges. It was needed to generate qualitative surface mesh as an example for a CAE problem.

Mikhail Sazonov's picture

Hi Michael,

You can also look at the OCCT class ShapeUpgrade_UnifySameDomain. It automates inserting new resulting spline instead of sequence of spline in the CAD model.

Mikhail