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.
Test Design variations by setting Variables in Feature Script
bernhard_larice094
Member Posts: 3 ✭
Hello, I would like to optimize a sketch by experimenting with different variable combinations in FeatureScript. My sketch currently utilizes two dimensions controlled by variables. Now, I want to modify these variables in FeatureScript and calculate the area of a face as a result of these changes.
However, when I set the variables in a loop in FeatureScript and measure the area, I obtain the same results for each iteration. I suspect this is because the sketch isn't recomputed during the execution of the FeatureScript.
Is there a way to trigger a recompute of the sketch while running the FeatureScript, or do I need to create the entire sketch in FeatureScript and then recreate it within the loop with the new dimensions?0
Best Answer
-
S1mon Member Posts: 2,989 PROYou may find some of the solutions in this thread to be helpful:
https://forum.onshape.com/discussion/21816/how-to-split-a-closed-spline-into-two-equal-areas
1
Answers
https://forum.onshape.com/discussion/21816/how-to-split-a-closed-spline-into-two-equal-areas