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
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
https://cad.onshape.com/documents/073ee8501e1fab82fbe32b8e/w/5a9425f9ac5675c512e36202/e/158a842299199529b1bf6b22
Twitter: @BryanLAGdesign
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
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
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
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
I've been meaning to make a very similar feature for a while now and have been manually adding the > and < cuts to my bends to help with alignment.
Now I'd also like to make a version with a dashed thin cut extrude (for easier bending on laser cut flats). Is there a way to select the all the dashed bend lines in the flat pattern with either FS or using the new query variables? They don't even seem like sketch entities although the dashed lines can be "used" to create lines in another sketch.
Did anyone else end up making this custom feature in the past 4 years? :D Sorry for the bump, but I'm happy to pick up the ball if there isn't something already already done!
Not a solution to the exact question, but you can use a 3rd party dxf tool to change the color of the bend line, if you export from OS with the bend line. Then the vendor will treat that line as a line to etch, rather than thru cut. That is what I was doing with SendCutSend. I emailed their help how to etch the bend lines, and they had me change them to a different color (or maybe a dashed line, I forget now). Later, I got much smarter, and had them do all the cutting and bending.
Thinking back, sometimes that line would be on the wrong side of the bend, and harder to line up on the brake.
I made a feature like this last year and is up for sale on fs.place https://fs.place/Listings/DV4I2TLAR6ZU61QH37M6IZAW30VY7CJD
Its only $20, you can see a demo of it here: https://cad.onshape.com/documents/a74c45e865d1f5b41a5e6c6e/w/cb6fbcc5186057491e42639a/e/fc13fdba9d4759c7bd509f65
Experts in Onshape Automation - Custom Features and Integrated Applications