Macro WorkFeatures

From FreeCAD Documentation
Revision as of 16:22, 7 February 2015 by Rentlau64 (talk | contribs)

File:WF centerObjectsPlanes Macro WorkFeatures

Description
Tool utility to create Points, Axis, Planes...and other usefull functions.

Author: rentlau_64
Author
rentlau_64
Download
None
Links
Macro Version
1.0
Date last modified
None
FreeCAD Version(s)
None
Default shortcut
None
See also
None

Description

Tool utility to create Points (mid points, center of circle, center of object(s)...), Axes (from 2 points, Normal of a plane...), Planes (from 3 points, from one axis and a point...) and many other useful features to facilitate the creation of your project. This utility is up next in the combo view with "Work Features" label.


WorkFeatures

Uses

Work Features


Origin Tab

  • Origin Tab
  • Origin : Create at origin: a point and X,Y and Z axis and XZ,XY and YZ planes. The Axis, Point and Planes origin are directly keyed to hidden.

Points Tab

  • Points Tab
  • Object(s) Center : Create a Point at center location of all selected Object(s).
  • Lines(s) Center : Create a Point at mid point location of each selected Line(s).
  • Line(s) Extrema : Create Points at start and end location of each selected Line(s).
  • Circle(s) Center : Create a Point at center location of each selected Circle(s) or Arc(s).
  • Point along Line : Create a Point on a line at some distance of the extremity point selected.
  • SpinBox : enter the displacement value
  • Face(s) Center : Create a Point at center location of each selected Face(s).
  • Point (Line,Face) : Create a point at the intersection of the Line and Plane selected.
  • Point (Line,Point) : Create a projection Point of a Point onto a Line and symetric point.
  • Point (Point,Face) : Create a projection Point of a Point onto a Face.
  • Object(s) Base Point : Create Base Point of all selected Object(s).


Axis Tab

  • Axis Tab
  • Object(s) X, Y, Z Axes : Create 3 Axes at center location of all selected Object(s).
  • Two Points Axis : Create an Axis crossing 2 Points.
  • SpinBox : enter the displacement value
  • Cylinder(s) Axis : Create the Axis of a Cylinder.
  • Axis (Line,Line) : Create an Axis between 2 Axes.
  • Plane(s) Axes : Create 2 Perpendicular Axes at center location of a Plane.
  • Axis (Point,Axis) : Create an Axis parallel to an Axis and crossing a Point.
  • Axis (Axis,Point) : Create an Axis perpendicular to an Axis and crossing a Point.
  • SpinBox : enter the displacement value
  • Axis (Plane,Axis) : Create an Axis on a Plane by projection from another Axis.
  • Axis (Plane,Plane) : Create an Axis by intersect of 2 Planes.
  • Object(s) Base Axis : Create 3 Axes at Base location of all selected Object(s).

Plane Tab

  • Plane Tab
  • Three Points Plane : Create a Plane crossing 3 Points.
  • Plane (Point, Axis) : Create a plane crossing a Line and a Point. The point MUST not belongs to the Line !
  • Plane (Point, _Axis) : Create a plane perpendicular to a Line and crossing a Point.
  • Plane (Point, Plane) : Create a plane crossing a Point and parallel to a Plane.
  • SpinBox : enter the displacement value
  • Plane (Plane, Axis) : Create a Plane crossing a Line and perpendicular to a Plane.
  • SpinBox : enter the displacement value
  • Object(s) Center Planes : Create 3 Planes (XY, XZ and YZ) at center location of all selected Object(s).

Objects Tab

  • Objects Tab
  • Bounding Box(es) : Create bounding boxes around each of selected object(s).
  • Bounding Box : Create one bounding box around all of selected object(s).
  • Cylinder : First select an Axis and a Point. Define Diameter and Length if needed.(/ br)Then Click the button... It will create a Cylinder aligned on the selected axis. with one of the extremities at point selected.
  • Cube : First select an Axis and a Point. Define Dimensions if needed. Then Click the button... (/ br)It will create a Cube aligned on the selected axis. with one of the extremities at point selected.

Views Tab

  • Views Tab
  • Align to ... : Set the current view perpendicular to the selected Face, or aligned to the selected Axis, or aligned on 2 Points. ReClick with same selection, will reverse the direction.

Script

After downloading the file compressed here WF_2015_01_25.zip , you must unzip the zip and copy all the files in your macro directory.

  1. click Menu > Macro > Macros or the click the bottom "Open a dialog to let you execute a macro Recorded"
  2. A dialog box opens, showing the Macro destination
    • Here, in Windows, is C:\Users\your_user_name\AppData\Roaming\FreeCAD\
    • In Ubuntu, this is normally /home/your_user_name/.FreeCAD


Examples

Links

The forum discussion MACRO:Work Feature 2014_12

Latest version

25/01/2015 : WF_2015_01_25.zip add Object Cylinder Cube

18/01/2015 : WF_2015_01_18.tar.gz add plane and face to view

28/12/2014 : WorkFeatures_2014_12_28.zip

27/12/2014 : WF_2014_12_27.zip