Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi,
We try to get outline curve length. (outline curve mean highlight in picture)
Our solution is simple.
1. create section
2. get section curve
3. get curve length
But, section curve have all curve.
We do not need inside curve (highlight in picture)
Please give me an idea if there is a better way.
Thanks, Wram Regards.
SeonHo CHA.
Solved! Go to Solution.
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 😉
From a Tcl Console
%[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!
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.
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 😉
From a Tcl Console
%[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!