Coder Social home page Coder Social logo

Comments (19)

alexneufeld avatar alexneufeld commented on August 26, 2024 2

Yeah, I could do that. Busy at the moment, give me a few days to throw a PR together

from freecad_fastenerswb.

alexneufeld avatar alexneufeld commented on August 26, 2024 1

OK I gave it a shot:
I added a 'thread-die' object that implements what I think you are looking for. It starts with a hollow pipe and subtracts a length of outer diameter thread, to make an OD thread-cutting tool as requested. When modeled-thread is False, the inner diameter of the pipe becomes the major diameter of its thread size.

While I was at it, I also added a threaded rod object. If are using some standard threaded rod in a project, you can skip modelling a shaft and using the die object on it.

I was pleasantly surprised to see that the screw maker macro actually models a specifically inner diameter style thread when the tap tool is used. I left this functionality unchanged. Both the die and threaded rod objects use the proper OD threads.

issue_solv_p1

Some new and updated icons:

img2

My fork with the changes:
61a108d

Other things to note:
-The Die and Threaded Rod objects are not currently added when generating a BOM table.
-Warnings abut the memory/CPU intensive nature of modeled threads still apply. A 1m length of M6 threaded rod took 3 GB of ram and several minutes to compute on my PC.
-I tested the new features on V0.18 and 19, but I'm sure I missed a few bugs.

Check it out and tell me what you think!
Thanks,
Alex

from freecad_fastenerswb.

shaise avatar shaise commented on August 26, 2024

Interesting idea. I'm rather busy now, but I will add to the "todo" list.

from freecad_fastenerswb.

cram79 avatar cram79 commented on August 26, 2024

Hi Alex, what you describe is what I meant, that looks great, thank you for taking the time. How can I use what you have done though? ie I take it at the moment I can't just update the WB through Add-on Manager within FreeCAD.

from freecad_fastenerswb.

alexneufeld avatar alexneufeld commented on August 26, 2024

I have added a pull request for the changes. If/when it gets accepted, you will be able to use the new features through the addon manager.

If you are feeling impatient, you can download https://github.com/slowinternets/FreeCAD_FastenersWB as a zip file, and copy its contents into the correct directory.
On windows, it should be C:\user\Appdata\Roaming\FreeCAD\Mod\fasteners
Linux: ~/.FreeCAD/Mod/festeners
Extract the zip file and copy all of its contents to the proper directory.
For a more thorough tutorial, see: https://wiki.freecadweb.org/How_to_install_additional_workbenches

from freecad_fastenerswb.

shaise avatar shaise commented on August 26, 2024

@slowinternets ,
looks great! i'm on vacation now, I will take a look as soon as i return

from freecad_fastenerswb.

cram79 avatar cram79 commented on August 26, 2024

@slowinternets , Thank you again.

from freecad_fastenerswb.

cram79 avatar cram79 commented on August 26, 2024

@slowinternets, Thought I try and install and give it a spin, its great. But I just realised though when I went to use it that the icon and description don't match the function. ie The 'ScrewTap' tool icon creates a external thread, where a Tap should create a inner thread. I'm not sure the Tap function is working as expected (with ignoring the icons being dis-orientated) . For instance it seems to just create a rod with a inner thread, not actually cut a inner thread on a solid cylinder for instance. Sorry I'm greatly appreciative, just trying to add input.

from freecad_fastenerswb.

alexneufeld avatar alexneufeld commented on August 26, 2024

I am fairly certain that it works as intended, but I recognize that the logic behind these tools may be a bit unintuitive. I will try to explain more thoroughly:

The best way to think about it is that the screwTap and threadDie tools literally create the objects they are named for. Adding a screwTap object creates an actual thread cutting tap. But because we are working in CAD software and not real life, it doesn't quite look like a real tap. The same explanation applies for the threadDie.
tap
external-content duckduckgo com
Here is my workflow for using these tools in FreeCAD:

Start by creating some objects. A tap, a die, and a shaft/block for us to cut threads on.
expl_img1

Now, us the part workbench csg tool to subtract the die from the shaft, and the tap from the block:
expl_img2

Translate the new objects for a visual check that they fit together nicely.
expl_img3

Let's zoom in for a closer look:
expl_img4

We can see that the screwTap has created clearance at the top/bottom of the threads so that the threaded rod fits better. This is because the screwTap was generated with a different profile, specific to Inside Diameter threads.

the workflow for creating complex objects with CSG operations can certainly seem unintuitive. I hope this explanation was helpful.

Addendum:
when creating a shaft for use with the ThreadDie, I recommend making its diameter slightly larger or smaller than the diameter of the thread you want to cut (IE: 6.1mm or 5.9mm for an M6 thread). The openCASCADE software that actually calculates the subtraction operation tends to behave poorly when you try to work with exactly matching diameters.

from freecad_fastenerswb.

cram79 avatar cram79 commented on August 26, 2024

@ slowinternets , Thank you for the explanation I now understand that it is actually creating the 'tool' as such and than need to make a boolean cut to get the desired result. Yes it didn't seem intuitive to me to work that way. I was expecting to select circular edge of a cylinder then select the Die tool and have it 'cut the thread' resulting in a external thread.

from freecad_fastenerswb.

alexneufeld avatar alexneufeld commented on August 26, 2024

The new tools have been merged into the main branch, and are now available through the addon manager.

It would certainly be very cool to be able to go directly from a selected edge or face to a threaded part. However, that would be a much larger and more complicated feature to implement. For now, there are other things that I would like to add to the workbench first. If you are happy with the state of these tools at the moment, please consider closing this issue.

from freecad_fastenerswb.

ferdymercury avatar ferdymercury commented on August 26, 2024

Very nice tool, thanks so much! I have worked with it and have found a bug when working with more complex examples. I do not know if the bug is from FreeCAD directly, or something in this workbench? See https://forum.freecadweb.org/viewtopic.php?f=3&t=48241&p=412994

from freecad_fastenerswb.

ferdymercury avatar ferdymercury commented on August 26, 2024

Ok apparently, it was due to a 'coplanar issue'.

from freecad_fastenerswb.

luzpaz avatar luzpaz commented on August 26, 2024

What's left regarding the FR ?

from freecad_fastenerswb.

cfunseth avatar cfunseth commented on August 26, 2024

@alexneufeld Wonderful addition to the workbench, thank you!

Would it be difficult to add imperial or custom diameter and pitch sizes for the tap and die tools? I'm not familiar with how plugins are written but I'll jump in if someone here isn't able to figure it out easily.

from freecad_fastenerswb.

luzpaz avatar luzpaz commented on August 26, 2024

Can we close this ticket?
Where is the documentation for this feature?

from freecad_fastenerswb.

berberic2 avatar berberic2 commented on August 26, 2024

Can we close this ticket?
I would say: yes.

from freecad_fastenerswb.

shaise avatar shaise commented on August 26, 2024

Closing this issue as complete

from freecad_fastenerswb.

alexneufeld avatar alexneufeld commented on August 26, 2024

@shaise reminder to close this issue

from freecad_fastenerswb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.