|
Menu location |
---|
EM → FHSegment |
Workbenches |
EM |
Default shortcut |
E S |
Introduced in version |
0.17 |
See also |
EM FHNode, EM FHPath |
The FHSegment tool inserts a FastHenry segment object.
FastHenry FHSegment
The FHSegment object can be based on the position of a Draft Line object, or on two existing
FHNodes that will be the FHSegment end points, or you can select the 3D location of the two end points, where two additional FHNodes will be created.
Alternatively, you can also:
Or:
baseobj
, its position is controlled by the starting and ending FHNodes. You cannot change a FHSegment position by changing its Placement.See also: FreeCAD Scripting Basics.
The FHSegment object can be used in macros and from the Python console by using the following function:
segment = makeFHSegment(baseobj=None, nodeStart=None, nodeEnd=None, width=None, height=None, name='FHSegment')
FHSegment
object.baseobj
is the Draft Line object that can be used as base for the FHSegment. If nodeStart
and nodeEnd
are specified, they have priority over the baseobj
, and baseobj
is ignored.nodeStart
is the segment starting node FHNode object.nodeEnd
is the segment ending node FHNode object.width
is the segment width. Defaults to EMFHSEGMENT_DEF_SEGWIDTH
.height
is the segment height. Defaults to EMFHSEGMENT_DEF_SEGHEIGHT
.name
is the name of the objectExample:
import FreeCAD, EM
fhnode1 = EM.makeFHNode(X=1.0,Y=0,Z=0)
fhnode2 = EM.makeFHNode(X=0,Y=1.0,Z=0)
fhsegment = EM.makeFHSegment(nodeStart=fhnode1, nodeEnd=fhnode2)