cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Problems in obtaining the direction of the cross section (different from the visible one).

CHASEONHO
18-Opal

Problems in obtaining the direction of the cross section (different from the visible one).

ProSurfaceXyzdataEval returns a different normal orientation value for the same section in the same direction.

Photo 1. Select the surface that shows the section. Direction is left.
Photo 2. Select the back side of the surface that shows the section.Direction is left.

Photo 1.pngPhoto 2.png

 

I attached used code.

status = ProDrawingView2DSectionGet(drawing,view[i],0,xsec.xsec_name,&sec_area_type,&ref_sel,&curve_data,&arrow_display_view);

status = ProXsecPlaneGet(&xsec,&planeGeom);
status = ProSurfaceToGeomitem(DrawingViewSolid, (ProSurface)planeGeom, &surfaceGeomItem);
ProSurfaceDataGet((ProSurface)planeGeom,&geomItemData);
ProGeomitemdataGet(&surfaceGeomItem,&geomItemData);
halfUvParam[0] = geomItemData->data.p_surface_data->uv_min[0] +
(geomItemData->data.p_surface_data->uv_max[0] - geomItemData->data.p_surface_data->uv_min[0]) / 2.0 ;
halfUvParam[1] = geomItemData->data.p_surface_data->uv_min[1] +
(geomItemData->data.p_surface_data->uv_max[1] - geomItemData->data.p_surface_data->uv_min[1]) / 2.0 ;
//ProGeomitemdataFree(&geomItemData);
ProSurfaceXyzdataEval((ProSurface)planeGeom, halfUvParam, point, deriv1, deriv2, s_normal);


Use the above code to get the vector of the section.
Vectors also appear differently in cross sections in the same direction.
The reason is that the surface of the cross-section reference is front or back.

 

How can you get the direction shown by the red circle on the cross section?
I do not seem to be right in the way I use it.
Please help me.

2 REPLIES 2
salajhon69
6-Contributor
(To:CHASEONHO)

Try to analyses the part assemble.

 

Maybe you have it assembled in a mirror and on this side the part has some angle.

 

Best regard.

JS.

 

 

Your opinion is right. The correct vector was obtained by multiplying the return value of ProXsecFlipGet by each normal vector.

Top Tags