Macro Center Align Objects with Faces or Edges

From FreeCAD Documentation
Jump to: navigation, search
Other languages:
English • ‎français • ‎hrvatski • ‎italiano
These tools are now included in the Manipulator Workbench. Install this workbench for the latest updates on these tools.


Macro Center Align Objects with Faces or Edges.png 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
Date last modification : 2017-10-01
FreeCAD version : All
Download : ToolBar Icon
Mover-ico
Caliper-ico
Author
easyw-fc
Download
ToolBar Icon
Mover-ico
Caliper-ico
Links
Macro Version
1.5.3
Date last modification
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_Installer.


##This code is copied instead of the original macro code

##to guide the user to the offline 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 extra wiki location

import PySide

from PySide import QtGui ,QtCore

diag = QtGui.QMessageBox(QtGui.QMessageBox.Information,u"Information",
    "This macro must by downloaded with this link" + "\n"
    " " + "\n"
    "https://raw.githubusercontent.com/easyw/FreeCAD_Macros/master/Align%20Objects/CenterAlignObjectswFacesEdges.py" + "\n"
    " " + "\n"
    "Quit this window for access in the download page" )

diag.setWindowFlags(PySide.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")
<class="rawcodeurl"><a href="https://raw.githubusercontent.com/easyw/FreeCAD_Macros/master/Align%20Objects/CenterAlignObjectswFacesEdges.py">raw code</a>


Tools

Aligner Aligner-ico.png: a set of tools to move and align 3D parts

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

Measure Caliper-ico.png: 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.

Center-align-faces.png

Center-align-faces-in-action.gif

Center-align-Body-objects.gif

Utube-alignment-tool-tutorial.png

Aligning tool video tutorial

Utube-alignment-STEP-models.png

Aligning STEP models video tutorial


Use

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 Macro Center Align Objects with Faces or Edges.png

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