Macro Center Align Objects with Faces or Edges: Difference between revisions

From FreeCAD Documentation
No edit summary
m (png to svg)
 
(22 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<languages/>
<translate>
<translate>
<!--T:16-->
{{VeryImportantMessage|These tools are now included in the [[Manipulator Workbench|Manipulator Workbench]]. Install this workbench for the latest updates on these tools.}}

<!--T:1-->
<!--T:1-->
{{Macro
{{Macro|Icon=Macro_Center_Align_Objects_with_Faces_or_Edges|Name=Center Faces of Parts|Description=This macro Aligns Objects through Faces or Edges constraints|Author=easyw-fc|Version=0.4.8|Date=14/09/2017}}
|Name=Center Faces of Parts
|Icon=Macro_Center_Align_Objects_with_Faces_or_Edges.svg
|Description=This macro Aligns Objects through Faces or Edges constraints. These tools are now included in the [https://github.com/easyw/Manipulator Manipulator Workbench]. Install this workbench for the latest updates on these tools.
|Author=easyw-fc
|Version=1.5.3
|Date=2017-10-01
|FCVersion=All
|Download=[https://www.freecadweb.org/wiki/images/e/ee/Macro_Center_Align_Objects_with_Faces_or_Edges.svg ToolBar Icon]<br/>[https://www.freecadweb.org/wiki/images/3/3d/Manipulator_Mover.svg Mover-icon]<br/>[https://www.freecadweb.org/wiki/images/1/10/Manipulator_Caliper.svg Caliper-icon]
}}


==Description== <!--T:2-->
==Description== <!--T:2-->
This macro Aligns Objects through Faces or Edges constraints

</translate>
{{Codeextralink|https://raw.githubusercontent.com/easyw/FreeCAD_Macros/master/Align%20Objects/CenterAlignObjectswFacesEdges.py}}
<translate>

== Tools == <!--T:8-->

<!--T:9-->
'''Aligner''' [[File:Macro_Center_Align_Objects_with_Faces_or_Edges.svg|32px]]: a set of tools to move and align 3D parts

<!--T:10-->
'''Mover''' [[File:Manipulator_Mover.svg|32px]]: a set of tools to move and rotate 3D parts on different Axis

<!--T:11-->
'''Measure''' [[File:Manipulator_Caliper.svg|32px]]: a set of tools to measure 3D parts, with some Snap facility and Radius, Length, Angle measurements.

<!--T:12-->
These helpers work with '''Part, App::Part and Body objects'''.
Each Tool can be '''Floating''' or '''Docked Left or Right'''.

<!--T:13-->
----

== OLD References == <!--T:14-->

<!--T:15-->
This macro covers the following constraints:
This macro covers the following constraints:
<br /> - Concentric constraint among non cylindrical parts;
* Concentric constraint among non cylindrical parts;
<br /> - Constraint on center Faces and/or Edges.
* Constraint on center Faces and/or Edges.
<br /> It works also with the new Body and App::Part containers, as well as with STEP hierarchy.
* It works also with the new Body and App::Part containers, as well as with STEP hierarchy.
</translate>
</translate>

{{clear}}
[[File:Center-align-faces.png ]]
[[File:Center-align-faces.png ]]

{{clear}}
[[File:center-align-faces-in-action.gif]]
[[File:center-align-faces-in-action.gif]]

{{clear}}
[[File:center-align-Body-objects.gif]]
[[File:center-align-Body-objects.gif]]

{{clear}}
[[File:utube-alignment-tool-tutorial.png]]
[[File:utube-alignment-tool-tutorial.png]]

{{clear}}
[https://youtu.be/qzixT157jJU Aligning tool video tutorial]
[https://youtu.be/qzixT157jJU Aligning tool video tutorial]

{{clear}}
[[File:utube-alignment-STEP-models.png]]
[[File:utube-alignment-STEP-models.png]]

{{clear}}
[https://youtu.be/aQcPqhlgHBU Aligning STEP models video tutorial]
[https://youtu.be/aQcPqhlgHBU Aligning STEP models video tutorial]

{{clear}}
<translate>
<translate>


==Use== <!--T:3-->
==Usage== <!--T:3-->
Faces or Edges constraint among non cylindrical parts: Just open a FC document, launch the Macro and select two or more Faces/Edges to be aligned. Click on Align button and that's it!
Faces or Edges constraint among non cylindrical parts: Just open a FC document, launch the Macro and select two or more Faces/Edges to be aligned. Click on Align button and that's it!


Line 33: Line 73:


<!--T:5-->
<!--T:5-->
'''CenterAlignObjectswFacesEdges.py'''
Macro Center Faces of Parts.FCMacro


<!--T:6-->
<!--T:6-->
Line 39: Line 79:
GitHub page
GitHub page
<br />
<br />
https://github.com/easyw/FreeCAD_Macros/blob/master/Align%20Objects/CenterAlignObjectswFacesEdges.py
https://github.com/easyw/FreeCAD_Macros/tree/master/Align%20Objects
<br />
<br />
code:
code:
Line 54: Line 94:
</translate>
</translate>
{{clear}}
{{clear}}
<languages/>

Latest revision as of 02:31, 28 February 2020

Other languages:
These tools are now included in the Manipulator Workbench. Install this workbench for the latest updates on these tools.

Center Faces of Parts

Description
This macro Aligns Objects through Faces or Edges constraints. These tools are now included in the Manipulator Workbench. Install this workbench for the latest updates on these tools.

Macro version: 1.5.3
Last modified: 2017-10-01
FreeCAD version: All
Download: ToolBar Icon
Mover-icon
Caliper-icon
Author: easyw-fc
Author
easyw-fc
Download
ToolBar Icon
Mover-icon
Caliper-icon
Links
Macro Version
1.5.3
Date last modified
2017-10-01
FreeCAD Version(s)
All
Default shortcut
None
See also
None

Description

This macro Aligns Objects through Faces or Edges constraints

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://raw.githubusercontent.com/easyw/FreeCAD_Macros/master/Align%20Objects/CenterAlignObjectswFacesEdges.py" + "\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://raw.githubusercontent.com/easyw/FreeCAD_Macros/master/Align%20Objects/CenterAlignObjectswFacesEdges.py")


Tools

Aligner : a set of tools to move and align 3D parts

Mover : a set of tools to move and rotate 3D parts on different Axis

Measure : a set of tools to measure 3D parts, with some Snap facility and Radius, Length, Angle measurements.

These helpers work with Part, App::Part and Body objects. Each Tool can be Floating or Docked Left or Right.


OLD References

This macro covers the following constraints:

  • Concentric constraint among non cylindrical parts;
  • Constraint on center Faces and/or Edges.
  • It works also with the new Body and App::Part containers, as well as with STEP hierarchy.

Aligning tool video tutorial

Aligning STEP models video tutorial


Usage

Faces or Edges constraint among non cylindrical parts: Just open a FC document, launch the Macro and select two or more Faces/Edges to be aligned. Click on Align button and that's it!

Script

The icon for your toolbar

CenterAlignObjectswFacesEdges.py

After downloading the file here
GitHub page
https://github.com/easyw/FreeCAD_Macros/tree/master/Align%20Objects
code:
https://github.com/easyw/FreeCAD_Macros/raw/master/Align%20Objects/CenterAlignObjectswFacesEdges.py
you need to copy the file to your macro directory.
How to install macros

Link

Forum : Faces or Edges constraint among non cylindrical parts Macro