Coil Around A Rectangle

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
drmacro
Veteran
Posts: 8978
Joined: Sun Mar 02, 2014 4:35 pm

Re: Suggestion for Improvement

Post by drmacro »

Phil White wrote: Sat Jul 30, 2022 2:42 pm 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.
There was, if I recall, a rather long thread here with someone getting really deep into the shape of wrapping wire. He created a website with a lot of data about it. Hmm...yes found it: https://forum.freecadweb.org/viewtopic.php?f=3&t=47426

But, I don't see the website he had at one point but there are some Python scripts in the thread.

Edit: Found the link as well in the first post. http://www.daddyzaur.com/?p=231
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Phil White
Posts: 10
Joined: Fri Jul 29, 2022 1:56 pm

Re: Suggestion for Improvement

Post by Phil White »

This is what I have so far. https://drive.google.com/file/d/1c2Vcnm ... sp=sharing I want to wind coils around the U-shaped objects to generate small voltage and current pulses, but I don't know how to do that in FreeCAD. The objects with red and blue ends are magnets. The red and blue ends are the poles. Eventually, I want to tie the two coils together but two of the contacts touch the rotating switch so that the coils are open for parts of a cycle and closed for the other parts of a cycle.
User avatar
Shalmeneser
Veteran
Posts: 9546
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Suggestion for Improvement

Post by Shalmeneser »

Can you modify the title of your 1st post to something more useful ? eg. Coil around a rectangle
User avatar
onekk
Veteran
Posts: 6199
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Coil Around A Rectangle

Post by onekk »

Probably this could be an answer:

https://forum.freecadweb.org/viewtopic. ... 00#p441300

In the same topic already linked.

But is simply a sweep along a path, problem could be how to obtain the path.

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/
Phil White
Posts: 10
Joined: Fri Jul 29, 2022 1:56 pm

Re: Coil Around A Rectangle

Post by Phil White »

I'm getting closer, but it's tedious. https://drive.google.com/file/d/1eZ3-c8 ... sp=sharing
User avatar
onekk
Veteran
Posts: 6199
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Coil Around A Rectangle

Post by onekk »

Phil White wrote: Mon Aug 01, 2022 3:43 pm I'm getting closer, but it's tedious. https://drive.google.com/file/d/1eZ3-c8 ... sp=sharing
Are you using GUI?

If Yes it is tedious, scripting is more taylored for tedious work, making 100 or 1000 operation is a matter of a some parameters change in a for loop.

:D

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/
Phil White
Posts: 10
Joined: Fri Jul 29, 2022 1:56 pm

Re: Coil Around A Rectangle

Post by Phil White »

I know very little about FreeCAD. I'm using the Draft Workbench and trying to follow what Mads Leth Danielsen did. First create one turn by entering line segments point by point, then rounding the corners and using Array to duplicate it and then Part Workbench to sweep. I'm sure there must be a better, faster and easier way to do it. I still have a lot of work to do to get what I want.
drmacro
Veteran
Posts: 8978
Joined: Sun Mar 02, 2014 4:35 pm

Re: Coil Around A Rectangle

Post by drmacro »

Phil White wrote: Mon Aug 01, 2022 3:59 pm I know very little about FreeCAD. I'm using the Draft Workbench and trying to follow what Mads Leth Danielsen did. First create one turn by entering line segments point by point, then rounding the corners and using Array to duplicate it and then Part Workbench to sweep. I'm sure there must be a better, faster and easier way to do it. I still have a lot of work to do to get what I want.
Anything that doesn't use the Draft workbench to draw is faster... :mrgreen:

Did you look at the links I posted where the guy posted his Python for wrapping inductors?
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Phil White
Posts: 10
Joined: Fri Jul 29, 2022 1:56 pm

Re: Coil Around A Rectangle

Post by Phil White »

Yes, I looked at the torroidal windings, but I don't have a torroid and I also do not have the skills (or desire or time to learn) to write python code, scripts or macros. I don't know very much. If it isn't simple, I probably can't do it - unfortunately. It doesn't help that I will be 75 years old next month - age has its effects!
mario52
Veteran
Posts: 4690
Joined: Wed May 16, 2012 2:13 pm

Re: Coil Around A Rectangle

Post by mario52 »

Hi

try Macro_FCSpring_On_Surface Image

springRectangle00.gif
springRectangle00.gif (428.38 KiB) Viewed 669 times
but to sweep :
springRectangle00.png
springRectangle00.png (14.92 KiB) Viewed 669 times

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.
Post Reply