|
Menu location |
---|
EM → FHNode |
Workbenches |
EM |
Default shortcut |
E N |
Introduced in version |
0.17 |
See also |
EM FHSegment, EM FHPath, EM FHPlane, EM FHPlane Add/Remove Node/Hole, EM FHEquiv, EM FHPort |
The FHNode tool inserts a FastHenry node object.
FastHenry FHNode
The FHNode object can be based on the position of a Draft Point object, or you can select the 3D location of the FHNode.
Alternatively, you can also:
See also: FreeCAD Scripting Basics.
The FHNode object can be used in macros and from the Python console by using the following function:
node = makeFHNode(baseobj=None, X=0.0, Y=0.0, Z=0.0, color=None, size=None, name='FHNode')
FHNode
object.baseobj
is the Draft Point object whose position can be used as base for the FHNode. It has priority over X
, Y
, Z
. If no baseobj
is given, X
,Y
,Z
are used as coordinates.X
x coordinate of the node, in absolute coordinate system.Y
y coordinate of the node, in absolute coordinate system.Z
z coordinate of the node, in absolute coordinate system.color
is the node color, e.g. a tuple (1.0,0.0,0.0). Defaults to EMFHNODE_DEF_NODECOLOR
.size
is the node size. Defaults to EMFHNODE_DEF_NODESIZE
.name
is the name of the objectThe placement of the FHNode can be changed by modifying its Placement
property, or changing the X
,Y
,Z
properties individually. Changing X
,Y
,Z
modifies the node position in the relative coordinate system of the Placement
.
Additionally, the _FHNode class exposes these methods. The _FHNode class can be accessed through the FHNode object Proxy (e.g. fhnode.Proxy).
pos = getAbsCoord()
FreeCAD.Vector
containing the node coordinates in the absolute reference systempos = getRelCoord()
FreeCAD.Vector
containing the node coordinates relative to the FHNode Placementpos = setRelCoord(rel_coord, placement=None)
rel_coord
is a FreeCAD.Vector containing the node coordinates relative to the FHNode Placementplacement
is a new FHNode placement. If None
, the placement is not changedpos = setAbsCoord(abs_coord, placement=None)
abs_coord
is a FreeCAD.Vector containing the node coordinates in the absolute reference systemplacement
is a new FHNode placement. If None
, the placement is not changedExample:
import FreeCAD, EM
fhnode = EM.makeFHNode(X=1.0,Y=2.0,Z=0.0)