Skip to main content
18-Opal
January 12, 2024
Solved

How to get outline curve length in sheet metal ? (Plz share idea)

  • January 12, 2024
  • 2 replies
  • 1295 views

Hi,

We try to get outline curve length. (outline curve mean highlight in picture)

CHASEONHO_0-1705047053623.png

Our solution is simple. 

1. create section

2. get section curve

3. get curve length

 

But, section curve have all curve.

CHASEONHO_1-1705047066252.png

We do not need inside curve (highlight in picture)

CHASEONHO_2-1705047073788.png

 

Please give me an idea if there is a better way.

 

Thanks, Wram Regards.

SeonHo CHA.

Best answer by RPN

From the first solid feature get one edge green/white. If you feed this into this function this should  not include a contour from a cut feature.

 

extern ProError ProSmtedgeContourGet(
 ProPart		smt_part,
 ProEdge		edge,
 ProEdge		**edges );

/*
 Purpose:	Outputs an array of edges that form the complete contour of
		the entire green (or white) surface that contains the
		specified edge.

 Input Arguments:
 smt_part		- The sheet metal part
 edge 		- The edge (on white or green surface) that is
			 contained in the contour sought.

 Output Arguments:
 edges		- Pointer to ProArray of edges. The edges are
			 ordered exactly as for a regular surface contour.
			 The array will be allocated and filled by
			 Creo Parametric. Free it by calling ProArrayFree()
			 when you no longer need it.

 Return Values:
 PRO_TK_NO_ERROR	 - The function sucessfully retrieved the information.
 PRO_TK_BAD_INPUTS	 - One or more of the input arguments are invalid.
 PRO_TK_BAD_CONTEXT - The model is not a sheet metal part, or the
			 specified edge is not on the green or white surface.
*/

 

 

Proof it 😉

 

doc00231.png

 

From a Tcl Console 

  1. Create a Selection Object
  2. Select an edge
  3. Extract the model item
  4. Get the model item id
  5. Get the smt contour based on the selected edge id
%[1] ps_sel sel
sel
%[2] sel sel edge
1
%[3] sel modelitem mi
mi
%[4] mi cget -id
102
%[5] ps_visit smt_cont 102
102 405 235 423 274 273 272 421 229 403 108 49

Green Edge was selected
Red is the highlighted output of the returned edge ids! 

2 replies

tbraxton
22-Sapphire II
22-Sapphire II
January 12, 2024

One option is to create an intent chain of the unbent model perimeter. Then create a curve copy of the intent chain. You can then use an analysis feature to measure the length of the outline curve.

 

tbraxton_0-1705064121549.png

 

RPN
RPN18-OpalAnswer
18-Opal
January 13, 2024

From the first solid feature get one edge green/white. If you feed this into this function this should  not include a contour from a cut feature.

 

extern ProError ProSmtedgeContourGet(
 ProPart		smt_part,
 ProEdge		edge,
 ProEdge		**edges );

/*
 Purpose:	Outputs an array of edges that form the complete contour of
		the entire green (or white) surface that contains the
		specified edge.

 Input Arguments:
 smt_part		- The sheet metal part
 edge 		- The edge (on white or green surface) that is
			 contained in the contour sought.

 Output Arguments:
 edges		- Pointer to ProArray of edges. The edges are
			 ordered exactly as for a regular surface contour.
			 The array will be allocated and filled by
			 Creo Parametric. Free it by calling ProArrayFree()
			 when you no longer need it.

 Return Values:
 PRO_TK_NO_ERROR	 - The function sucessfully retrieved the information.
 PRO_TK_BAD_INPUTS	 - One or more of the input arguments are invalid.
 PRO_TK_BAD_CONTEXT - The model is not a sheet metal part, or the
			 specified edge is not on the green or white surface.
*/

 

 

Proof it 😉

 

doc00231.png

 

From a Tcl Console 

  1. Create a Selection Object
  2. Select an edge
  3. Extract the model item
  4. Get the model item id
  5. Get the smt contour based on the selected edge id
%[1] ps_sel sel
sel
%[2] sel sel edge
1
%[3] sel modelitem mi
mi
%[4] mi cget -id
102
%[5] ps_visit smt_cont 102
102 405 235 423 274 273 272 421 229 403 108 49

Green Edge was selected
Red is the highlighted output of the returned edge ids!