Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! 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?