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.
Advice? How to reuse a time-consuming part created with one Feature Studio in others?
blackslate
Member Posts: 16 ✭
In my project, I need to create 48 almost identical pieces for export for a 3D printer. The printer has a big enough bed to print 24 of them at a time, so I want to generate a single STL file for all 24 pieces.
Each piece needs to have a rough texture on one face. However, the pieces will all be slightly different: a different number will be embedded on the textured face. I have written a script which will generate one piece at a time and position it in its own place on a plane for 3D printing. All this works quite fast, but there is a bottleneck in the creation of the stamp part that I need to create the texture for each piece. This takes a little over a minute.
I would like to generate the texture stamp once, and reuse it 24 times as a tool for a Boolean SUBTRACTION operation. This would reduce the time for the complete process from over 26 minutes to about 3 minutes.
Do I have to rewrite my Feature Studio so that it:
1. Generates the time-consuming stamp once
2. Iterates through an array of parameters to create the 24 pieces, reusing the stamp on each iteration
?
Or is there a way to import a pre-generated stamp into my existing "one-piece-at-a-time" Feature Studio, without having to wait over a minute for the stamp to regenerate each time?
Each piece needs to have a rough texture on one face. However, the pieces will all be slightly different: a different number will be embedded on the textured face. I have written a script which will generate one piece at a time and position it in its own place on a plane for 3D printing. All this works quite fast, but there is a bottleneck in the creation of the stamp part that I need to create the texture for each piece. This takes a little over a minute.
I would like to generate the texture stamp once, and reuse it 24 times as a tool for a Boolean SUBTRACTION operation. This would reduce the time for the complete process from over 26 minutes to about 3 minutes.
Do I have to rewrite my Feature Studio so that it:
1. Generates the time-consuming stamp once
2. Iterates through an array of parameters to create the 24 pieces, reusing the stamp on each iteration
?
Or is there a way to import a pre-generated stamp into my existing "one-piece-at-a-time" Feature Studio, without having to wait over a minute for the stamp to regenerate each time?
0
Answers
It's definitely possible to do this within a custom feature, however you can use the built in Pattern feature to do this as well. Let me know if you still want to do this in FeatureScript, we will need a link to your script to be able to help you the most effectively.
Variable feature pattern
- Create a "count" variable int equal to 0
- Create another "count" variable int equal to #count +1
- Place the text on the part with a feature that allows expressions like Text - Custom Feature. If you use Text, make sure you click the "Switch to expression" arrow.
- Create a Pattern and set it to "Feature pattern"
- Select the features to pattern. Do not include the first "count" as this one is the starting reference not to be modified each loop.
- Select "Apply per instance"
https://cad.onshape.com/documents/677bc46043110cc4d6ef7828/w/d02de851f2440c7caeef4606/e/97b3c804f810e76d8...Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