ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What means "double& param" in AcDbPolyline::onSegAt(..)

1 REPLY 1
SOLVED
Reply
Message 1 of 2
majklha
173 Views, 1 Reply

What means "double& param" in AcDbPolyline::onSegAt(..)

AcDbPolyline has method onSegAt().  What menas double& (out) parameter param in the method? 

Thanks.

1 REPLY 1
Message 2 of 2
tbrammer
in reply to: majklha

All curves in AutoCAD are implemented as parameterized functions. They have a start parameter ps that defines the starting point and an end parameter pe that defines the endpoint. The curve is defined on the interval [ps,pe]

The baseclass of DB resident curves is AcDbCurve. AcDbPolyline is derived from AcDbCurve. These methods retrieve start- and end parameter and calculate a point on a curve for a given parameter:

Acad::ErrorStatus AcDbCurve::getStartParam(double &ps) const;
Acad::ErrorStatus AcDbCurve::getEndParam(double &pe) const;
Acad::ErrorStatus AcDbCurve::getPointAtParam(double param, AcGePoint3d &pt) const;

 

Vertex points of an AcDbPolyline  have integer parameter values (0.0, 1.0, 2.0...). The parameter of a point is not the same as the curve length from the startpoint to the point. The ARX API has several functions to "convert" between point, parameter and path length.

 

Non DB resident curves work in a similiar way:

void AcGeCurve2d::getInterval(AcGeInterval& intrvl) const;
AcGePoint2d AcGeCurve2d::evalPoint(double param) const;

void AcGePoint3d::getInterval(AcGeInterval& intrvl) const;
AcGePoint3d AcGeCurve3d::evalPoint(double param) const;

 


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost