Macro FC Convert Lines: Difference between revisions

From FreeCAD Documentation
(Marked this version for translation)
(Marked this version for translation)
 
(31 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<languages/>
<translate>
<translate>

<!--T:1-->
<!--T:13-->
{{Macro|Icon=Text-x-python|Name=Macro FCConvertLines|Description=This macro convert the object line, wire in line Dash, DashDot or DashDotDot with the dimensions given.
{{Macro
.|Author=mario52}}
|Name=Macro FC Convert Lines
|Icon=Macro_FCConvertLines.png
|Description=This macro convert the object line, wire in line Dash, DashDot or DashDotDot with the dimensions given.
|Author=mario52
|Version=00.07b
|Date=2020-11-09
|FCVersion=All
|Download=[https://www.freecadweb.org/wiki/images/e/e2/Macro_FCConvertLines.png ToolBar Icon]
}}

==Description== <!--T:53-->

<!--T:14-->
This macro convert the object line, wire in line Dash, DashDot, DashDotDot, ZigZag, Hand with the dimensions given.
</translate>
</translate>
{{Codeextralink|https://gist.githubusercontent.com/mario52a/3d719574089a5f9044ec/raw/812769b6b296a1da2e9c8cd8153ad7266fe80f8d/Macro_FCConvertLines.FCMacro}}
<translate>
<translate>
==Description== <!--T:2-->
This macro convert the object line, wire in line Dash, DashDot or DashDotDot with the dimensions given.


<!--T:3-->
[[File:Macro FCConvertLines 00.png|400px|left|ConvertLines Dash, Dash dot, Dash dot dot]]
</translate>
</translate>
[[File:Macro FCConvertLines 00.png|400px]]
<translate>
<!--T:15-->
{{Caption|ConvertLines Dash, Dash dot, Dash dot dot}}


==Usage== <!--T:54-->

<!--T:16-->
Copy the macro in your macros folder and launch FCConvertLines Gui

<!--T:55-->
[[File:Macro FCConvertLines 01.png|left|FCConvertLines Gui]]

</translate>
{{clear}}
{{clear}}
<translate>
<!--T:17-->
First section :


<!--T:18-->
Cut line (Checked by default)
[[File:Macro FCConvertLines 02.png|left|FCConvertLines]]
* Select one or more lines in the 3D View
* '''SpinBox''' : for enter number Cuts or cut to length ... (Default number cut suffix displayed "x Cut")
* '''Create L.''' : if this checkbox is checked the line is created
* '''Dimension''' : if this checkbox is checked the number tipped is on length the definition change by tree decimal and the suffix displayed is "x.000 Dim"
* '''Bicolor''' : if this checkbox is checked the lines created are colored alternately Red White if is not checked the color is the color defined with the button {{KEY|Color}}
* '''Points''' : if this checkbox is checked one point is created and the color is the color defined Bicolor or * The options '''Options lines''' are available
Color
</translate>
{{clear}}
<translate>
<translate>


==Use== <!--T:4-->
<!--T:19-->
Second section :
Copy the macro in your macros folder or in the Python console and launch with :


<!--T:5-->
<!--T:20-->
Type line : Dash
*'''dash01''' = first line '''A'''
[[File:Macro FCConvertLines 03.png|left|FCConvertLines]]
*'''space01''' = first space '''B'''
* The screen at the bottom of the macro change in line Dash
*'''dash02''' = second line '''C'''
* Select one or more lines in the 3D View
*'''space02''' = second space '''D'''
* '''Line A''' : dimension of the dash (see '''A''' in the screen)
*'''compLine''' =
* '''Space B''' : dimension of the space (see '''B''' in the screen)
#if compLine = 0 : each selection will be an object (mode to default)
* The lines have created the configuration specifications set in options lines
#if compLine = 1 : all selections are encompassed into a single element
</translate>
*'''red''' = value for the color red (0 to 255)
{{clear}}
*'''green''' = value for the color red (0 to 255)
<translate>
*'''blue''' = value for the color red (0 to 255)
<!--T:21-->
*'''typeLine''' =
Third section :
#if typeLine = 1 : Dash
#if typeLine = 2 : DashDot
#if typeLine = 3 : DashDotDot


<!--T:22-->
Type line : DashDot
[[File:Macro FCConvertLines 04.png|left|FCConvertLines]]
* The screen at the bottom of the macro change in line DashDot
* Select one or more lines in the 3D View
* '''Line A''' : dimension of the dash (see '''A''' in the screen)
* '''Space B''' : dimension of the space (see '''B''' in the screen) (May be different D)
* '''Line 2 C''' : dimension of the dash (see '''C''' in the screen)
* '''Space 2 D''' : dimension of the space (see '''D''' in the screen) (May be different B)
</translate>
</translate>
{{clear}}
<translate>
<translate>
==Examples== <!--T:6-->
<!--T:23-->
Fourth section :
'''Line Dash''' : typeLine = 1

[[File:Macro_FCConvertLines_Dash.png|left|ConvertLines Dash]]
<!--T:24-->
Type line : DashDotDot
[[File:Macro FCConvertLines 05.png|left|FCConvertLines]]
* The screen at the bottom of the macro change in line DashDotDot
* Select one or more lines in the 3D View
* '''Line A''' : dimension of the dash (see '''A''' in the screen)
* '''Space B''' : dimension of the space (see '''B''' in the screen)
* '''Line 2 C''' : dimension of the dash (see '''C''' in the screen)
* '''Space 2 D''' : dimension of the space (see '''D''' in the screen)
</translate>
</translate>
{{clear}}
{{clear}}
<translate>
<syntaxhighlight>
<!--T:25-->
dashLine(dash01 = 2.0, space01 = 0.5, red = 200, green = 0, blue = 0, typeLine = 1)
Fifth section :
</syntaxhighlight>


<!--T:26-->
Type line : ZigZag
[[File:Macro FCConvertLines 06.png|left|FCConvertLines]]
* The screen at the bottom of the macro change in line ZigZag
* This line are created
* '''Number heads''' : number of heads for the total line
* '''{{KEY|_____140.0_____}}''' : The length total of the line are calculate in real time and displayed in this window
* '''Begin A''' : dimension of begin line until first head, this section line hare same in the end line (see '''A''' in the screen)
* '''Dimension B''' : dimension between the end and begin head (see '''B''' in the screen)
* '''Gap C''' : dimension of the head (see '''C''' in the screen)
* '''Height D''' : height dimension of the the head (see '''D''' in the screen)
* '''Number E''' : number of heads contiguous (see '''E''' in the screen)
* The options '''Plane''' and '''Options lines''' are available
</translate>
{{clear}}
<translate>
<translate>
<!--T:7-->
<!--T:27-->
Sixth section :
'''Line DashDot''' : typeLine = 2

[[File:Macro_FCConvertLines_DashDot.png ‎|left|ConvertLines Dash dot]]
<!--T:28-->
Type line : Hand
[[File:Macro FCConvertLines 07.png|left|FCConvertLines]]
* This line are created
* '''Length A''' : The length total of the line (see '''A''' in the screen)
* '''Height B''' : Height of the line (see '''B''' in the screen)
* '''Wave''' : compression or uncompress of the wave (see '''Wave''' in the screen)
* The options '''Plane''' and '''Options lines''' are available
</translate>
</translate>
{{clear}}
{{clear}}
<syntaxhighlight>
dashLine(dash01 = 2.0, space01 = 0.5, dash02 = 0.2, red = 200, green = 0, blue = 0, typeLine = 2)
</syntaxhighlight>
<translate>
<translate>
<!--T:29-->
Seventh section :


<!--T:8-->
<!--T:30-->
Options line :
'''Line DashDotDot''' : type Line = 3
[[File:Macro_FCConvertLines_DashDotDot.png|left|ConvertLines Dash dot dot]]
[[File:Macro FCConvertLines 08.png|left|FCConvertLines]]
This options are available for all menu
*{{KEY|__2,00 Width__}} : dimension of the width of the line(s)
*{{KEY|__2,00 Point S__}} : dimension of the points of the line(s)
*{{KEY|Color}} : color of the line(s) this button are colored with the color selected (if the checkbox "Bicolor" in the menu "Cut line" is checked this option are not used for this menu)
</translate>
{{clear}}
{{clear}}
<translate>
<!--T:31-->
Eighth section :

<!--T:32-->
Option Plane

<!--T:33-->
This option are available only for '''"ZigZag"''' and '''"Hand"'''
[[File:Macro FCConvertLines 09.png|left|FCConvertLines]]
* '''XY''' : Plane XY
* '''YZ''' : Plane YZ
* '''XZ''' : Plane XZ
</translate>
</translate>
{{clear}}
<syntaxhighlight>
<translate>
dashLine(dash01 = 2.0, space01 = 0.5, dash02 = 0.2, space02 = 0.5, red = 200, green = 0, blue = 0, typeLine = 3)
<!--T:34-->
</syntaxhighlight>
Ninth section :


<!--T:35-->
Button
[[File:Macro FCConvertLines 10.png|left|FCConvertLines]]
{{clear}}
* {{KEY|Save type}} : the line configured is saved in one file (one file for one type line). While saving a file header is predetermined depending on the chosen menu (example : Dash is saved, in the save window is displayed "Dash_.FCConvertL" you can modify to "Dash_my_config_10.FCConvertL" or the name you want... this method allow sharpens clear)
* {{KEY|Load type}} : load one file configured
* {{KEY|Name type line________________}} : name of the type configured this name is saved in the file
* {{KEY|Reset}} : reset the data's in the original configuration
* {{KEY|Create Comp}} : this button create on compound with the lines created (ten lines selected = one compound)
* {{KEY|Create}} : create the lines separately (ten lines selected = ten lines created)
* {{KEY|Quit}} : quit the macro
</translate>
{{clear}}
<translate>


== The files to copy in your directory with the macro (10 files images)== <!--T:36-->

<!--T:56-->
'''The icon for the toolBar'''
</translate>
[[File:Macro_FCConvertLines.png|left|Macro_FCConvertLines]]
{{clear}}
'''Title'''
[[File:Macro_FCConvertLines_Title.png|left|ConvertLines_Title]]
{{clear}}
'''Line Dash''' :
[[File:Macro_FCConvertLines_Dash.png|left|ConvertLines_Dash]]
{{clear}}
'''Line DashDot''' :
[[File:Macro_FCConvertLines_DashDot.png ‎|left|ConvertLines Dash dot]]
{{clear}}
'''Line DashDotDot''' :
[[File:Macro_FCConvertLines_DashDotDot.png|left|ConvertLines Dash dot dot]]
{{clear}}
'''Line Zigzag''' :
[[File:Macro_FCConvertLines_Zigzag.png|left|ConvertLines_Zigzag]]
{{clear}}
'''Line Hand''' :
[[File:Macro_FCConvertLines_Hand.png|left|ConvertLines_Hand]]
{{clear}}
'''View''' :
{{clear}}
[[File:Macro_FCConvrtLines_View-front.png|ConvrtLines_View-front]] [[File:Macro_FCConvrtLines_View-right.png|ConvrtLines_View-right]] [[File:Macro_FCConvrtLines_View-top.png|ConvrtLines_View-right]]
{{clear}}
<translate>
<translate>


===Script=== <!--T:9-->
==Script== <!--T:57-->

<!--T:37-->
Copy the macro '''Macro_FCConvertLines.FCMacro''' in your macros folder.

<!--T:38-->
The script on Gist [https://gist.github.com/mario52a/3d719574089a5f9044ec Macro_FCConvertLines.FCMacro]

<!--T:58-->
ToolBar icon [[Image:Macro_FCConvertLines.png]]

</translate>
</translate>


'''Macro_FCConvertLines.FCMacro'''
'''Macro_FCConvertLines.FCMacro'''


<translate>
<syntaxhighlight>
==Examples== <!--T:59-->
import Draft, Part


<!--T:39-->
__title__ = "FCConvertLines"
Example dot, dash dot, dash dot, dash dot dot
__author__ = "Mario52"
[[File:Macro FCConvertLines 11b.png|center|500px]]
__url__ = "http://www.freecadweb.org/index-fr.html"
</translate>
__version__ = "00.01"
{{clear}}
__date__ = "19/01/2016"
<translate>
<!--T:40-->
Example hand, zigzag
[[File:Macro FCConvertLines 11.png|center|500px]]
</translate>
{{clear}}
<translate>
<!--T:41-->
Example hand
[[File:Macro FCConvertLines 012.png|center|500px]]
All lines created the configuration specifications set in this Option lines
</translate>
{{clear}}
<translate>
<!--T:42-->
Example hand can make beautiful sine wave or totally anarchic
[[File:Macro FCConvertLines 013.png|center|500px]]
{{clear}}


<!--T:47-->
def dashLine(dash01 = 2.0, space01 = 1.0, dash02 = 1.0, space02 = 1.0, compLine = 0, red = 0, green = 0, blue = 0, typeLine = 1):
Example convert ShapeString to sketch (the curves hare not authorized for convert Shape to Sketch)
# typeLine = 1 "_ _ _ _ _ _ _ _ _ " dash (dash01, space01)
[[File:ShapeString To Sketch.gif|center]]
# typeLine = 2 "___ _ ___ _ ___ _ " dash dot (dash01, space01, dash02)
# typeLine = 3 "___ _ _ ___ _ _ ___" dash dot dot (dash01, space01, dash02, space02)
def createLines(numberOfPoints, points):
space = 0
for lin in range(numberOfPoints-1):
if space == 0:
creaLine = [FreeCAD.Vector(points[lin]),FreeCAD.Vector(points[lin+1])]
wire = Draft.makeWire(creaLine,closed=False,face=False,support=None)
space = 1
ligne.append(wire.Shape) # for compount
nom.append(wire.Name) # for compount
else:
space = 0
# si pas possible affiche cette ligne # Cannot compute Inventor representation for the shape of Shape.


</translate>
def colorize():
{{clear}}
FreeCADGui.activeDocument().activeObject().LineColor = (float(red)/255,float(green)/255,float(blue)/255)
<translate>
FreeCADGui.activeDocument().activeObject().PointColor = (float(red)/255,float(green)/255,float(blue)/255)
FreeCADGui.activeDocument().activeObject().ShapeColor = (float(red)/255,float(green)/255,float(blue)/255)


==Version== <!--T:43-->
if dash01 and space01 and dash02 and space02 != 0:
nom = []; nom[:] = []
ligne = []; ligne[:] = []
comp2 = []; comp2[:] = []
points = []; points[:] = []
points2 = []; points2[:] = []
precision = 1000 # permet 3 decimales = 0.001
dash01 = dash01 * precision
space01 = space01 * precision
dash02 = dash02 * precision
space02 = space02 * precision
try:
#######Selectionne un ou des objets vue 3D ou vue combinnee (subObjects complete) getSelection()############################
# compt_Oject = -1 #
# selectionObjects = FreeCADGui.Selection.getSelection() # Select an object or primitive getSelection()
# for selection in enumerate(selectionObjects): #
# compt_Oject += 1 #
# compt_Edges = -1 #
# for selectedEdge in enumerate(selectionObjects[compt_Oject].Shape.Edges): # Search the "Edges" and their lengths
# compt_Edges += 1 #
# longueur = (selectionObjects[compt_Oject].Shape.Edges[compt_Edges].Length) * precision #
# if (dash01 + space01 + dash02 + space02) >= longueur: #
# dash01 = int(longueur / 6) # altenate solution
# space01 = int(longueur / 6) # altenate solution
# dash02 = int(longueur / 6) # altenate solution
# space02 = int(longueur / 6) # altenate solution
# FreeCAD.Console.PrintError("Alernate Dash"+"\n") # altenate solution
# numberOfPoints = longueur #
# points = selectionObjects[compt_Oject].Shape.Edges[compt_Edges].discretize(int(numberOfPoints)) # Dicretize
############################################################################################################################
#####selection 1 objet ou sous objet a la fois dans la vue 3D getSelectionEx()#############################################
selectionObjects = FreeCADGui.Selection.getSelectionEx() # Select an object or sub object getSelectionEx
for selection in selectionObjects: #
for selectedEdge in selection.SubObjects: #
longueur = (selectedEdge.Length) * precision #
if (dash01 + space01 + dash02 + space02) >= longueur: # altenate solution
dash01 = int(longueur / 6) # altenate solution
space01 = int(longueur / 6) # altenate solution
dash02 = int(longueur / 6) # altenate solution
space02 = int(longueur / 6) # altenate solution
FreeCAD.Console.PrintError("Alernate Dash"+"\n") # altenate solution
numberOfPoints = longueur #
points = selectedEdge.Edges[0].discretize(int(numberOfPoints)) # Dicretize
###########################################################################################################################
#######cut line in dashDot coordinates#########################################################################
compt = 0
points2 += [points[0]]


<!--T:52-->
for ii2 in range(len(points)):
ver 00.07b 09/11/2020 correct bug # (ajoute recompute() pour corriger)# Cannot compute Inventor representation for the shape of Shape. And Line by Label
try:
compt += int(dash01)
points2 += [points[compt]]
compt += int(space01)
points2 += [points[compt]]
if typeLine > 1: # typeLine = 2 "___ _ ___ _ ___ _ " dash dot
compt += int(dash02)
points2 += [points[compt]]
compt += int(space01)
points2 += [points[compt]]
if typeLine > 2: # typeLine = 3 "___ _ _ ___ _ _ ___" dash dot dot
compt += int(dash02)
points2 += [points[compt]]
compt += int(space01)
points2 += [points[compt]]
except Exception:
points2 += [points[-1]]
points2[-1] = points[-1]
break


<!--T:51-->
createLines(len(points2), points2)
ver 00.07 13/05/2017 correct bug after create "Alternate ...." the dimension of lines stay with the dimension alternative and not restitution the desired dimensions
#######cut line in dash coordinates##############################################################################
if compLine == 0:
comp = Part.makeCompound(ligne) # si compount ligne separee
Part.show(comp) # si compount ligne separee
else:
comp2 += ligne
colorize()
ligne[:] = [] # si compount ligne separee
points[:] = []
points2[:] = []
for i in nom:
FreeCAD.ActiveDocument.removeObject(i)
if compLine != 0: # 1 = toutes les selections en un compount
comp = Part.makeCompound(comp2) # si compount ensemble complet
Part.show(comp) # si compount ensemble complet
colorize()


<!--T:49-->
nom[:] = []
ver 00.06 20/02/2017 correction of precision cut (replace "numberOfPoints = longueur" to "numberOfPoints = (longueur + 1)")
ligne[:] = []
comp2[:] = []
points[:] = []
points2[:] = []


<!--T:50-->
except Exception:
ver 00.05 11/01/2017 replace de search method macro path
FreeCAD.Console.PrintError("can not create"+"\n")
else:
FreeCAD.Console.PrintError("Zero not permitted"+"\n")


<!--T:48-->
#dashLine(dash01 = 1.0, space01 = 0.2, dash02 = 0.2, space02 = 0.2, compLine = 0, red = 0, green = 0, blue = 255, typeLine = 2)
ver 00.04 05/09/2016 setPointSize(8.0)
</syntaxhighlight>


<!--T:46-->
<translate>
ver 00.02 18/02/2016
==Version== <!--T:10-->

<!--T:44-->
ver 00.01 19/01/2016
ver 00.01 19/01/2016


<!--T:12-->
<!--T:45-->
ver 00.00 19/01/2016
ver 00.00 19/01/2016

<!--T:11-->
this macro is a portion of the FC macro Macro ConverLines not yet finalized which includes: Gui, draws a line "manually" and zigzag
</translate>
</translate>
<languages/>

Latest revision as of 19:45, 11 September 2022

Other languages:

Macro FC Convert Lines

Description
This macro convert the object line, wire in line Dash, DashDot or DashDotDot with the dimensions given.

Macro version: 00.07b
Last modified: 2020-11-09
FreeCAD version: All
Download: ToolBar Icon
Author: mario52
Author
mario52
Download
ToolBar Icon
Links
Macro Version
00.07b
Date last modified
2020-11-09
FreeCAD Version(s)
All
Default shortcut
None
See also
None

Description

This macro convert the object line, wire in line Dash, DashDot, DashDotDot, ZigZag, Hand with the dimensions given.

Temporary code for external macro link. Do not use this code. This code is used exclusively by Addon Manager. Link for optional manual installation: Macro


# This code is copied instead of the original macro code
# to guide the user to the online download page.
# Use it if the code of the macro is larger than 64 KB and cannot be included in the wiki
# or if the RAW code URL is somewhere else in the wiki.

from PySide import QtGui, QtCore

diag = QtGui.QMessageBox(QtGui.QMessageBox.Information,
    "Information",
    "This macro must be downloaded from this link\n"
    "\n"
    "https://gist.githubusercontent.com/mario52a/3d719574089a5f9044ec/raw/812769b6b296a1da2e9c8cd8153ad7266fe80f8d/Macro_FCConvertLines.FCMacro" + "\n"
    "\n"
    "Quit this window to access the download page")

diag.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
diag.setWindowModality(QtCore.Qt.ApplicationModal)
diag.exec_()

import webbrowser 
webbrowser.open("https://gist.githubusercontent.com/mario52a/3d719574089a5f9044ec/raw/812769b6b296a1da2e9c8cd8153ad7266fe80f8d/Macro_FCConvertLines.FCMacro")


ConvertLines Dash, Dash dot, Dash dot dot

Usage

Copy the macro in your macros folder and launch FCConvertLines Gui

FCConvertLines Gui
FCConvertLines Gui

First section :

Cut line (Checked by default)

FCConvertLines
FCConvertLines
  • Select one or more lines in the 3D View
  • SpinBox : for enter number Cuts or cut to length ... (Default number cut suffix displayed "x Cut")
  • Create L. : if this checkbox is checked the line is created
  • Dimension : if this checkbox is checked the number tipped is on length the definition change by tree decimal and the suffix displayed is "x.000 Dim"
  • Bicolor : if this checkbox is checked the lines created are colored alternately Red White if is not checked the color is the color defined with the button Color
  • Points : if this checkbox is checked one point is created and the color is the color defined Bicolor or * The options Options lines are available

Color

Second section :

Type line : Dash

FCConvertLines
FCConvertLines
  • The screen at the bottom of the macro change in line Dash
  • Select one or more lines in the 3D View
  • Line A : dimension of the dash (see A in the screen)
  • Space B : dimension of the space (see B in the screen)
  • The lines have created the configuration specifications set in options lines

Third section :

Type line : DashDot

FCConvertLines
FCConvertLines
  • The screen at the bottom of the macro change in line DashDot
  • Select one or more lines in the 3D View
  • Line A : dimension of the dash (see A in the screen)
  • Space B : dimension of the space (see B in the screen) (May be different D)
  • Line 2 C : dimension of the dash (see C in the screen)
  • Space 2 D : dimension of the space (see D in the screen) (May be different B)

Fourth section :

Type line : DashDotDot

FCConvertLines
FCConvertLines
  • The screen at the bottom of the macro change in line DashDotDot
  • Select one or more lines in the 3D View
  • Line A : dimension of the dash (see A in the screen)
  • Space B : dimension of the space (see B in the screen)
  • Line 2 C : dimension of the dash (see C in the screen)
  • Space 2 D : dimension of the space (see D in the screen)

Fifth section :

Type line : ZigZag

FCConvertLines
FCConvertLines
  • The screen at the bottom of the macro change in line ZigZag
  • This line are created
  • Number heads : number of heads for the total line
  • _____140.0_____ : The length total of the line are calculate in real time and displayed in this window
  • Begin A : dimension of begin line until first head, this section line hare same in the end line (see A in the screen)
  • Dimension B : dimension between the end and begin head (see B in the screen)
  • Gap C : dimension of the head (see C in the screen)
  • Height D : height dimension of the the head (see D in the screen)
  • Number E : number of heads contiguous (see E in the screen)
  • The options Plane and Options lines are available

Sixth section :

Type line : Hand

FCConvertLines
FCConvertLines
  • This line are created
  • Length A : The length total of the line (see A in the screen)
  • Height B : Height of the line (see B in the screen)
  • Wave : compression or uncompress of the wave (see Wave in the screen)
  • The options Plane and Options lines are available

Seventh section :

Options line :

FCConvertLines
FCConvertLines

This options are available for all menu

  • __2,00 Width__ : dimension of the width of the line(s)
  • __2,00 Point S__ : dimension of the points of the line(s)
  • Color : color of the line(s) this button are colored with the color selected (if the checkbox "Bicolor" in the menu "Cut line" is checked this option are not used for this menu)

Eighth section :

Option Plane

This option are available only for "ZigZag" and "Hand"

FCConvertLines
FCConvertLines
  • XY : Plane XY
  • YZ : Plane YZ
  • XZ : Plane XZ

Ninth section :

Button

FCConvertLines
FCConvertLines
  • Save type : the line configured is saved in one file (one file for one type line). While saving a file header is predetermined depending on the chosen menu (example : Dash is saved, in the save window is displayed "Dash_.FCConvertL" you can modify to "Dash_my_config_10.FCConvertL" or the name you want... this method allow sharpens clear)
  • Load type : load one file configured
  • Name type line________________ : name of the type configured this name is saved in the file
  • Reset : reset the data's in the original configuration
  • Create Comp : this button create on compound with the lines created (ten lines selected = one compound)
  • Create : create the lines separately (ten lines selected = ten lines created)
  • Quit : quit the macro

The files to copy in your directory with the macro (10 files images)

The icon for the toolBar

Macro_FCConvertLines
Macro_FCConvertLines

Title

ConvertLines_Title
ConvertLines_Title

Line Dash :

ConvertLines_Dash
ConvertLines_Dash

Line DashDot :

ConvertLines Dash dot
ConvertLines Dash dot

Line DashDotDot :

ConvertLines Dash dot dot
ConvertLines Dash dot dot

Line Zigzag :

ConvertLines_Zigzag
ConvertLines_Zigzag

Line Hand :

ConvertLines_Hand
ConvertLines_Hand

View :

ConvrtLines_View-front ConvrtLines_View-right ConvrtLines_View-right

Script

Copy the macro Macro_FCConvertLines.FCMacro in your macros folder.

The script on Gist Macro_FCConvertLines.FCMacro

ToolBar icon


Macro_FCConvertLines.FCMacro

Examples

Example dot, dash dot, dash dot, dash dot dot

Example hand, zigzag

Example hand

All lines created the configuration specifications set in this Option lines

Example hand can make beautiful sine wave or totally anarchic

Example convert ShapeString to sketch (the curves hare not authorized for convert Shape to Sketch)

Version

ver 00.07b 09/11/2020 correct bug # (ajoute recompute() pour corriger)# Cannot compute Inventor representation for the shape of Shape. And Line by Label

ver 00.07 13/05/2017 correct bug after create "Alternate ...." the dimension of lines stay with the dimension alternative and not restitution the desired dimensions

ver 00.06 20/02/2017 correction of precision cut (replace "numberOfPoints = longueur" to "numberOfPoints = (longueur + 1)")

ver 00.05 11/01/2017 replace de search method macro path

ver 00.04 05/09/2016 setPointSize(8.0)

ver 00.02 18/02/2016

ver 00.01 19/01/2016

ver 00.00 19/01/2016