×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to get distance between two points using C++ CAA?

How to get distance between two points using C++ CAA?

How to get distance between two points using C++ CAA?

(OP)
Hello,

I have created a point and projected it on a body by writing code in CAA. Now my next task is to get distance between those points. How can I get it?
I have used GSM Factory- CreatePoint point method for creating point and CreateProject for projecting it on body.

Please find the code I have written:

//creating point
double dPointCoord[3] = {pointList[i].GetX(), pointList[i].GetY(), pointList[i].GetZ()};
double* pPointCoord = new double[3];
pPointCoord = dPointCoord;
oPoint = spGsmFact->CreatePoint(pPointCoord);
spDescendants->Append(oPoint);
spiSpecOnGSMTool->Update();

//projecting the point
CATISpecObject_var iToProject = oPoint;
CATISpecObject_var iSupport = spCurrentTool;
CATIGSMDirection_var iDirection = NULL_var;
CATBoolean BoolNormal = TRUE;
CATGSMProjectSolutionType SolutionType = CATGSMNearestSolution;

oProjectPoint = spGsmFact->CreateProject(iToProject, iSupport, iDirection, BoolNormal, SolutionType);
spDescendants->Append(oProjectPoint);
spiSpecOnGSMTool->Update();


Thanks in Advance!
Regards,
Yashodeep Patil

RE: How to get distance between two points using C++ CAA?

Hello,

Measure it using SPA Workbench. Here is an extras from CAA V5 help to point you to the right area:

Func GetMeasurable( Reference iMeasuredItem) As Measurable

Returns the Measurable object.
Example:
This example get the Measurable from the SPAWorkBench.
Dim referenceObject As referenceObject
Set referenceObject = "GetReference"
Dim TheSPAWorkbench As Workbench
Set TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench ( "SPAWorkbench" )
Dim TheMeasurable As Measurable
Set TheMeasurable = TheSPAWorkbench.GetMeasurable(referenceObject)


cilici

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources