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.
"Flip Part on Plane" Custom FeatureScript
Trevor_Jones
Member Posts: 4 ✭
Hi, all. I want to create a featurescript that flips a part on the plane of a sketch, but I don't know the best method. It seems like a fairly simple thing to do, I'm just new to coding and featurescripts.
To explain further, I'm trying to nest many different parts with pockets and holes onto 4x8' bounding box for CNC cutting with VisualCAMc (which does not have nesting capabilities). However, the "Auto Layout" featurescript I am using does not take pockets into consideration when nesting components, so some of the pockets face down, instead of upwards for milling. Another option would be to code this parameter into the existing "Auto Layout" featurescript, but unfortunately, I'm unfamiliar with coding and am limited in this regard.
Below is a screenshot of my parts, from the bottom. Any advice that could lead me in the right direction would be appreciated!
To explain further, I'm trying to nest many different parts with pockets and holes onto 4x8' bounding box for CNC cutting with VisualCAMc (which does not have nesting capabilities). However, the "Auto Layout" featurescript I am using does not take pockets into consideration when nesting components, so some of the pockets face down, instead of upwards for milling. Another option would be to code this parameter into the existing "Auto Layout" featurescript, but unfortunately, I'm unfamiliar with coding and am limited in this regard.
Below is a screenshot of my parts, from the bottom. Any advice that could lead me in the right direction would be appreciated!
Tagged:
0
Answers
If I could automate this process, perhaps I could include the code into the original.
This should be a relatively easy feature to write. The question is really how you want your user to define the flip. The best I have come up with in my brainstorming is that the user should select a part and a linear edge, and the part will be rotated 180 degrees about that edge, and then shifted back to the same plane.
If you think of a generic non-symmetric part (like any of the three in your screenshot) the result will be different if the part is rotated left to right vs top to bottom. Is this an important consideration? How do you want to control this? Once questions like this are answered, we'd be happy to guide you through writing a feature, or even mock up a quick prototype