Macro Connect And Sweep: Difference between revisions

From FreeCAD Documentation
(ver 0.6)
(ver 0.12 2020/07/05)
 
(25 intermediate revisions by 2 users not shown)
Line 4: Line 4:
{{Macro
{{Macro
|Name= Macro Connect And Sweep
|Name= Macro Connect And Sweep
|Icon=Macro_Connect_And_Sweep.png
|Description=This macro easily creates a connection between two objects, an object and a point or between two points (the center of the objects are the starting and ending points of the sweep) can be selected form a configurable ellipse polygon circle.<br />Version 0.05 05-04-2019. Download the iconToolBar [https://www.freecadweb.org/wiki/images/c/c9/Macro_Connect_And_Sweep.png Icon], other image tools [https://www.freecadweb.org/wiki/images/a/a8/Macro_Connect_And_Sweep_CE.png 1], [https://www.freecadweb.org/wiki/images/f/f7/Macro_Connect_And_Sweep_TL.png 2], [https://www.freecadweb.org/wiki/images/b/b7/Macro_Connect_And_Sweep_TR.png 3], [https://www.freecadweb.org/wiki/images/5/5d/Macro_Connect_And_Sweep_LL.png 4], [https://www.freecadweb.org/wiki/images/b/b9/Macro_Connect_And_Sweep_LR.png 5]
|Description={{ColoredText|#ff0000|#ffffff|New version GUI modifyed for the HD dpi (QGridLayout) run only FC version 0.18 and more (PySide2 Qt5)}} <br/> <br/> This macro easily creates a connection between two objects, an object and a point or between two points or on wire selected (the center of the objects are the starting and ending points of the sweep) can be selected form a configurable ellipse polygon circle.<br/>A discretize function is available to create marker points configurable for cutting lines in section or cutting with a dimension on point is created to all coordinates.<br/>A Duplicate face or wire feature for use with the Sweep and Loft operation<br/>Sweep and Loft operation directly with the macro.<br/>Centring the beam on face<br/><br/>For the precedent version see [https://gist.githubusercontent.com/mario52a/3ec67a3711202dab69592ce53b938924/raw/b3554916e0dce63644a2d4d3f88ef114b5e1e390/Macro_Connect_And_Sweep.FCMacro Macro_Connect_And_Sweep.FCMacro] and install it manually.
|Author=Mario52
|Author=Mario52
|Version=00.06
|Version=0.12
|Date=2019-06-18
|Date=2020-07-05
|FCVersion=All
|FCVersion=0.18 and more
|Download=[https://www.freecadweb.org/wiki/images/c/c9/Macro_Connect_And_Sweep.png ToolBar Icon]
|Download=[https://www.freecadweb.org/wiki/images/c/c9/Macro_Connect_And_Sweep.png ToolBar Icon]<br/>
[https://www.freecadweb.org/wiki/images/a/a8/Macro_Connect_And_Sweep_CE.png Macro_Connect_And_Sweep_CE]
[https://www.freecadweb.org/wiki/images/f/f7/Macro_Connect_And_Sweep_TL.png Macro_Connect_And_Sweep_TL]
[https://www.freecadweb.org/wiki/images/b/b7/Macro_Connect_And_Sweep_TR.png Macro_Connect_And_Sweep_TR]
[https://www.freecadweb.org/wiki/images/5/5d/Macro_Connect_And_Sweep_LL.png Macro_Connect_And_Sweep_LL]
[https://www.freecadweb.org/wiki/images/b/b9/Macro_Connect_And_Sweep_LR.png Macro_Connect_And_Sweep_LR]
}}
}}


==Description== <!--T:2-->
==Description== <!--T:2-->
This macro easily creates a connection between two objects, an object and a point or between two points (the center of the objects are the starting and ending points of the sweep) can be selected form a configurable ellipse polygon circle.
This macro easily creates a connection between two objects, an object and a point or between two points (the center of the objects are the starting and ending points of the sweep) can be selected form a configurable ellipse polygon circle.<br/>A discretize function is available to create marker points configurable for cutting lines in section or cutting with a dimension on point is created to all coordinates.<br/>A Duplicate face or wire feature for use with the Sweep and Loft operation<br/>Sweep and Loft operation directly with the macro.


</translate>
</translate>
{{Codeextralink|https://gist.githubusercontent.com/mario52a/3ec67a3711202dab69592ce53b938924/raw/a7b2c3ba3cac6ef0fb4925a0def5e2d11d3eb06a/Macro_Connect_And_Sweep.FCMacro}}
{{Codeextralink|https://gist.githubusercontent.com/mario52a/3ec67a3711202dab69592ce53b938924/raw/5717e333a7df104d461a495e8e1f5de75ead41b9/Macro_Connect_And_Sweep.FCMacro}}
<translate>
<translate>


</translate>
</translate>
[[File:Macro_Connect_And_Sweep_00.png|480px]]
[[File:Macro_Connect_And_Sweep_00.png|640px]]
<translate>
<translate>
<!--T:3-->
<!--T:3-->
{{Caption|Macro_Connect_And_Sweep}}
{{Caption|Macro_Connect_And_Sweep}}


==Use== <!--T:4-->
==Usage== <!--T:4-->
Run the macro select your objects or points choice the form and parameters and click {{KEY|Create}}.
Run the macro select your objects or points choice the form and parameters and click {{KEY|Create}}.


Line 37: Line 33:
{{Caption|Macro_Connect_And_Sweep}}
{{Caption|Macro_Connect_And_Sweep}}
</translate>
</translate>

[[File:Macro_Connect_And_Sweep_Discretize.png]]
{{Caption|Discretize}}
[[File:Macro_Connect_And_Sweep_Duplicate.png]]
{{Caption|Duplicate}}
[[File:Macro_Connect_And_Sweep_Sweep.png]]
{{Caption|Sweep}}
[[File:Macro_Connect_And_Sweep_Loft.png]]
{{Caption|Loft}}
[[File:Macro_Connect_And_Sweep_Reset.png]]
{{Caption|Reset}}


<translate>
<translate>
Line 43: Line 50:


<!--T:13-->
<!--T:13-->
(For download : Click Right button op the image and click "Save Image as ...")
(For download : Click Right button op the image and click "Save Image as ..." (version 0.17))


</translate>
</translate>
Line 111: Line 118:
</center>
</center>
<br />
<br />
<translate>
==Animated example== <!--T:27-->
</translate>

{{Caption|align=center|
[[File:Macro Connect And Sweep Sweep2.gif]]}}
{clear}}

{{Caption|align=center|
<translate>
<!--T:28-->
Object and Object, the connection boundBox center object 1 and boundBox center object 2
</translate>
[[File:Connect_And_Sweep_01_Object_Object.gif]]}}
{{clear}}

{{Caption|align=center|
<translate>
<!--T:29-->
Object SubObject, the connection boundBox center object 1 and boundBox center Subobject 1
</translate>
[[File:Connect_And_Sweept_02_Object_SubObject.gif]]}}
{{clear}}

{{Caption|align=center|
<translate>
<!--T:30-->
SubObject SubObject, the connection boundBox center Subobject 1 and boundBox center Subobject 2
</translate>
[[File:Connect_And_Sweep_03_SubObject_SubObject.gif]]}}
{{clear}}

{{Caption|align=center|
<translate>
<!--T:31-->
Connect And Sweep Direction one object selected or Subobject selected
</translate>
[[File:Connect And Sweep 4 Direction.gif]]}}
{{clear}}


{{Caption|align=center|
<translate>
<!--T:32-->
Detect Error of mode selection, if one error of selection is created the mode change to mode 3 and the mode 3 line is colored in orange
</translate>
[[File:Connect_And_Sweep_05_Detect_Error.gif]]}}
{{clear}}

<translate>
<translate>
==Version== <!--T:6-->
==Version== <!--T:6-->
ver 0.12 2020/07/05 : include icons in source code

<!--T:38-->
ver 00.11b 2020-02-22 : adding the test "try: except" on test FreeCAD version

<!--T:37-->
ver 00.11 2020-02-13 : modify for the HD dpi QGridLayout run only FC version 0.18 and more <br/> For the precedent version see [https://gist.githubusercontent.com/mario52a/3ec67a3711202dab69592ce53b938924/raw/b3554916e0dce63644a2d4d3f88ef114b5e1e390/Macro_Connect_And_Sweep.FCMacro Macro_Connect_And_Sweep.FCMacro]

<!--T:36-->
ver 00.10 2020-01-09 : centering on face

<!--T:35-->
ver 00.09 2020-01-06 : adding Tab Duplicate (as Macro reproWire), Sweep, Loft.

<!--T:34-->
ver 00.08 2019-12-23 : adding function discretize wire and create marker points for use the points as landmarks

<!--T:33-->
ver 00.07 2019-06-26 : upgrade add mode Object to Object, Object to SubObject, SubObject to SubObject selection one line and other minor change


<!--T:25-->
06 18/06/2019 : adding "Recompute" on create line section
00.06 18/06/2019 : adding "Recompute" on create line section


<!--T:24-->
<!--T:24-->
05 05/04/2019 : compatible Python 3
00.05 05/04/2019 : compatible Python 3


<!--T:22-->
<!--T:22-->
Line 142: Line 218:
This macro is based to the microelly2 code see [http://forum.freecadweb.org/viewtopic.php?t=7029#p56746 Looking for some helpful GUI-commands]
This macro is based to the microelly2 code see [http://forum.freecadweb.org/viewtopic.php?t=7029#p56746 Looking for some helpful GUI-commands]


<!--T:26-->
Other forum discussion [https://forum.freecadweb.org/viewtopic.php?f=22&t=35432 Macro_Connect_And_Sweep]
Other forum discussion [https://forum.freecadweb.org/viewtopic.php?f=22&t=35432 Macro_Connect_And_Sweep]




</translate>
</translate>

Latest revision as of 14:48, 5 July 2020

Other languages:

Macro Connect And Sweep

Description
New version GUI modifyed for the HD dpi (QGridLayout) run only FC version 0.18 and more (PySide2 Qt5)

This macro easily creates a connection between two objects, an object and a point or between two points or on wire selected (the center of the objects are the starting and ending points of the sweep) can be selected form a configurable ellipse polygon circle.
A discretize function is available to create marker points configurable for cutting lines in section or cutting with a dimension on point is created to all coordinates.
A Duplicate face or wire feature for use with the Sweep and Loft operation
Sweep and Loft operation directly with the macro.
Centring the beam on face

For the precedent version see Macro_Connect_And_Sweep.FCMacro and install it manually.

Macro version: 0.12
Last modified: 2020-07-05
FreeCAD version: 0.18 and more
Download: ToolBar Icon

Author: Mario52
Author
Mario52
Download
ToolBar Icon
Links
Macro Version
0.12
Date last modified
2020-07-05
FreeCAD Version(s)
0.18 and more
Default shortcut
None
See also
None

Description

This macro easily creates a connection between two objects, an object and a point or between two points (the center of the objects are the starting and ending points of the sweep) can be selected form a configurable ellipse polygon circle.
A discretize function is available to create marker points configurable for cutting lines in section or cutting with a dimension on point is created to all coordinates.
A Duplicate face or wire feature for use with the Sweep and Loft operation
Sweep and Loft operation directly with the macro.

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/3ec67a3711202dab69592ce53b938924/raw/5717e333a7df104d461a495e8e1f5de75ead41b9/Macro_Connect_And_Sweep.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/3ec67a3711202dab69592ce53b938924/raw/5717e333a7df104d461a495e8e1f5de75ead41b9/Macro_Connect_And_Sweep.FCMacro")


Macro_Connect_And_Sweep

Usage

Run the macro select your objects or points choice the form and parameters and click Create.

Macro_Connect_And_Sweep

Discretize

Duplicate

Sweep

Loft

Reset

Images

These files must be copied to your macros directory

(For download : Click Right button op the image and click "Save Image as ..." (version 0.17))

Center Top left Top rigth Low left Low rigth

The icon for the toolbar Icon for the button

Script

Macro_Connect_And_Sweep.FCMacro

Download the macro to Gits Macro_Connect_And_Sweep.FCMacro

Example

Path and tubing with Macro_Connect_And_Sweep and Macro_Repro_Wire


Animated example

{clear}}

Object and Object, the connection boundBox center object 1 and boundBox center object 2

Object SubObject, the connection boundBox center object 1 and boundBox center Subobject 1

SubObject SubObject, the connection boundBox center Subobject 1 and boundBox center Subobject 2

Connect And Sweep Direction one object selected or Subobject selected


Detect Error of mode selection, if one error of selection is created the mode change to mode 3 and the mode 3 line is colored in orange

Version

ver 0.12 2020/07/05 : include icons in source code

ver 00.11b 2020-02-22 : adding the test "try: except" on test FreeCAD version

ver 00.11 2020-02-13 : modify for the HD dpi QGridLayout run only FC version 0.18 and more
For the precedent version see Macro_Connect_And_Sweep.FCMacro

ver 00.10 2020-01-09 : centering on face

ver 00.09 2020-01-06 : adding Tab Duplicate (as Macro reproWire), Sweep, Loft.

ver 00.08 2019-12-23 : adding function discretize wire and create marker points for use the points as landmarks

ver 00.07 2019-06-26 : upgrade add mode Object to Object, Object to SubObject, SubObject to SubObject selection one line and other minor change

00.06 18/06/2019 : adding "Recompute" on create line section

00.05 05/04/2019 : compatible Python 3

00.04 22/02/2017 : upgrade the search path

00.03 15/09/2016 : add create pipe

00.02 13/06/2016 : add options choice angle path rectangle and ellipse

00.01 07/06/2016 : add option solid or not centring rectangle or not

00.00 05/06/2016 :

Links

The forum discussion Scripting point to point tubing

This macro is based to the microelly2 code see Looking for some helpful GUI-commands

Other forum discussion Macro_Connect_And_Sweep