Giter VIP home page Giter VIP logo

threadprofile's People

Contributors

galou avatar luzpaz avatar mwganson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

threadprofile's Issues

use wire instead of bspline

It would be nice to use a wire (list of edges) instead of one bspline as the profile. This way exact geometry can be created where possible (eg cylindrical faces are created from a arc) and edges are created on sharp corners. An example can be found in the gear-workbench:
looooo/freecad.gears#1 (comment)

Btw.: Helical projection is a great idea!

Helix is not putted to active body

Make helix button at active body fails with:

Running the Python command 'ThreadProfileMakeHelix' failed:
Traceback (most recent call last):
File "/home/tritol/.local/share/FreeCAD/Mod/ThreadProfile/./ThreadProfileCmd.py", line 399, in Activated
body.Group=body.Group+[getattr(doc,name)] #put helix in body to avoid out of scope warnings

Object can only be in a single GeoFeatureGroup

[code]
OS: Arch Linux
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.20)
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.9.13, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: Czech/Czech Republic (cs_CZ)
Installed mods:

  • MeshRemodel 1.8919.0
  • Estimate 0.1.2
  • DynamicData 2.46.0
  • 3DfindIT 1.2.0
  • Pyramids-and-Polyhedrons
  • slic3r-tools
  • POV-Ray-Rendering
  • fcgear 1.0.0
  • CurvedShapes 1.0.4
  • fasteners 0.3.50
  • Manipulator 1.4.9
  • Silk 1.0.0
  • 3D_Printing_Tools
  • Render 2022.2.0
  • ThreadProfile 1.81.0
  • Defeaturing
    [/code]

Blank page on Addon Manager

image

OS: Linux Mint 21.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.36220 (Git)
Build type: Unknown
Branch: main
Hash: 68fd2934cfcdb7b31d235d562412a5c04f55682e
Python 3.10.12, Qt 5.15.3, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * OpenDark 2023.12.17
  * ThreadProfile 1.89.0

Tech Draw WB Issue with TP imports

Hello Mark!
Thanks for this work bench and your YT content explaining it. I have used the Thread Profile WB to make projects with threads of all types, v, bottle, and buttress for 3d printing. I recently tried to make a tech drawing for a project and had issues with wild unconstrained lines coming from some parts with a Thread Profile based thread. I was having trouble with angled perspectives (like the default Home View) imported into a tech drawing. My original goal was to forsake drafting standards in my drawing and simply show an assembly view of some parts with fastening hardware and a few dimensions. I have since completed that project and moved on, but thought I might mention my issue I was having.
Full disclosure, the parts I was having trouble with had a somewhat hacked thread. I used your "M33 Fine 1.5" V-profile as a base and changed it to a 32.5mm minor diameter 1mm pitch for the internal thread, and 33mm minor diameter for the external mate. It worked great for 3d printing with a Prusa MK3.
Like I said, I have moved on from this project, but the project is posted with a freecad file here: https://www.thingiverse.com/thing:5016757

OS: Fedora 33.20211010.0 (Silverblue) (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.20.25997 (Git) AppImage
Build type: Release
Branch: master
Hash: 77b198048a63f1e9ca15eef64c8042d599a14cf3
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)

Thanks again,
-Jake

Please explain fields used in presets

In the ThreadProfileCmd.py file, at line 585, it uses 4.773. The comment at line 586 then quotes 4.891.

Later on at line 641, it says the default is for M6 x 1 internal. Yet at line 585, internal_or_external="External" is used.

I think the comments do not agree with the code.

At line 661, 4.773 and 4.917 are used. Why the difference between 4.891 and 4.917?

It would be helpful to add a comment at line 644 explicitly spelling out how the four items are used in the following lists.

If I wanted to add M7 x 0.5, for example, is it as simple as adding a single line after line 703 to the Python file?

Thanks.

Toolbar does not go away or go inactive when alternative workbench selected

When you switch workbenches from ThreadProfile, the menu changes to reflect the new workbench but the ThreadProfile toolbar does not disappear and remains active. An item for the toolbar does not appear in the view, toolbars menu when another workbench is active.

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.27422 (Git)
Build type: Release
Branch: master
Hash: d938733eaf2c2ce7cb18d1cbb56147185c473530
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United Kingdom (en_GB)

cannot find ThreadProfile icon

Hi,
I installed ThreadProfile 1.82.0, as described, restarted Freecad, but cannot find any toolbar icon to start....
please advise where to find it.
regards
Ludo

