Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forum
Open Source community
Training and e-learning
A la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forum / Curvature and tangency continous intermediate curve

Forum

Curvature and tangency continous intermediate curve
maschimaen2010/08/15 15:33
I am facing the problem to generate a curve in between two existing BSpline-curves, which takes the first AND SECOND derivative as boundary condition. Is there a method in OpenCascade which provides this functionality or any ideas how to deal with this problem?

The situation is shown in the attached figure.

Thank you very much for your help!

You have to be logged in to download the attached file
maschimaen2010/08/25 11:52
I guess a proper name for the needed curve would be "blending curve"?! I was looking around in BRepBlend but could not found the needed method.

Aren't there any suggestions to connect two curves with a third curve with a curvature continuous transition?
haowei2010/08/25 16:57
try FairCurve_Batten or FairCurve_MinimalVariation
Cauchy Ding2010/08/26 01:33
Hi maschimaen,

You can try this method. Firstly, get two end points and two outward tangents from the raw two curves. Then you can use similar API as follows to generate bridge curve:

bool MakeBSplineCurveByTwoPntsTans(const gp_Pnt& p1, const gp_Vec& v1, const gp_Pnt& p2, const gp_Vec&v2, Handle_Geom_BSplineCurve& hBSplineCur)
{
Handle_TColgp_HArray1OfPnt pnts;
Standard_Boolean bPeriod = Standard_False, bScale = Standard_False;
double tol= 1.0e-7;

try
{
pnts = new TColgp_HArray1OfPnt(1,2);
pnts->SetValue(1, p1);
pnts->SetValue(2, p2);

GeomAPI_Interpolate hGI(pnts, bPeriod, tol);
hGI.Load(v1, v2, bScale);
hGI.Perform();
          if(!hGI.IsDone())
               return false;
hBSplineCur = hGI.Curve();
}
catch(...)
{
return false;
}
return true;
}
If you want to adjust the shape, you only need to adjust the module length of the two tangents.

Ding
maschimaen2010/08/29 21:22
Thank you both for your replying!

Cauchy Ding, the curve in my figure was created with my version of the method you have posted! By properly scale the vectors it is indeed a nice looking curve, but I cannot set the 2nd derivatives! Any further ideas?


Haowei, I tried the FairCurve_Batten and was not convinced by the resulting curves. In case of FairCurve_MinimalVariation I couldn't figure out how to get the curve back - could you give me advice for that?

In my opinion, the perfect method for this task would be GeomAPI_Interpolate with the possibility to load the (start and end) curvatures in addition - vector length scaling would give to influence the result as needed. OCC developers, is this worth thinking about ( and implementing :) ) it?

maschimaen
Mauro Mariotti2012/01/16 16:18
FairCurve_MinimalVariation, derives from FairCurve_Batten. Then to get the curve you can get the
call FairCurve_Batten::Curve()

Cheers,
Mauro
 
 
Latest news
  • FAQ section updated
  • OPEN CASCADE Uses Intel ® Parallel Studio XE to Introduce Parallelism into SALOME SMESH Module
  • Open CASCADE Technology 6.5.2 is available for download!

  • © OPEN CASCADE 2000 - 2012  |  Search  |  Contacts   |  Site map