Coil Around A Rectangle
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
-
- Posts: 10
- Joined: Fri Jul 29, 2022 1:56 pm
Coil Around A Rectangle
I've been trying to find an automatic way of making a model of wrapping a wire in the form of a helix around an arbitrary object such as a cube. There is a way to wrap a helix around circular objects, but, as far as I can tell, there is no way of wrapping a wire (using a sweep) around an arbitrary object. If this feature was available, it would be very useful. It seems to me, it would not be too difficult to implement. I am, for example, trying to model the wrapping of wire around a retangular object to simulate one winding of a transformer. I think I can do this manually using the Draft Workbench, but it would be much easier if this could be done automatically.
Last edited by Phil White on Sun Jul 31, 2022 11:36 pm, edited 1 time in total.
Re: Suggestion for Improvement
To do an oddly shaped form, that would need to be a Sweep. I made this macro to make Sweeps easier to do.
https://forum.freecadweb.org/viewtopic. ... 63#p599468
https://forum.freecadweb.org/viewtopic. ... 63#p599468
-
- Posts: 10
- Joined: Fri Jul 29, 2022 1:56 pm
Re: Suggestion for Improvement
Yes, I realize it would be a helical type sweep but around an object of any shape not just a cylinder or circular shape.
Re: Suggestion for Improvement
You might have a look at the techniques bugman uses in his YouTube videos:
https://youtu.be/Y716n_Xe-CM
https://youtu.be/ou92FEz1lT0
https://youtu.be/Y716n_Xe-CM
https://youtu.be/ou92FEz1lT0
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Suggestion for Improvement
There is no automatic way that I know of in FreeCAD. I guess you could write a feature request or if you write code then try your hand. It would be nice to know exactly how the helix code works, after-all it's a 3D object and we can sweep it, that makes it very unique. This makes me wonder how hard it would be to make a 3D sketch.but it would be much easier if this could be done automatically.
-
- Posts: 10
- Joined: Fri Jul 29, 2022 1:56 pm
Re: Suggestion for Improvement
I've seen bugman's videos, but they are hard for me to follow. I'm new to FreeCAD - any CAD for that matter - and I do not have the skills to add code. I've learned the most from the videos by Mads Leth Danielsen about the Draft Workbench https://www.youtube.com/watch?v=0AXm6Our05I , and I think I should be able to create a path around the object I want to wind a coil around and do a sweep as he shows. I still need to learn a little more.
Re: Suggestion for Improvement
The newer workbenches are arguably easier to use. Even Mads says he spent 4 years exclusively learning Draft workbench.Phil White wrote: ↑Fri Jul 29, 2022 8:08 pm I've seen bugman's videos, but they are hard for me to follow. I'm new to FreeCAD - any CAD for that matter - and I do not have the skills to add code. I've learned the most from the videos by Mads Leth Danielsen about the Draft Workbench https://www.youtube.com/watch?v=0AXm6Our05I , and I think I should be able to create a path around the object I want to wind a coil around and do a sweep as he shows. I still need to learn a little more.
Most consider Draft workbench for general drawing to be cumbersome. It has some advanced tools that are very useful, but are not general drawing tools (such as the array tools). Sketcher is far easier. But for creating 3D paths, Draft polyline is useable, though, IMO, clumsy. Curves workbench Freehand spline is somewhat better, but, takes some effort to get comfortable.
Bugman uses, what appears to be tricky or advanced techniques, but, he really bends FreeCAD tools in unique ways to accomplish his goals.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Suggestion for Improvement
Similar shapes could be achieved mapping a geom2d line to something like a torus or a cone or a cylinder made offsetting the original shape.
It is not impossible to obtain, but with GUI I don't kniw how it could be achieved, with Scripting is not too hard and there are some examples around asa I return near a computer I think I have recorded some links to other forum posts where similar things are done.
Regards
Carlo D.
It is not impossible to obtain, but with GUI I don't kniw how it could be achieved, with Scripting is not too hard and there are some examples around asa I return near a computer I think I have recorded some links to other forum posts where similar things are done.
Regards
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
Re: Suggestion for Improvement
Hi
tray this macro Macro_D_Un_Jour_Rotation_D_Un_Fil_Sur_Un_Fil
examples use:
by drmacro Sweep helix along a path
mario
tray this macro Macro_D_Un_Jour_Rotation_D_Un_Fil_Sur_Un_Fil
examples use:
by drmacro Sweep helix along a path
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
My macros on Gist.github here complete macros Wiki and forum.
-
- Posts: 10
- Joined: Fri Jul 29, 2022 1:56 pm
Re: Suggestion for Improvement
If you look at an end view of the coils previously posted here, you will see that they are either cicular or square. However, if you look at the end view of the coils of most real transformers, they are not square or circular but a rectangle where two sides are longer than the other two sides. I want to create a coil that wraps around that kind of rectangular shape. There may already exist some way to do this, but I am just learning FreeCAD and learning it seems very difficult because there are so many Workbenches and Macros.