Macro WorkFeatures

From FreeCAD Documentation
Jump to: navigation, search
Other languages:
English • ‎français • ‎italiano

WF wf.png Macro WorkFeatures

Description
Tool utility to create Points, Axis, Planes...and other usefull functions.
Author
rentlau_64
Links
Macros recipes
How to install macros
How to customize toolbars
Version
2019-05
Date last modification
2019-05-01
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.


WF.png

WorkFeatures


Uses

Work Features


Origin Tab

Macro WorkFeatures 02.png
  • 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

Macro WorkFeatures 03.png
  • 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

Macro WorkFeatures 04.png
  • 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

Macro WorkFeatures 05.png
  • 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

Macro WorkFeatures 06.png
  • 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. 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... It will create a Cube aligned on the selected axis. with one of the extremities at point selected.

Views Tab

Macro WorkFeatures 09.png
  • 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.

Modif. Tab

Macro WorkFeatures 10.png
  • Modif. Cutting Tab
  • Select Object : After selected your object and, First, one Object to cut and click 'Select Object' button,
    • The name of the object selected are displayed
  • Select Cut Line : Second, one cutting Line and click 'Select Cut Line' button,
    • The name of the line selected are displayed
  • Select Ref. Plane : Last, a reference Plane and click 'Select Ref. Plane' button!
    • The name of the plane selected are displayed
  • Angle : Angle for cut (Defaut : 0.0)
  • Thichness : Thichness the cut (Defaut : 0.0)
  • Reset : Reset the values
  • Apply : Apply the values

Check. Tab

Macro WorkFeatures 11.png
  • Check. Tab
  • are Parallel ? : Check if two faces or two Edges are Parallel:
    • Select the 2 faces/planes or 2 Edges/Lines and Click this button
  • are Perpendicular ? : Check if two faces or two Edges are Perpendicular:
    • Select the 2 faces/planes or 2 Edges/Lines and Click this button
  • are Coplanar ? : Check if two faces or two Edges are Coplanar:
    • Select the 2 faces/planes or 2 Edges/Lines and Click this button
  • Distance Clearance ? : Check for two Objects Clearance distance:
    • Quick measurements between parallel faces and similarly placed objects Select the 2 Objects and Click this button
  • Angle ? : Calculate angle from 2 objects:
    • Angle measurement between two Edges or two Planes
    • Select the 2 Edges and Click this button
    • or : Select the 2 Planes and Click this button
    • or : Select one Edge and one Plane and Click this button
  • Distance ? : Check for two Points distance:
    • Distances measurement and Delta values (on main Axes) between two Points
    • Select the 2 Points and Click this button
  • Length ? : Check for Line Length:
    • Length measurement and Delta values (on main Axes) for a Line
    • Select the Line and Click this button
  • Area ? : Check for surface Area:
    • Area measurement for a Plane or a set of Planes.
    • Select One or several Planes and Click this button
  • View : Detect the position of the camera. The returned value is the value provided by the function getCameraOrientation().

Script

After downloading the file compressed here Download the latest version on GitHub , you must unzip the zip and copy all the files in your macro directory.

PS:This macro is still in development please visit this page for commonly be sure to have the latest version.


Download in GitHub click the Download ZIP button


Install the macro addons_installer for easy installation of WorkFeatures and other interesting macros

Here for How to install macros detailed

Examples

Cutting tools

Setting of the Cutting tools: Select an object to cut, a cutting line and a reference Plane. Angle is an angle between the cutting Plane and the Ref. Plane. Thickness is the wide of the of the cutting Plane.

Example the practice



Concentric constraint between two non cylindrical parts


Rotation Object


Links

The forum discussion MACRO:Work Feature 2014_12

External workbenches

FreeCAD workbenches are easy to program in Python, there are therefore many people developing additional workbenches outside of the FreeCAD main developers.

The external workbenches page has some information and tutorials on some of them, and the FreeCAD Addons project aims at gathering them and making them easily installable from within FreeCAD.

New workbenches are in development, stay tuned!

Latest version

Icons :

WF wf.png

WF centerObjectsPlanes.png

Sources :

On github : /github.com/Rentlau/WorkFeature-WB.git

Date 2019-05-01 (YYYY-MM-DD)

20/01/2019

08/03/2015 : WF_2015_03_08 - Circle cut added - Are Parallel, Are Perpendicular, Are Coplanar added

17/02/2015 : WF_2015_02_17 - Circle and Ellipse Tab added - Cutting tab added

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