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.

Is there any scripting method to identify all arcs in a sketch to replace them with a line?

ziad_jkhanziad_jkhan Member Posts: 5 ✭✭
edited May 2021 in Community Support
In trying to reduce the number of polygons in exported models, for performance reasons, I thought of converting all arcs within sketches to simple straight lines but have no idea how to do it through script.

However, this might corrupt the sketch if there are other references to the targeted arc so a way to avoid that is by not processing arcs that are referenced elsewhere. I could probably do it manually but if that can be done through scripting as well then that would be an awesome time-saver!

Any ideas anyone?

Best Answer

  • ziad_jkhanziad_jkhan Member Posts: 5 ✭✭
    Answer ✓
    Ah, I had only tried exporting in the collada format before but the options would not show up then so I could not figure out. The software I'm using does not support STL files though but does support OBJ and I do get similar options then so thanks a lot for pointing out...it's been really helpful :p

Answers

  • EvanReeseEvanReese Member, Mentor Posts: 2,186 ✭✭✭✭✭
    interesting use-case. Do you need a smooth version and a polygonalized version? If not, then you could just model it polygonalized to begin with. You could do that manually or with the help of a custom feature that polygonalizes arcs and other curves for modeling use. It's hard to switch between the arc and the polyline though since it will break any downstream references that are looking for one or the other. 

    Can you just reduce the number of poly's in the export dialog?


    Evan Reese
  • ziad_jkhanziad_jkhan Member Posts: 5 ✭✭
    Answer ✓
    Ah, I had only tried exporting in the collada format before but the options would not show up then so I could not figure out. The software I'm using does not support STL files though but does support OBJ and I do get similar options then so thanks a lot for pointing out...it's been really helpful :p
Sign In or Register to comment.