Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Query for specific SheetMetalDefinitionEntityType
MBartlett21
Member, OS Professional, Developers Posts: 2,048 ✭✭✭✭✭
I would like to filter my edges (from qEverything)
to be of a certain SheetMetalDefinitionEntityType,
so i can pass them into sheetMetalCornerBreak
without it erroring out.
Is there any way to do this?
Is there any way to do this?
Tagged:
0
Best Answers
-
lana Onshape Employees Posts: 705We don't have a query filter for this. I'd go a different rout.
1. getSMDefinitionEntities(context, qEverything(EntityType.BODY), EntityType.BODY) would give you all the definition bodies.
2. Collect their vertices
3. getSMCorrespondingInPart(context, qUnion(vertices), EntityType.EDGE)
These edges can be sent to sheetMetalCornerBreak()
You still will be getting warnings for vertices next to bend edges, so it might be a good idea to filter out those in step 2.
1 -
Jake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646@mbartlett21
Additionally, we have an internal ticket for exposing some kind of qSheetMetalDefinitionEntityType, but it would be helpful if you raised an Improvement Request.Jake Rosenfeld - Modeling Team5 -
MBartlett21 Member, OS Professional, Developers Posts: 2,048 ✭✭✭✭✭@lana
@Jake_Rosenfeld
I have made an improvement request: https://forum.onshape.com/discussion/9596/query-for-specific-sheetmetaldefinitionentitytypes/1
Answers
1. getSMDefinitionEntities(context, qEverything(EntityType.BODY), EntityType.BODY) would give you all the definition bodies.
2. Collect their vertices
3. getSMCorrespondingInPart(context, qUnion(vertices), EntityType.EDGE)
These edges can be sent to sheetMetalCornerBreak()
You still will be getting warnings for vertices next to bend edges, so it might be a good idea to filter out those in step 2.
Additionally, we have an internal ticket for exposing some kind of qSheetMetalDefinitionEntityType, but it would be helpful if you raised an Improvement Request.
C2C - Full Round Fillet
Eduardo Magdalena C2i Change 2 improve ☑ ¿Por qué no organizamos una reunión online?
Partner de PTC - Onshape Averigua a quién conocemos en común
@Jake_Rosenfeld
I have made an improvement request: https://forum.onshape.com/discussion/9596/query-for-specific-sheetmetaldefinitionentitytypes/
IR for AS/NZS 1100
Eduardo Magdalena C2i Change 2 improve ☑ ¿Por qué no organizamos una reunión online?
Partner de PTC - Onshape Averigua a quién conocemos en común