Macro FCSpring Helix Variable

FCSpring Helix Variable.png Macro FCSpring Helix Variable

Description
Creates a spring with helix variable.
Author
Mario52
Links
Macros recipes
How to install macros
How to customize toolbars
Version
01.12
Date last modification
2017-04-03


Description

This macro creates a spring with customizable, any turn may change the spring configuration can be saved in a file with the extension .FCSpring

FCSpring Helix Variable

Use

This section is used to configuration the spring

Schematic detail of spring configuration

Macro TruncateSpring 01.png

Gui

Macro FCSpring Helix Variable 01.png

First section, spring configuration

Macro FCSpring Helix Variable 02.png

Second section, type line

Macro FCSpring Helix Variable 03.png

Third section, selection

This section is displayed if on object is selected. The type object is displayed in the Text Editor

The object can be line, 2 points, circle, wire ... one axis the length of the spring is automatically created

Detection : Cylinder (radius), Sphere (radius), Toroid (radius) , Cone (little radius), Circle (radius), Arc (radius), Ellipse (little radius)

Position (0)(xx)

(0)(xx) : Number selection(s), length in mm of axis created x 10, egual number of points for shifting the spring of the axis

Macro FCSpring Helix Variable 02 2.png

Four section, coil special length

Macro FCSpring Helix Variable 04.png

Commands

Macro FCSpring Helix Variable 05.png

Report view

The window report view displayed all value modified.

Macro FCSpring Helix Variable 06.png

Example spring

Example to spring modified

Macro FCSpring Helix Variable 07.png

Example Report view

When the macro is launched full list of turns is displayed in tabular form.

Here the data of the spring above and displayed in the Report view Macro FCSpring Helix Variable 08.png

Icon

Download the file image and copy in your macro repertory.

Click the image, in the new window position the mouse over the image, click the right mouse and do "Save target as ..."

ToolBar button
Button

Macro icons

FCSpring Helix Variable Icon 01.png FCSpring Helix Variable Icon 02.png FCSpring Helix Variable Icon 02b.png FCSpring Helix Variable Icon 03.png FCSpring Helix Variable Icon 03b.png FCSpring Helix Variable Icon 04.png FCSpring Helix Variable Icon 05.png FCSpring Helix Variable Icon 06.png

Script

Macro_FCSpring_Helix_Variable.FCMacro

Download the macro to Gist Macro_FCSpring_Helix_Variable

Examples









Links

The forum discussion Try to do a Spring

Project

spring solid truncated

soften fittings :done

modify diameter to any coil :done

Version

03/04/2017: ver 01.12: correction bug line 2314 add "global ui"

11/12/2016: ver 01.11: Adding Position of the spring on a selected object

10/09/2016: ver 01.10: Adding Button "Zoom" enlarge the textedit window

04/09/2016: ver 01.09: add smoothing

16/03/2016: ver 01.08 : correct and add "int()" to debutAngle and finAngle (read file)

02/03/2016: ver 01.07 : add option reverse spring

08/02/2016: ver 01.06 : correct bug angle cause "modifyAngle = int(file.readline().rstrip('\n\r')) # 9" modifyAngle is int() not char

07/01/2015: ver 01.05 : adding "Try ...Except" (data cone) for compatibility with old version

07/01/2015: ver 01.04 : adding spring conical and modify the path to "UserAppData" and adding the icone.

07/12/2014: ver 01.03 : new version with radius coil adjustable

17/11/2014: ver 1.02 : new version with GUI and modification any coil and save or load the data to disk.

10/11/2014: (23h20) correction of the modification

ligne.Placement = App.Placement(App.Vector(0.0,0.0,0.0), App.Rotation(App.Vector(0,0,1),angleTr), App.Vector(0,0,0)) 

10/11/2014: modify line 44 :

a = FreeCAD.ActiveDocument.Line.Placement=App.Placement(App.Vector(0.0,0.0,0.0), App.Rotation(App.Vector(0,0,1),angleTr), App.Vector(0,0,0)) 

to

ligne = FreeCAD.ActiveDocument.Line.Placement=App.Placement(App.Vector(0.0,0.0,0.0), App.Rotation(App.Vector(0,0,1),angleTr), App.Vector(0,0,0)) 

6/11/2014 : adding "makeBSpline" and configuration

Limitations

During sweep tests here are the mistakes I have obtained !




Online version: "http://www.freecadweb.org/wiki/index.php?title=Macro_FCSpring_Helix_Variable&oldid=271884"

Navigation menu