yashodeep15
Automotive
- Jul 12, 2016
- 13
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.GetX(), pointList.GetY(), pointList.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
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.GetX(), pointList.GetY(), pointList.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