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!
edwilliams16
Veteran
Posts: 3112
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Coil Around A Rectangle

Post by edwilliams16 »

@mario52 The wiki says Python2 is required. Is that so?
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Coil Around A Rectangle

Post by mario52 »

Aloha edwilliams16

make today with

Code: Select all

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.21.29485 (Git)
Build type: Release
Branch: master
Hash: a236ca843fdd6674afb6d7ed1454fbd3b547f5ea
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: French/Mars(fr_MA)
Installed mods: 
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.
User avatar
onekk
Veteran
Posts: 6146
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Coil Around A Rectangle

Post by onekk »

mario52 wrote: Tue Aug 02, 2022 9:10 am Aloha edwilliams16

make today with

Code: Select all

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.21.29485 (Git)
Build type: Release
Branch: master
Hash: a236ca843fdd6674afb6d7ed1454fbd3b547f5ea
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: French/Mars(fr_MA)
Installed mods: 
mario
Yes but the wiki page mention in "the index" "Python2 required" and in the first sentence.

https://wiki.freecadweb.org/Macro_FCSpring_On_Surface


Plus this sentence is not very clear:
The value of the height of the BoundBox of the object, the X value of the center of the BoundBox, the Y value of the center of the BoundBox, and the Z value of the base of the BoundBox.
Probably is a remnant of other things, or it was an early explanation of the "Coordinate Begin" values?

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/
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Coil Around A Rectangle

Post by mario52 »

Hi

yes transition Pyside to Pyside2 now text is not current
onekk wrote: Tue Aug 02, 2022 9:18 am Probably is a remnant of other things, or it was an early explanation of the "Coordinate Begin" values?
yes, calcul the BounBox center and begin in base of the BounBox

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.
User avatar
onekk
Veteran
Posts: 6146
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Coil Around A Rectangle

Post by onekk »

mario52 wrote: Tue Aug 02, 2022 1:54 pm Hi
...
Thanks

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 »

The method of using the Draft Workbench as I mentioned earlier seems to be working fine, but I discovered that if you do not include the units when you enter a dimension in the Draft WB, it assumes mm. I should have started my project using mm, but I started with inches. I thought if the preferences was set to inches, all of the dimensions would be in inches, but in the Draft WB, if you do not expicity input the units as "in" or ", it assumes mm. That caused me a lot of confusion and waste of a lot of time. Also, the Table of point coordinates in a polyline are shown in mm even though the preferences is set to inches - more confusion.

The FCSpring_on_Surface macro looks like what I was looking for earlier. I will try it later on. I don't want to try it now because I have had some bad luck with macros in the past and had to uninstall FreeCAD and reinstall it to get rid of the problems one of the macros caused so I am a little leery to use macros. Looks very good though. None of the examples show wires wrapped around rectangular objects though.
Phil White
Posts: 10
Joined: Fri Jul 29, 2022 1:56 pm

Re: Coil Around A Rectangle

Post by Phil White »

Result of my most recent attempt at using FreeCAD to model an idea.
https://www.youtube.com/watch?v=t-pAukX8jEE
Post Reply