Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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.

evBox Help?

MichaelPascoe
MichaelPascoe Member Posts: 2,947 PRO
edited January 2021 in FeatureScript

I have a loop for each selected part. The bounding box works fine when the selected parts are not near each other, but when the parts are touching, the evBox does not work even though it's only evaluating one part at a time. Each time the feature loops, there is only one part in the loop at a time. There is nothing to intersect.

Here is the code:

 https://cad.onshape.com/documents/55a675ab42d69e59cec13422/w/6c9a7e0449c7b3d48e26243b/e/fc4f13dd438b78b27b74efb0


What am I missing here?


◉ RENDERCAD - Photorealistic product rendering.
◉ CADSharp - Professional CAD + software consulting.

▚▞▚▞▚▞▚▞▚

Best Answer

  • ilya_baran
    ilya_baran Onshape Employees, Developers, HDM Posts: 1,274 image
    Answer ✓
    I see that you've got the entire set of parts as the target for the opSplitPart.  That may be causing parts to split before you have a chance to iterate over them.  Try splitting just the current part (my guess is that's what's intended).  Unrelated to this problem, I also suggest using forEachEntity for downstream reference stability.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc

Answers

  • ilya_baran
    ilya_baran Onshape Employees, Developers, HDM Posts: 1,274 image
    Answer ✓
    I see that you've got the entire set of parts as the target for the opSplitPart.  That may be causing parts to split before you have a chance to iterate over them.  Try splitting just the current part (my guess is that's what's intended).  Unrelated to this problem, I also suggest using forEachEntity for downstream reference stability.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • MichaelPascoe
    MichaelPascoe Member Posts: 2,947 PRO
    edited January 2021
    Thank you for the tips @ilya_baran
    And thank you as well @Jason_S



    ◉ RENDERCAD - Photorealistic product rendering.
    ◉ CADSharp - Professional CAD + software consulting.

    ▚▞▚▞▚▞▚▞▚