Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- Creo Parametric
- :
- Industrial Design
- :
- RE: Arc angles

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-04-2007
03:18 PM

04-04-2007
03:18 PM

Arc angles

I'm hoping someone can help with this problem. I'm traversing all the contours of a surface and all the edges of each contour and I'm using the following to get information from edges that are arcs:

ProEdgeDataGet(p_edges[k], &gitemdata);

ProArcdataGet(gitemdata->data.p_curve_data, NULL, NULL, pt1, &stang, &enang, &rad);

But the start angle (stang) is always 0.0 no matter the orientation of the edge. Any idea why? Any ideas how to get the right information?

TIA

ProEdgeDataGet(p_edges[k], &gitemdata);

ProArcdataGet(gitemdata->data.p_curve_data, NULL, NULL, pt1, &stang, &enang, &rad);

But the start angle (stang) is always 0.0 no matter the orientation of the edge. Any idea why? Any ideas how to get the right information?

TIA

Labels:

8 REPLIES 8

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-05-2007
08:32 AM

04-05-2007
08:32 AM

RE: Arc angles

Tom,

Are you sure that the edge you are trying to get arc data for is of type

PRO_ENT_ARC? Look up the function ProArcdataGet in the API Wizard and

click on some example code. That code calls ProCurvedataTypeGet which

will return PRO_ENT_*. It only makes sense to call ProArcdataGet on

curve data of type PRO_ENT_ARC.

Patrick Williams | Sr. Application Engineer | CAM Systems | Steelcase

Inc. | 616.698.4078

Are you sure that the edge you are trying to get arc data for is of type

PRO_ENT_ARC? Look up the function ProArcdataGet in the API Wizard and

click on some example code. That code calls ProCurvedataTypeGet which

will return PRO_ENT_*. It only makes sense to call ProArcdataGet on

curve data of type PRO_ENT_ARC.

Patrick Williams | Sr. Application Engineer | CAM Systems | Steelcase

Inc. | 616.698.4078

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-09-2007
02:29 PM

04-09-2007
02:29 PM

re: Arc angles

I see. In the 3D world, arcs are defined by two vectors, center point, etc. But in the 2D world (sketches), arcs are defined by start angle, end angle, center point, etc.

I was getting confused between the two.

I was getting confused between the two.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-03-2009
06:31 AM

12-03-2009
06:31 AM

re: Arc angles

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-03-2009
09:21 AM

12-03-2009
09:21 AM

Arc angles

Kishore,

If you want to get the end points of the arc then I would back up a few steps in your logic and use the following procedure:

1. Acquire a handle to a ProCurve object:

a. ProSolidFeatVisit()

b. ProFeatureGeomitemVisit()

c. ProGeomitemToCurve()

2. Then find the endpoints of the curve where t=0 and t=1.

a. ProCurveXyzdataEval() t=0

b. ProCurveXyzdataEval() t=1

This should get you the endpoints of the curve. If the actual ProGeomitem is an edge (I can't remember off the top of my head) then you would just substitute ProGeomitemToCurve() with ProGeomitemToEdge() and ProCurveXyzdataEval() with ProEdgeXyzdataEval().

Patrick Williams | Engineering Systems | Sr. Applications Engineer | Steelcase Inc. | 616.698.4078

[cid:image001.jpg@01CA73F1.AF3921B0]

If you want to get the end points of the arc then I would back up a few steps in your logic and use the following procedure:

1. Acquire a handle to a ProCurve object:

a. ProSolidFeatVisit()

b. ProFeatureGeomitemVisit()

c. ProGeomitemToCurve()

2. Then find the endpoints of the curve where t=0 and t=1.

a. ProCurveXyzdataEval() t=0

b. ProCurveXyzdataEval() t=1

This should get you the endpoints of the curve. If the actual ProGeomitem is an edge (I can't remember off the top of my head) then you would just substitute ProGeomitemToCurve() with ProGeomitemToEdge() and ProCurveXyzdataEval() with ProEdgeXyzdataEval().

Patrick Williams | Engineering Systems | Sr. Applications Engineer | Steelcase Inc. | 616.698.4078

[cid:image001.jpg@01CA73F1.AF3921B0]

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-04-2009
05:17 PM

12-04-2009
05:17 PM

RE: Arc angles

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-04-2009
05:19 PM

12-04-2009
05:19 PM

RE: Arc angles

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-07-2018
06:49 AM

07-07-2018
06:49 AM

Re: RE: Arc angles

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-12-2018
08:51 AM

07-12-2018
08:51 AM

Re: RE: Arc angles

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.

Top Tags

- ptcuser_portal
- creo_parametric_proengi…
- creo_machining_proengin…
- creo_simulate_proengine…
- creo
- creo_system_administrat…
- creo_customization_proe…
- modeling
- design
- parametric
- creo_parametric
- cad
- 3d
- pro/engineer
- creo_elements_pro
- engineer
- simulate
- surface
- drawing
- creo_2.0
- pro/e
- model
- proengineer
- cadds
- freestyle
- pro_toolkit
- surfacing
- 2.0
- creo simulate
- part