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.
Onshape Live 22 gift - Frame Trime feature Improvement
emagdalenaC2i
Member, Developers, Channel partner Posts: 863 ✭✭✭✭✭
A little gift for the Onshape live 22
The new Frame Trim feature always do Coped butt trims, so I have created an improvement to select Butt / Coped butt trims
The performance is also improved when the butt trim is used (91,57 s --> 13,68 s in the second example)
Here is the document with the code https://cad.onshape.com/documents/b5592f8871a94872ea10133e/w/06b6c00544917bdfffd78c74/e/5e7114c330fa12f357fa2daf?configuration=Alto=1.0+meter;AlturaRefuerzo=0.6+meter;Ancho=0.6+meter;Largo=0.8+meter&renderMode=0&rightPanel=cutlistPanel&uiState=6220ae9c6e9dc23b87daeee8
The new Frame Trim feature always do Coped butt trims, so I have created an improvement to select Butt / Coped butt trims
The performance is also improved when the butt trim is used (91,57 s --> 13,68 s in the second example)
Here is the document with the code https://cad.onshape.com/documents/b5592f8871a94872ea10133e/w/06b6c00544917bdfffd78c74/e/5e7114c330fa12f357fa2daf?configuration=Alto=1.0+meter;AlturaRefuerzo=0.6+meter;Ancho=0.6+meter;Largo=0.8+meter&renderMode=0&rightPanel=cutlistPanel&uiState=6220ae9c6e9dc23b87daeee8
Un saludo,
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
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
4
Comments
As to your code: I haven't run any tests but did read through it. One thing to remember: It looks like you are keeping the frame end attribution intact (see reapplyAttributes()). This is vital for correct downstream cutlist creation. It's also difficult to get right for all geometries. Your example shows a well-formed cutlist, but I'd encourage you to monitor the behavior of this custom feature as you try more complex end conditions and beam paths, particularly with "partial" endface trims, where some of the originally attributed endfaces remain. One tool that may help with your debugging is visualizing the beam attribution before and after a trim, using queries like:
We've got a lot of great stuff coming in 2022 for Frames. We will continue to extend and improve the product, aided by the community's feedback, improvements like yours, and...bug reports! Keep 'em coming!
I have checked the reapplyAttributes() function and it works fine with this improvement.
The reaplyNearest function sets the attributes to the new faces, just like the original macro
Actually, I have found that there is a line in the code that could be removed in reapplyAttributes:
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
Our customers can update their features and use the cut lists in their existing documents.
@NeilCooke something similar could be done with the Beam FS
Take a look
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
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