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.
Gotcha! Unexpected order of sketchRegions for concentric shapes
blackslate
Member Posts: 16 ✭
To see a demo of this issue, please visit my Region Order Test document and double-click on the Region Order Test feature to open the dialog and show debug feedback.
You should see a set of concentric circles. The outermost circle is MAGENTA. However, it is the second region returned by...
evaluateQuery(context, qSketchRegion(id + "sketch1"))
... and not the last, even though the circle sketches were drawn from the inside out. If you deselect the "Inside out?" button in the feature dialog, you will see that now it is the innermost circle that becomes MAGENTA.
It's not just a circle thing. It happens with rectangles too. You can test it.
Why is the last region that is sketched placed second in the array returned by evaluateQuery? Is this a bug or a feature that I can depend on?
0
Best Answer
-
NeilCooke Moderator, Onshape Employees Posts: 5,688I would not rely on the order the regions were created.Senior Director, Technical Services, EMEAI0
Answers