"Do sweep" button is always disabled

In Part design, draw a 15mm diameter circle. Extrude it 12mm.
Go to thread profile workbench.
Create a new V-thread. Select the M12x1.0 fine profile. Change the pitch to 0.5mm. Set height to 12mm. Set quality to 8,
Click "Make helix" and when asked "Do you want to incorporate this object into PartDesign Body using a wrap feature" select yes.
A 1mm diameter helix is created and not the 12mm expected.
Additionally, the "do sweep" button is disabled.
Do you know what is going wrong? Thank you.

selecting Thread Profile workbench: cannot import name '_ViewProviderWire' from 'Draft'

FC: 0.19, ThreadProfile workbench 1.69 (more details at bottom)

  1. Load this file) https://github.com/stepheneb/freecad-and-thread-profile-issue/blob/master/filter-tester-b1.FCStd
  2. Make body p40 active
  3. Switch to ThreadProfile workbench

May be related: https://forum.freecadweb.org/viewtopic.php?f=23&t=56711&p=490392#p490392

17:27:14  Traceback (most recent call last):
  File "/Users/stephen/Library/Preferences/FreeCAD/Mod/ThreadProfile/ThreadProfileCmd.py", line 43, in <module>
    from Draft import _DraftObject, getParam, _ViewProviderWire, formatObject, select
<class 'ImportError'>: cannot import name '_ViewProviderWire' from 'Draft' (/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/Draft.py)
17:27:15  Traceback (most recent call last):
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftviewproviders/view_wire.py", line 94, in attach
    self.symbol = gui_utils.dim_symbol()
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftutils/gui_utils.py", line 208, in dim_symbol
    marker = coin.SoSphere()
<class 'NameError'>: name 'coin' is not defined
17:27:15  Traceback (most recent call last):
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftviewproviders/view_wire.py", line 141, in onChanged
    super(ViewProviderWire, self).onChanged(vobj, prop)
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftviewproviders/view_base.py", line 293, in onChanged
    if self.texture:
<class 'AttributeError'>: 'ViewProviderWire' object has no attribute 'texture'
17:27:15  Traceback (most recent call last):
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftviewproviders/view_wire.py", line 141, in onChanged
    super(ViewProviderWire, self).onChanged(vobj, prop)
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftviewproviders/view_base.py", line 293, in onChanged
    if self.texture:
<class 'AttributeError'>: 'ViewProviderWire' object has no attribute 'texture'
17:27:15  Traceback (most recent call last):
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftviewproviders/view_wire.py", line 131, in onChanged
    if self.symbol:
<class 'AttributeError'>: 'ViewProviderWire' object has no attribute 'symbol'
17:27:15  Traceback (most recent call last):
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftviewproviders/view_wire.py", line 94, in attach
    self.symbol = gui_utils.dim_symbol()
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftutils/gui_utils.py", line 208, in dim_symbol
    marker = coin.SoSphere()
<class 'NameError'>: name 'coin' is not defined
17:27:15  Traceback (most recent call last):
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftviewproviders/view_wire.py", line 141, in onChanged
    super(ViewProviderWire, self).onChanged(vobj, prop)
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftviewproviders/view_base.py", line 293, in onChanged
    if self.texture:
<class 'AttributeError'>: 'ViewProviderWire' object has no attribute 'texture'
17:27:15  Traceback (most recent call last):
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftviewproviders/view_wire.py", line 141, in onChanged
    super(ViewProviderWire, self).onChanged(vobj, prop)
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftviewproviders/view_base.py", line 293, in onChanged
    if self.texture:
<class 'AttributeError'>: 'ViewProviderWire' object has no attribute 'texture'
17:27:15  Traceback (most recent call last):
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftviewproviders/view_wire.py", line 131, in onChanged
    if self.symbol:
<class 'AttributeError'>: 'ViewProviderWire' object has no attribute 'symbol'
17:27:15  Traceback (most recent call last):
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftviewproviders/view_wire.py", line 141, in onChanged
    super(ViewProviderWire, self).onChanged(vobj, prop)
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftviewproviders/view_base.py", line 293, in onChanged
    if self.texture:
<class 'AttributeError'>: 'ViewProviderWire' object has no attribute 'texture'
17:27:15  Traceback (most recent call last):
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftviewproviders/view_wire.py", line 141, in onChanged
    super(ViewProviderWire, self).onChanged(vobj, prop)
  File "/Applications/cad/FreeCAD.app/Contents/Resources/Mod/Draft/draftviewproviders/view_base.py", line 293, in onChanged
    if self.texture:
