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.
Creating a feature script to mark bends
kyle_hofer465
Member Posts: 2 ✭
Hi,
Can someone please help me create a feature script to mark bends when the part is flattened? So basically what I want to do is select the points on each end of the bend lines and have it snap a circle sketch to each point selected. Also instead of having to define the diameter of every single one of them with the dimension tool, I need the circles to be equal to each other by default and control the diameter of the circle within the feature script.
Once done, my flat pattern will have a half-moon remove extruded on each end of my bend lines, Then those will help me show where my bend lines are after the laser cut process, generating less room for error when doing the bending process.
Any help on this would be greatly appreciated!
Kind Regards,
Kyle
Can someone please help me create a feature script to mark bends when the part is flattened? So basically what I want to do is select the points on each end of the bend lines and have it snap a circle sketch to each point selected. Also instead of having to define the diameter of every single one of them with the dimension tool, I need the circles to be equal to each other by default and control the diameter of the circle within the feature script.
Once done, my flat pattern will have a half-moon remove extruded on each end of my bend lines, Then those will help me show where my bend lines are after the laser cut process, generating less room for error when doing the bending process.
Any help on this would be greatly appreciated!
Kind Regards,
Kyle
0
Comments
https://cad.onshape.com/documents/073ee8501e1fab82fbe32b8e/w/5a9425f9ac5675c512e36202/e/158a842299199529b1bf6b22
Twitter: @BryanLAGdesign
If you can get selecting the endpoints or the lines to work, you should be able to just sketch on a face of the flat pattern (remembering that the sketch will be in the coordinates of that face with evPlane, not world coordinates), then there are two ways of cutting the flat.
The simpler way would likely be to just call `extrude` from your FeatureScript and have it handle updating the flat pattern and everything (having a look at its precondition to see what you need to provide to it for operating on the flat.)
The other way would be to look at the inner workings of extrude (calling opSMFlatOperation and whatnot) and copy that into your feature.
Also, maybe a little bit unrelated, but wouldn't having a sharp wedge-shaped cut be a bit more accurate than a circle?
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