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.

ThreadLab - Internal/External Modeled/Cosmetic Threads with External Thread Callouts

2»

Comments

  • Lisa_ReisingerLisa_Reisinger Member Posts: 3
    This feature is really great - thanks a lot!

    As the comment above, I would like to model pipe threads (NPT, BSP) too. Is there a chance you can add these to your feature, or is there perhaps an other feature for pipe threads?


  • Lisa_ReisingerLisa_Reisinger Member Posts: 3
    This feature is really great - thanks a lot!

    As the comment above, I would like to model pipe threads (NPT, BSP) too. Is there a chance you can add these to your feature, or is there perhaps an other feature for pipe threads?


  • Tobias_HulletteTobias_Hullette Member Posts: 2 PRO
    I am trying to use ThreadLab for Internal threads, but it seems like it only "adds" threads to the hole. How can I get it to CUT threads? Thank you!!
  • gyundtgyundt Member Posts: 1 ✭✭
    Fantastic work on this feature, B)
    Thank you so much for putting it out for everyone!

    One useful future feature would be the ability to set specific/offset the starting rotational position of modelled threads.
  • jannick_hagenjannick_hagen Member Posts: 2
    Thanks for an amazing feature! 

    But i was having an issue when trying to create an 50mm internal thread

    LH thread worked fine, but not the RH thread. thought i would let you know.
    I was able to make it anyway by mirroring the part.

    See pictures
  • felix_zdrenkafelix_zdrenka Member Posts: 2
    This looks nice. But how do I use it? I'm not a programmer and I can't find a tutorial anywhere on what to do with the source code. :-( 
  • michael_zeaglermichael_zeagler Member Posts: 150 ✭✭✭
    edited June 2024
    felix_zdrenka said:
    This looks nice. But how do I use it? I'm not a programmer and I can't find a tutorial anywhere on what to do with the source code. :-( 
    Here's a vid from their Youtube channel. I've been meaning to sit down and try some of this stuff for a while.

    https://youtu.be/JOyQ9LfpuY8?si=FGdix5sXlGkn5Yq-
  • michael_zeaglermichael_zeagler Member Posts: 150 ✭✭✭
    edited June 2024
    I'm not sure if this is the place to mention it, but would there be a way to add the chamfer after the threads? The chamfer on a threaded stud works as it's implemented in a real world fastener or turned workpiece, but a threaded hole seems to add the threads after the chamfer, leaving a squared off thread start.



    I like to print threads and usually have to add a feature to make sure it actually gives you the taper on the thread start. It's something that's usually handled perfectly well with a note in most cases as it's something a machinist would do as a finishing step. If you're modeling the actual threads there's usually a reason though, and it's something I just prefer to have in my parts. 


     
  • rick_randallrick_randall Member Posts: 428 ✭✭✭
    edited June 2024
    antlu65  Great work, I'm going to use this. But here is something you might want to consider adding for us that use metal 3d threads.
    Both rolled threads and die cut threads have about 2 imperfect threads where the threads end at their full depth. One more revolve, at the base of the threads give a realistic look ( I've found that 2 times the pitch seems to give about the right amount of " tail-out " ).


  • Anthony_PageauAnthony_Pageau Member Posts: 2 EDU
    Is ThreadLab development dead? I would love to see the error on the hole callout resolved. 
  • MDesignMDesign Member Posts: 1,450 PRO

    I second this for internal threads. I added a ?12x1.25 hole and mistakenly assumed the thread lab tool would use the data and put the threads in correctly. To my surprise when the client asked to change the hole to m12x1.25. I had to do a double take and find the issue. To which thread lab ad did material making it basically m10

  • michael_zeaglermichael_zeagler Member Posts: 150 ✭✭✭

    This feature is great but the author/dev hasn't updated the document in a year and a half. Honestly I'd rather see it worked into an included feature.

  • Oliver_CouchOliver_Couch Member Posts: 230 PRO
    edited November 2024

    This is my biggest misgiving with using community featurescripts for commercial work. Sure it's nice that something exists, but reliability is essential for commercial applications and I'd really rather Onshape provide the tools I need to do my work, rather than tools I can use to make the tools I need to do my work, particularly for basics like threads.

    Onshape really needs to provide the functionality themselves so it comes with the assurance of stability and bug fixes - particularly as other updates are rolled out regularly to onshape.

  • antlu65antlu65 Member Posts: 61 EDU

    Appreciate everyone leaving feedback - apologies for not being in touch and not actively developing this. If I picked this project up again, I would re-write it with fewer 'accessory' features (e.g. thread callout, cosmetic threads, etc) and focus on modeled threads. @john_hauck's detailed post is especially instructive.

    @michael_zeagler , @Oliver_Couch , @MDesign , or anyone interested,

    Could you offer any comments on how your use cases align (or differ) with what @john_hauck described in his post? What are the most important features you would want to use in a modeled thread feature?

  • michael_zeaglermichael_zeagler Member Posts: 150 ✭✭✭

    @antlu65 no apology necessary! You don't owe us! Thanks for making the tool. It's great work.

    I personally use the tool for printed threads. Printing the threads into a part down to M3x.5 is really reliable and tends to be a lot like its own nylok nut. I generally have found my only wish to be the chamfering functionality I mentioned above.

    With Onshape implementing external cosmetic threads as time has gone on, I don't know if or when the last time I used it within threadlab. There's of course this feature request:

    actual cosmetic threads

    I'm not sure what progress there is on that front though.

    I'd really appreciate it if they'd put the same effect in the models that is in the drawings but we've all got to take what we get. They're always cooking back there.

    Thanks again for all your hard work. I looked into the featurescript and it sure looks like a ton of effort went into it.

  • MDesignMDesign Member Posts: 1,450 PRO

    I'm fairly new with the thread lab tool. I use it for internal threads but I have to remember to override the diameter of the hole that the onshape hole feature creates because thread labs adds geometry to the face of the hole instead of cutting it out like a tap. Thankfully I use mostly metric threads and don't have to look up the diameter every time.

  • michael_zeaglermichael_zeagler Member Posts: 150 ✭✭✭

    I'd think if you were going to model the threads you could go with the drilled option instead of the tap drill.

    This is just one more reason they need to fold it in. One checkbox for "modeled" in the tapped hold dialogue would let you dispense with all the complexity.

  • geoff_nutleygeoff_nutley Member Posts: 2

    Hi, I'm a real noob with onshape but learning something different each time. I am very fond of ThreadLab as it is a no fuss way of creating threads for 3D printing, but one thing I would like to get clarification on. On designing a nut I can only put the chamfer on one side of the nut and would like to have a chamfer on both sides. Is it possible to achieve this in ThreadLab? Thanks for any help and appreciate your work on this.

    Regards Geoff

  • ben_wilson405ben_wilson405 Member Posts: 12

    I've been having issues when where I un-click the Right-Handed threads (Left-Handed) it errors/wont generate the thread model. I took the advice of someone above to just mirror the part, but not having to do this process would be awesome.

    I'm just making some quick dust extraction adaptors as my supplier gave me 10 x 1.0m 50mm copper wire extraction tubes, not 1 x 10.0m. 😅

    image.png
  • vincent_guttmannvincent_guttmann Member Posts: 2

    Is it possible to get the script to pick up threads already created (but not modeled) with the hole tool?

  • eric_pestyeric_pesty Member, pcbaevp Posts: 2,801 PRO

    @antlu65 ,

    I noticed recently that the chamfer on internal threads isn't working as expected and leaves a flat face:

    image.png image.png

    I would expect this (achieved with a "replace face":

    image.png
  • julian_humphesonjulian_humpheson Member Posts: 2

    Firstly, it's a great tool and easy to use.

    It's probably my ineptitude, but I can't create LH modeled threads - is there soemthing I'm missing?

  • christoph_nelleschristoph_nelles Member Posts: 5

    Same issue, seems to be one of a couple of bugs. Steps to reproduce.

    1. create cylinder
    2. Create threadlabs feature on cylinder, it works
    3. deselect right-handed, it does not render anymore.. Changing direction, full-depth, offsets, has no effect.
  • christoph_nelleschristoph_nelles Member Posts: 5

    Sorry, cannot edit not-yet approved comments. It's a bug. Click on then check mark on right side in the top bar, and then switch to lefthanded, you will see an error "sweep_failed" with a stack trace.

    @opSweep : SWEEP_FAILED
    1388:12
    onshape/std/geomOperations.fs (const opSweep)
    418:5
    4016d9abcc9505b014621304/16768b2bb324869ae9ef80a7/03ff42c40ee658ac5067cb89 (Sweep)
    257:22
    5c0528b62c1fbb13a2a0e739/f86229e7f586f8517a2068a9/51b35814986c6c0b8c68eaea (MakeThreadBody)
    171:28
    5c0528b62c1fbb13a2a0e739/f86229e7f586f8517a2068a9/0866ba5eb30328888e6f18b4 (OpModeledThreads)
    257:19
    5c0528b62c1fbb13a2a0e739/f86229e7f586f8517a2068a9/7cbb452d4d5e963a034ce616 (ThreadLab_Main)
    155:9
    5c0528b62c1fbb13a2a0e739/f86229e7f586f8517a2068a9/7cbb452d4d5e963a034ce616 (const myFeature)
    55:17
    onshape/std/feature.fs (defineFeature)

    Part Studio 1 (ThreadLab)

  • cedric_mesnil343cedric_mesnil343 Member Posts: 7

    Hi @antlu65 , and thanks for ThreadLab

    I went digging in the code for a couple of features I needed, and along the way I ended up fixing the left-handed bug that's been reported in this thread. I'm posting the diagnosis and the fix here rather than sitting on it: it's a small, self-contained patch, and I'd much rather it lived upstream than only in a fork.

    Left-handed threads — diagnosis

    Single-start left-handed threads are actually fine. I measured the helix sense on an exported mesh and it comes out at exactly −2π·dz/lead, as it should.

    The bug is specifically left-handed + multi-start: sweeping the tooth profile along a left-handed helix degenerates as the lead grows. It leaves stray tool bodies at 2 starts and fails outright at 4 — inside MakeThreadBody, before any boolean operation.

    The fix — one function, MakeThreadBody

    Build the left-handed body as the exact mirror image of the right-handed one: a reflection across a plane containing the thread axis. A reflection maps a right-handed helix onto the left-handed helix of identical geometry, so it's exact by construction, and it reuses the well-tested right-handed path instead of the fragile one.

    Which is, amusingly, the same trick people in this thread were already doing by hand ("just mirror the part") — it just belongs inside the feature.

    Validated on a screw/nut bench (M10×1, radial offset 0.4 mm):

    starts        1        2        4        6
    right-hand    0.1986   0.1970   0.1935   0.1895
    left-hand     0.1986   0.1970   0.1935   0.1895
    

    Identical to 1e-4 mm. Helix senses opposite and matching 2π·dz/(n·P).

    Known limit: 8 starts still fails — but it fails for right-handed threads too. That's a pre-existing sweep limit at very high lead, unrelated to handedness. I didn't touch it.

    Two other things people have asked for in this thread

    • "Why does it add material to the hole instead of cutting it?" / "the callout should show the drill diameter, you can't tap a 5/8-18 in a hole drilled to 5/8"" — there's now a pilot (tap-drill) hole mode: model the hole at the diameter you'd actually drill it, and the major diameter is derived. The resulting solid is geometrically identical to the current behaviour (volumes agree to ~1e-7); only the input changes. ISO M10×1: pilot 8.917 → derived nominal 10.000.
    • Hole callouts: tapPitch was hardcoded to 0 and now carries the real pitch. Also, OpOffsets never refreshed the combined faceDescs array after rebuilding the per-class ones — harmless on the offset path, but it left the callout loop holding queries to faces a boolean had just destroyed.

    All of this lives in a fork, which I've renamed so nobody mistakes it for an official ThreadLab release. Full attribution and changelog are in the ThreadLabFeature.fs header:

    https://cad.onshape.com/documents/d6e2a398d0e7b37afe88fa92/v/5baac74752c62319f39eb1e0/e/6f533cbe3629180515986c2f

    The fork has since diverged further on the UI side, so it's no longer a drop-in patch as a whole — but the left-handed fix is, and it's yours if you want it, no strings. Happy to answer questions on any of it.

    (Disclosure: AI-assisted work — Claude. Every change was validated by measuring the resulting geometry through the API, and the regression benches are in the document so you can re-run the numbers rather than take my word for them.)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.