<class 'AttributeError'>: 'ViewProviderWire' object has no attribute 'texture'
17:27:15  AttachEngine3D::calculateAttachedPlacement:InertialCS: inertia tensor has axis of symmetry. Second and third axes of inertia are undefined.
17:27:15  AttachEngine3D::calculateAttachedPlacement:InertialCS: inertia tensor has axis of symmetry. Second and third axes of inertia are undefined.
17:27:15  AttachEngine3D::calculateAttachedPlacement:InertialCS: inertia tensor has axis of symmetry. Second and third axes of inertia are undefined.
17:27:15  AttachEngine3D::calculateAttachedPlacement:InertialCS: inertia tensor has axis of symmetry. Second and third axes of inertia are undefined.

OS: macOS 10.16
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 (Git)
Build type: Release
Branch: master
Hash: b2ca86d8d72b636011a73394bf9bcdedb3b109b7
Python version: 3.8.8
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)

Some questions about pitch

Hey, i was extremely relieved after finding your ThreadProfile Workbench, because for me as a beginner, the other options seemed to be way too complex. Unfortunally the accuracy of your tool is not really great i fear, probably because of using non-standard pitches.

The object i am trying to design is here:
https://forum.freecadweb.org/viewtopic.php?f=3&t=46254

So basically i just selected a M12x1 profile and changed the pitch to 0.5, since thats what a M12 board lens has. That doesnt work, the thread is too large after being 3d printed...

Is it generally possible to make a M12x0.5 thread or is my approach wrong?

Can not change Height?

If the Height parameter in VThreadProfile is changed the Additive Pipe breaks. In report view: "Recompute failed! Please check report view." If a new VThreadProfile is started any Height can be given but not changed after the AdditivePipe is made.

FreeCAD 0.20 29177 - 2022/06/13
ThreadProfile version 1,85

image

Missing option for generating trapezoid threads and other shapes

Hello.
I wanted to make a nut for trapezoid threads as often used in 3D printers, i.e. TR8, or TR10, or TR12...
Hereby I noticed that your otherwise great tool only allows metric threads (V-Shaped) and threads I never needed in my life before, but there is no flat thread (angle 90 degrees) and also no trapezoid one (slight angle on both sides, while top is flat).

May I suggest adding such profiles, too?

Also a rounded thread (half round profile) would be interesting. I saw such threads on filters for breath protection.
Conical threads would also be very useful.

Icon path in package.xml

Thanks for helping test the new package.xml file format! The icon path in the package.xml file should be relative to the content item's subdirectory: so in this case, drop the "ThreadProfile", so the path is just "Resources/Icons/ThreadProfileLogo.svg". The same applies to your other two workbenches.

45 degree thread for 3D printing

Is it possible to add a new type of thread, which is like metric but has a 45° angle instead of 60?
For 3D printing, it would make it a LOT easier for parts which you want to screw together. Typically, printers get good results with overhangs up to 45°. Metric is 60°, which doesn't work too well... printed supports take a lot of time to remove, and never look good.
Buttress thread is only 45°, but it's not symmetrical. So you have to print one part upside down, which isn't always possible either.

External threads generated are detached from body and body disappears.

Using FreeCAD 0.19 Thread Profile workbench v1.69 bug. More details at end.

Have this model generated:

image

But when I add the same thread on the left the constructed body disappears and only the new threads are visible.

image

5m video demonstrating issue: https://youtu.be/qCGIcOizI3Y

FIle used in the video demonstration uploaded here: https://github.com/stepheneb/freecad-and-thread-profile-issue/blob/master/filter-tester-b6.FCStd

NOTE: I have to first open FC without loading my file and open the Draft Workbench first. see #28

OS: macOS 10.16
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 (Git)
Build type: Release
Branch: master
Hash: b2ca86d8d72b636011a73394bf9bcdedb3b109b7
Python version: 3.8.8
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)

Cannot create long screw

Hi,

It is not possible to create long screw.

Repro steps:

  1. Create VthreadProfile
  2. set Presets to M4 fine 0.5
  3. set High to 30mm
  4. create helix
  5. create thread profile by threadprofile workbench sweep

as result there is something strange - screen attached.
image

FreeCAD version:

