Macro Dxf To Shape: Difference between revisions

From FreeCAD Documentation
m (→‎Use: minor)
m (*04/09/2020 ver 00.00 : add duplicate edge button)
 
(16 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{VeryImportantMessage|Documentation not finished, not translate thanks}}
{{VeryImportantMessage|Documentation not finished, not translate thanks}}


{{Macro
{{Macro|Icon=Macro_Dxf_To_Shape|Name=Macro_Dxf_To_Shape|Description=Macro utility for create unique wire with many wires macro.|Author=Mario52|Version=00.00 (21/11/2016)}}
|Name=Macro Dxf To Shape
|Description=Utility to create a unique wire with many wires
|Author=Mario52
|Version=00.00
|Date=2020-09-04
|FCVersion= 0.18, 0.19
|Download=[https://www.freecadweb.org/wiki/images/f/f4/Macro_Dxf_To_Shape.png ToolBar Icon]
}}

==Description==
==Description==


Macro utility for create unique wire with many wires, the type wire created is selected to MakeWire, Bspline, BsplineCurve, BsplineCurve + Arc, Polygon, Bezier curve.
Macro utility to create a unique wire with many wires. Types of wire available are: MakeWire, Bspline, BsplineCurve, BsplineCurve + Arc, Polygon, and Bezier curve.

==Use==
{{Codeextralink|https://gist.githubusercontent.com/mario52a/0596ad522b151806d5970586a5051e4b/raw/23fe427f5f00df81c9a7d0a877cf58c052ea5f76/Macro_DXF_to_Shape.FCMacro}}
Principe :

*downgrade the compound line for work with single line
==Usage==
*first line discretize the line (precision on choice)

*the linetest is created on choice MakeWire, Bspline, BsplineCourve, Polygon, BezCurve (display the orientation
* Downgrade the compound line to work with a single line
<font COLOR="#008000">Begin</font> - <font COLOR="#FF0000">End</font> (Reversed Forward)
* Discretize the first line
* The linetest is created by choosing one of the following types: MakeWire, Bspline, BsplineCurve, Polygon, BezCurve (display the orientation <font COLOR="#008000">Begin</font> - <font COLOR="#FF0000">End</font> (Reversed Forward))
*test is good .. then <font COLOR="#008000"> {{KEY|Save DataT}}</font> coordinates in file (and Del Test If you want)
*test is good .. then <font COLOR="#008000"> {{KEY|Save DataT}}</font> coordinates in file (and Del Test If you want)
*second line same first line and accord end to begin ....
*second line same first line and accord end to begin ....
Line 17: Line 28:
* <font COLOR="#008000"> {{KEY|Read DataT}}</font> saved in on unique wire with the type line selected
* <font COLOR="#008000"> {{KEY|Read DataT}}</font> saved in on unique wire with the type line selected


you can also test one sweep, force reverse, close wire, create points, cloud ...
you can also test one sweep, force reverse, close wire, create points, cloud...


you can also <font COLOR="#008000"> {{KEY|Save}}</font> the file in disk
you can also <font COLOR="#008000"> {{KEY|Save}}</font> the file to disk


( <font COLOR="#008000"> {{KEY|Save DataT}}</font>, <font COLOR="#008000"> {{KEY|Read DataT}}</font>, <font COLOR="#008000"> {{KEY|Reset DataT}}</font> Are the Temporary working file)
( <font COLOR="#008000"> {{KEY|Save DataT}}</font>, <font COLOR="#008000"> {{KEY|Read DataT}}</font>, <font COLOR="#008000"> {{KEY|Reset DataT}}</font> Are the Temporary working file)
Line 25: Line 36:


{{clear}}
{{clear}}
[[File:Macro_DXF_To_Shape_00.png|480px|Macro_Dxf_To_Shape]]
[[File:Macro_DXF_To_Shape_00.png|Macro_Dxf_To_Shape]]
{{clear}}
{{clear}}


==Script==
==Script==


The icon for you toolBar [[File:Macro Compound Plus.png]] copy in same directory to the macro
The icon for you toolBar [[File:Macro_Dxf_To_Shape.png]] copy in same directory to the macro


[[Customize_ToolsBar|How to Customize ToolsBar]], [[How_to_install_macros|How to install macros]]
[[Customize_Toolbars|How to Customize Toolbars]], [[How_to_install_macros|How to install macros]]


The script to github [https://gist.github.com/mario52a/0596ad522b151806d5970586a5051e4b Macro_DXF_to_Shape.FCMacro]
The script on github [https://gist.github.com/mario52a/0596ad522b151806d5970586a5051e4b Macro_DXF_to_Shape.FCMacro]

==Example==

[[File:Macro_Dxf_To_Shape_Convert_Wire_To_BSplineCurve.gif]]
{{Caption|Convert Wire (multi lines) in BsplineCurve}}

[[File:Macro_Dxf_To_Shape_Convert_Wire_To_BSplineCurve02.gif]]
{{Caption|Convert wire with selected face}}


==Links==
==Links==


Mes macros sur [https://gist.github.com/mario52a Github]
* More of mario52's macros can be found on [https://gist.github.com/mario52a Github]


==Version==
==Version==

*04/09/2020 ver 00.00 : add duplicate edge button

*13/02/2020 ver 00.00 :


*21/11/2016 ver 00.00 :
*21/11/2016 ver 00.00 :

Latest revision as of 13:53, 4 September 2020

Documentation not finished, not translate thanks

Macro Dxf To Shape

Description
Utility to create a unique wire with many wires

Macro version: 00.00
Last modified: 2020-09-04
FreeCAD version: 0.18, 0.19
Download: ToolBar Icon
Author: Mario52
Author
Mario52
Download
ToolBar Icon
Links
Macro Version
00.00
Date last modified
2020-09-04
FreeCAD Version(s)
0.18, 0.19
Default shortcut
None
See also
None

Description

Macro utility to create a unique wire with many wires. Types of wire available are: MakeWire, Bspline, BsplineCurve, BsplineCurve + Arc, Polygon, and Bezier curve.

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/0596ad522b151806d5970586a5051e4b/raw/23fe427f5f00df81c9a7d0a877cf58c052ea5f76/Macro_DXF_to_Shape.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/0596ad522b151806d5970586a5051e4b/raw/23fe427f5f00df81c9a7d0a877cf58c052ea5f76/Macro_DXF_to_Shape.FCMacro")


Usage

  • Downgrade the compound line to work with a single line
  • Discretize the first line
  • The linetest is created by choosing one of the following types: MakeWire, Bspline, BsplineCurve, Polygon, BezCurve (display the orientation Begin - End (Reversed Forward))
  • test is good .. then Save DataT coordinates in file (and Del Test If you want)
  • second line same first line and accord end to begin ....
  • test is good .. then Save DataT coordinates in file (and Del Test If you want)
  • ...... tests finished
  • Read DataT saved in on unique wire with the type line selected

you can also test one sweep, force reverse, close wire, create points, cloud...

you can also Save the file to disk

( Save DataT, Read DataT, Reset DataT Are the Temporary working file)


Macro_Dxf_To_Shape

Script

The icon for you toolBar copy in same directory to the macro

How to Customize Toolbars, How to install macros

The script on github Macro_DXF_to_Shape.FCMacro

Example

Convert Wire (multi lines) in BsplineCurve

Convert wire with selected face

Links

  • More of mario52's macros can be found on Github

Version

  • 04/09/2020 ver 00.00 : add duplicate edge button
  • 13/02/2020 ver 00.00 :
  • 21/11/2016 ver 00.00 :