Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hi,
I have a sheet metal geometry as shown.
I am trying to count the number of bends using the toolkit.
Here's how we thought of it:
1. Collect flat, flange, and bend features from the model tree
2. Get vector values of reference planes of collected features
3. Increase the number of horizontal/vertical bends using vector values
However, the following problems were expected:
Five flat features are visible in the feature tree in the illustration.
When looking at the unfolded shape, the number of bends is 1 horizontally and 2 times vertically.
Any good way to count the number of bends?
Any ideas would be appreciated.
Warm Regards,
SeonHo Cha.
Solved! Go to Solution.
I would try the axis.
- Go through all views (or a specified) (ProDrawingViewVisit)
- Go through all SolifdFeats ind the Solid of the View (ProDrawingViewSolidGet, ProDrawingFeatVisit)
- FeatType == PRO_FEAT_UNBEND
- ProFeatureAnnotationelemsVisit ( );
- FeatType == PRO_AXIS
So you should get the 3 axis from the Unbend feature. We want to show it ... so we use ProAnnotationByFeatureShow after (FeatType == PRO_FEAT_UNBEND), but it should also be possible to visit and count them.
Br,
Eike
I would try the axis.
- Go through all views (or a specified) (ProDrawingViewVisit)
- Go through all SolifdFeats ind the Solid of the View (ProDrawingViewSolidGet, ProDrawingFeatVisit)
- FeatType == PRO_FEAT_UNBEND
- ProFeatureAnnotationelemsVisit ( );
- FeatType == PRO_AXIS
So you should get the 3 axis from the Unbend feature. We want to show it ... so we use ProAnnotationByFeatureShow after (FeatType == PRO_FEAT_UNBEND), but it should also be possible to visit and count them.
Br,
Eike
This method worked great for me.
I just tried a different way.
Flat pattern features can visit the axes of flats and flanges.
Then, we used curve.arrow->end1,end2 of geomitemdata of the axes.
The directionality among X, Y, and Z was confirmed through each 3d pnt.
Concordance points were treated as the same axis by comparing the confirmed non-directional PNTs.
After merging the same axes, the number of axes for directionality is converted to the number of bands, and the result seems to be quite accurate.
Thank you.
Hello, I don't think that this request is NOT so complex to calculate.
My solution would be:
And this is just one Surface Visit filter function, and probably Array Size Get.
Before everybody proofs me wrong 😉 please read the following notes:
My thougths:
Task to do:
To get the amount of bends, visit all Surfaces and find all cylindrical onces (SurfaceVisit Function).
For a sheet metal component each surface type is now either the FACE, OFFSET, SIDE or NONE.
SIDE and NONE can be Ignored, the visit filter filter must be FACE/GREEN or OFFSET/WHITE, lets use GREEN
By this:
The Number of cylindrical surfaces which are from the Face/Green Side will specify the number of "Bends".
And you get the angle as well, if you analyse the Cylindrical Data.
It is the same Bend, even if later seperated by cuts in the design phase.
Quilt Notes:
A hole or a round, which are cylindrical surfaces in the model, are tagged as "SIDE" because you work with a thin piece of Paper only.
A hole or a round (these are cylindrical surfaces as well) are just a circles in the smt quilt of the unbendded model.
This site will not render Tcl Code, here an image of the code, see Toolkit Notes at the end as well:
I count the number of bends in the drawing as opposed to the model. I count the bend notes on the drawing, so every bend would need a note but our specs call for that. I must note that we have been creating our own custom bend notes (via a toolkit app) since we started using Pro Engineer version 18, (1999) as ProE had nothing at the time. So our noting is very consistent. I am checking notes for valid radii values, "an Up or DN" and key words like hem, etc. I would say this gives me about 95% accuracy. Not perfect but it was what I could deliver.
I would have a look at ProSmtFeatureDevldimsGet function. The outputs are one array of dimensions (developed lengths of the bends) and one array of surfaces, which are suppose to be the bent surfaces.
The way I see this is to visit all features in the model. Try to filter the non-relevent features (datum planes, point and so on) out.
In the visiting function call ProSmtFeatureDevldimsGet and then get the size of one of the arrays.
I never tested this but at least in theory it should work.
On the other hand the model you are showing is a very good example. For all intents and purposes I expect the result to be 5 bends.
Because the green and yellow sides are the same size, in a practical application this part can be produced with only 3 bend operation.
Interesting exercise.
@GabrielZaha Thank you for your replies.
You gave a good idea, but this method is difficult for me to apply.
Thank you again for thinking about our concerns.
Are you sure about this 3 bends?
Thanks a lot for sharing your ideas. 🙏
Based on postings from RPN (count cylindrical surface that are from FACE/GREEN sheetmetal side) and GabrielZaha (number of surfaces returned by ProSmtFeatureDevldimsGet()), I implemented both approaches in a single bend-count-function:
Count the number of bends in a sheetmetal model:
- examining only features of type
- Bend (PRO_FEAT_BEND)
- Wall (PRO_FEAT_WALL)
- Smt Conversion (PRO_FEAT_SMT_CONVERSION)
and sum up each feature's bend count.
- For Bend and Wall features, the bend count is the number of surfaces returned by ProSmtFeatureDevldimsGet().
- For Smt Conversion features, the bend count is the number of cylindrical surfaces that belong to the face (green) sheetmetal side (surface property ProSmtSurfType == PRO_SMT_SURF_FACE, via ProSmtSurfaceTypeGet()).
Remarks:
- Only features with status "active" or "active but unregenerated" are being considered.
- This function gives the same result in both sheetmetal states: bended and flattened.
Background:
ProSmtFeatureDevldimsGet() works ootb in both states (bend/flat) and returns the same number of bends.
For Smt Conversion features, the number of child surfaces remain the same in bend/flat state, they only change their in-/active state.
Thus, by examining both the active and inactive surfaces, the relevant cylindrical surfaces can be found and counted as bend (each one).
⚠️Limitations:
Counts only bends of the specified features (BEND, WALL, SMT_CONVERSION). (Support for unknown/new features must be added, if needed.)
💡 Findings:
For my test case with a bend along a (slightly) curved edge (from a flange feature), this bend-count-function works better than the Creo build-in functionalities 📈 for counting bends:
it does find & count even the curved bend (Creo does not) and counts all other bends correctly.
Screenshots of my test case with 10 bends (Creo counted 9, missed the curved edge):
(config.pro option required for the "Sheetmetal" button (Bend Report) to appear: info_output_format text)