Manifold Geometry // Многообразная Геометрия

Extrema to use in OpenCascade

/ Просмотров: 1951

Use Extrema_ECC2d to measure distances between two-dimensional curves.

Geom2dAdaptor_Curve gac1(curve1);
Geom2dAdaptor_Curve gac2(curve2);
  
Extrema_ECC2d extCC(gac1, gac2);
//
extCC.Perform();
//
if ( extCC.NbExt() )
{
  Extrema_POnCurv2d extPts[2];
  extCC.Points(1, extPts[0], extPts[1]);
  //
  const double dist = extPts[0].Value().Distance( extPts[1].Value() );
}