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.

Which command generate "threads" in drawings?

sebastian_glanznersebastian_glanzner Member, Developers Posts: 422 PRO
Hello everyone,

Which commands do I have to write in my featurescript so that I can enable thread display in the drawing?
(Without using the hole command):
 

I need this for external threads and I would like to write my own script.
I would like to select a cylindrical face and add "something" and I can see these small lines and the arc in the drawing.

Does anyone have an idea where to start??? Which function is needed?

And please don't just suggest I should look at the hole command in the source code:
https://cad.onshape.com/documents/12312312345abcabcabcdeff/w/a855e4161c814f2e9ab3698a/e/75b72139bd104b1bbf74528e

All I can see is this:


Thanks  B)

Comments

  • Cappie_PomeroyCappie_Pomeroy Member Posts: 14
    Have you checked out the Thread Creator FeatureScript?

    I'm not sure what it outputs to drawings, but it seems like a good place to start looking for how to add "something" that could become a drawing of what you want.
  • sebastian_glanznersebastian_glanzner Member, Developers Posts: 422 PRO
    Thanks for the suggestion, already tried that and it does create a 3D Thread.
    Which is cool but I only want these small lines :)
  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,039 ✭✭✭✭✭
    @sebastian_glanzner
    You will have to set a hole attribute on the cylindrical face.

    It does not work for external threads, though :(

    Here is an FeatureScript to set a hole attribute on a cylindrical face.
    Given a hole standard, etc. and a cylindrical face, it sets a hole attribute on the cylindrical face so that threads, etc are shown in the drawing.
    You may be able to call it from your FeatureScript, giving it your created cylindrical face.
    https://cad.onshape.com/documents/2ae1714eab70e13cde45634d
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • sebastian_glanznersebastian_glanzner Member, Developers Posts: 422 PRO
    @MBartlett21
    Thank you very much for the link! I made a copy and did some experimentation with the code.
    I'm can change the "major diameter" of the hole and control where the thin lines appear on a drawing. But only if I select an inner cylinder, it doesn't work for external threads.

    Also in the side view, the small line are not shown. Only in the section cut view:

     

    Does anyone have an idea how to unhide them?
  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,039 ✭✭✭✭✭
    If you show hidden lines in the side view it might work
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • sebastian_glanznersebastian_glanzner Member, Developers Posts: 422 PRO
    Thanks, that worked! Interesting, I think I have to experiment with the code.
    Maybe I can get these lines without using show hidden lines.
    Then they should be solid thin lines, like in the section view.



Sign In or Register to comment.