[code]
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.2.29177 +426 (Git)
Build type: Release
Branch: (HEAD detached from 0.20.2)
Hash: 930dd9a76203a3260b1e6256c70c1c3cad8c5cb8
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: Polish/Poland (pl_PL)
Installed mods:

  • A2plus 0.4.60k
  • Assembly4 0.12.6
  • Curves 0.6.8
  • ExplodedAssembly
  • fasteners 0.4.55
  • freecad.gears 1.0.0
  • lattice2 1.0.0
  • Manipulator 1.5.0
  • ThreadProfile 1.84.0
    [/code]

custom profiles from helical projection of a sketch

it would be nice to create faces from a planar sketch by an helical projection.

The idea is to create a set of points from every geometry element in the sketch and interpolate there points by a bspline. The result then is flat face which can be used to create any kind of thread-profile.

how to script generating a helix and shapebinder ... ??

Working on figuring out how to script the thread profile workbench. Thanks for any help or tips.

Here's the current state of my test macro.

file: vtp_test.FCMacro

# -*- coding: utf-8 -*-

import FreeCAD as App
import FreeCADGui as Gui
import sys
import Part
import ThreadProfileCmd

minor_diameter = 30
thread_pitch = 2.0
thread_count = 3

try:
    vtp_test = App.getDocument("vtp_test1")
except NameError:
    vtp_test = App.newDocument("vtp_test1")

vtp_body = vtp_test.getObject('vtp_body')
if (id(vtp_body) == id(None)):
    vtp_body = vtp_test.addObject('PartDesign::Body','vtp_body')
else:
    vtp_body.removeObjectsFromDocument()


# make vthreadprofile
vtp = ThreadProfileCmd.ThreadProfileCreateObjectCommandClass().makeThreadProfile('VThreadProfile')
vtp_body.addObject(vtp)
vtp.InternalOrExternal = 'External'
vtp.MinorDiameter = minor_diameter
vtp.Pitch = thread_pitch
vtp.ThreadCount = thread_count
vtp_body.recompute()

# make helix and associates shapebinder
ThreadProfileCmd.ThreadProfileMakeHelixCommandClass();
# ... ??

# sweep shapebinder along thread profile
# ... ??

Gui.ActiveDocument.ActiveView.viewIsometric()
Gui.ActiveDocument.ActiveView.fitAll()

would it be hard for me to add a multi-lead thread feature?

Edit: What I want is to be able to do set the lead -- I think some of places I use the term pitch below is incorrect. See: https://www.harveyperformance.com/in-the-loupe/multi-start-thread-guide

I'd like to make custom multi-lead thread pattern using part of the standard v-shaped profile.

I'm making some parts that mate using a three-lead thread that is somewhat similar to what mason jars use. Imagine a cap fora cylinder between 50 and 70mm in diameter.

I haven't looked at the code yet but I thought I might for example be able to start with a thread shape that is normally used at a pitch of 1mm and increase that pitch to six mm and then combine three variants sweep objects each rotated at 120 degrees.

But when I start with an external thread with a 50mm mm minor diameter, a 1 mm pitch and a thread count of 10 that looks like this:

image

And then change the pitch to 6 mm with a thread count of 2 the size of the swept profile greatly increase in size like this:

image

So currently the size of the swept thread seems to only be affected by the radius and the pitch setting in the VThreadProfile object.

It seems like a first step might be to expose an attribute for the thread swept profile size. Normally this would just be set by the minor diameter and the selected pitch -- but if overridden I could change the thread profile size back to the swept profile size used in the 50 mm diameter by 1.0 pitch.

If you think it's not too hard to extend your modeling to support this I'd be happy to try implementing it.

Here's an example of what I'm trying to generate in FreeCad:

image

Add Profiles/Support for NPT or Other Tapered Threads

Is it possible to add support for NPT or other tapered threads (e.g. BSP)? I was not sure if it was possible for the current code to deal with a tapered thread/helix, such as passing the thread taper off to the helix as an angle, or if they had to be built manually. The thread taper angle for all NPT is constant across all sizes so it could be defined as a fixed parameter. I was starting to build my own using the Part Helix command based upon data at this link: https://www.machiningdoctor.com/charts/thread-npt-charts/. However, it would be very useful if some of these were available as presets. Thank you.

Icons disappeared after restart v0.19

I installed this yesterday and played around with it a bit. This morning I pulled up freecad 0.19 again and the icons are gone. (not in part design, part, etc)

I even removed it completely, restarted and reinstalled it and I cannot get them to return. (fedora 34)

Am I missing something incredibly simple?

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.