Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get points from a sketch 2

Status
Not open for further replies.

yashodeep15

Automotive
Jul 12, 2016
13
0
0
US
Hello,

I am writing a code using CAA API's in C++ I want to get the points from the sketch and find their co-ordinates.

My situation is:
User pattern is created using a sketch consisting of points.
I am getting the User Pattern, and also the sketch used for creating that user pattern.
I am also getting the number of points in the sketch, but I am not able to find their co-ordinates.

How can i get the points and their co-ordinates in sketch?


Please help me if anyone has faced this problem.


Thanks and Regards,
Yashodeep
 
Replies continue below

Recommended for you

Hi,
Try this.Try creating 3d points on the points in the sketch.Try projecting it to the drafting workbench.try finding the co ordinates of the points.
 
Thanks Sudhakarn,

I will try the method, but do you want me to try this in CATIA or programatically?
Because I want to do this programatically, for this I will need the co-ordinates of points in sketch. How will I able to get those co-ordinates.

I will share the situation, below is the code:

CATListValCATI2DWFGeometry_var ioGeomLst = NULL;
const CATIdent idCATMathPoint = NULL;
oSketch->GetComponents(idCATMathPoint, ioGeomLst);
int SizeGeomLst = ioGeomLst.Size();


In my above code, "ioGeomLst" is my list of all the geometries in the sketch
and this geometries will be always points. I want co-ordinates of this points.

Regards,
Yashodeep
 
you said:
In my above code, "ioGeomLst" is my list of all the geometries in the sketch
and this geometries will be always points. I want co-ordinates of this points

don't know much about CAA but using VB if I look inside a sketch and find points they will be Point2D and I can use .GetCoordinates method on the point2d object.

Eric N.
indocti discant et ament meminisse periti
 
Hi Yashodeep N,

Actually i was talking about generating the 2D out of 3D and then finding out the co ordinates.You can project the sketch directly into drafting ( i blv its possible to project the sketch directly ).In the view properties enable the option show 2D.Hope it helps.
 
Status
Not open for further replies.
Back
Top