Hello,
I am trying to get the arcdata from the <u>ProArcdata</u>from the my ProGeomitemData,I could able to get the Origin,radius...etc.
I am trying to get the start point and end point of the arc,but it is giving in the form of ProVector.
Cani able to get interms of the 3D point system the way for the ProLinedata gives the end1 and end2.
What is the arc coordinate system? which is mentioned in the pro/toolkit header files documentation.
For the ProLinedata it gives the end1 and end2 from the default Csys,similarly i would like to get the end points of the arc from the default csys...is it possible to get this.
How do i get the point from the Vector...?
With regards,
Kishore V
Hi all,
This topic had been popping up more then once already.
Here is how to getXYZ of arc endpoints in model coordinates.
From Pro/Toolkit help, 'Geometry representation' chapter:
Parameterization:
t' (the unnormalized parameter) is (1 - t) * start_angle + t * end_angle
(x, y, z) = radius * [cos(t') * vector1 + sin(t') * vector2] + origin
C code:
C code//ProGeomitemdata *p_gd;
for( i = 0; i < 3; i++){end1[i] = p_gd->data.p_curve_data->arc.radius *
( cos( p_gd->data.p_curve_data->arc.start_angle) *
p_gd->data.p_curve_data->arc.vector1[i] +
sin( p_gd->data.p_curve_data->arc.start_angle) *
p_gd->data.p_curve_data->arc.vector2[i]) +
p_gd->data.p_curve_data->arc.origin[i];
end2[i] = p_gd->data.p_curve_data->arc.radius *
( cos( p_gd->data.p_curve_data->arc.end_angle) *
p_gd->data.p_curve_data->arc.vector1[i] +
sin( p_gd->data.p_curve_data->arc.end_angle) *
p_gd->data.p_curve_data->arc.vector2[i]) +
p_gd->data.p_curve_data->arc.origin[i];
}
If those
Hi @FV,
Thanks for helping me to get XYZ of arc endpoints in model coordinates.
But, I have another question
Could you teach me to how to get point on the circumference? Cause I WANT to use for loop to get it.
Hello all,
My apologies but I did not understand the question.
If you are asking about how to get an arbitrary point on an arc - you would not need this old pile of code from ten years ago. Just use ProCurveParamByLengthEval() or ProEdgeParamByLengthEval(), with the parameter argument changing from 0.0 to 1.0:
int max_steps = 100; for( int i = 0; i < max_steps; ++i ) { double t2 = -1.0; ProPoint3d point = {0.0,0.0, 0.0}; ProCurveParamByLengthEval (curve, (double) i/max_steps, 0.0, &t2, point); }
HIH.
FV.
Continue...
If those coordinates need to be recalculated to assembly or view or drawing coordinates please use appropriate Pro...TrfGet, invert resulting matrix if needed and use ProPntTrfEval to find the desired output.
HIH.
FV