EM FHNode: Difference between revisions
(Added categories) |
(Marked this version for translation) |
||
(19 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
|||
<translate> |
|||
<!--T:29--> |
|||
{{Docnav |
|||
| |
|||
|[[EM_FHSegment|FHSegment]] |
|||
|[[EM_Workbench|EM]] |
|||
|IconL= |
|||
|IconR=EM_FHSegment.svg |
|||
|IconC=EMWorkbench.svg |
|||
}} |
|||
<!--T:1--> |
|||
{{GuiCommand |
{{GuiCommand |
||
|Name=EM FHNode |
|Name=EM FHNode |
||
|MenuLocation=EM → FHNode |
|MenuLocation=EM → FHNode |
||
|Workbenches=[[ |
|Workbenches=[[EM_Workbench|EM]] |
||
|Shortcut=E N |
|Shortcut={{KEY|E}} {{KEY|N}} |
||
⚫ | |||
|SeeAlso=[[ |
|SeeAlso=[[EM_FHSegment|EM FHSegment]], [[EM_FHPath|EM FHPath]], [[EM_FHPlane|EM FHPlane]], [[EM_FHPlaneAddRemoveNodeHole|EM FHPlane Add/Remove Node/Hole]], [[EM_FHEquiv|EM FHEquiv]], [[EM_FHPort|EM FHPort]] |
||
⚫ | |||
}} |
}} |
||
==Description== |
==Description== <!--T:2--> |
||
<!--T:3--> |
|||
The FHNode tool inserts a FastHenry node object. |
The FHNode tool inserts a FastHenry node object. |
||
</translate> |
|||
[[Image:EM_FHNode_Example.png]] |
[[Image:EM_FHNode_Example.png]] |
||
<translate> |
|||
<!--T:4--> |
|||
{{Caption|FastHenry FHNode}} |
{{Caption|FastHenry FHNode}} |
||
==Usage== <!--T:5--> |
|||
==How to use== |
|||
<!--T:6--> |
|||
The FHNode object can be based on the position of a [[Draft_Point|Draft Point]] object, or you can select the 3D location of the FHNode. |
The FHNode object can be based on the position of a [[Draft_Point|Draft Point]] object, or you can select the 3D location of the FHNode. |
||
<!--T:7--> |
|||
# Press the {{Button|[[Image:EM_FHNode.svg|16px]] [[EM_FHNode|EM FHNode]]}} button, or press {{KEY|E}} then {{KEY|N}} keys. |
# Press the {{Button|[[Image:EM_FHNode.svg|16px]] [[EM_FHNode|EM FHNode]]}} button, or press {{KEY|E}} then {{KEY|N}} keys. |
||
# Click a point on the 3D view, or type |
# Click a point on the 3D view, or type coordinates and press the {{Button|[[Image:Draft_AddPoint.svg|16px]] add point}} button. |
||
<!--T:8--> |
|||
Alternatively, you can also: |
Alternatively, you can also: |
||
<!--T:9--> |
|||
# Select one or multiple [[Draft_Point|Draft Point]] object(s) |
# Select one or multiple [[Draft_Point|Draft Point]] object(s) |
||
# Press the {{Button|[[Image:EM_FHNode.svg|16px]] [[EM_FHNode|EM FHNode]]}} button, or press {{KEY|E}} then {{KEY|N}} keys. As many FHNodes will be created as the Draft Point objects, at the same coordinates of the Draft Points. |
# Press the {{Button|[[Image:EM_FHNode.svg|16px]] [[EM_FHNode|EM FHNode]]}} button, or press {{KEY|E}} then {{KEY|N}} keys. As many FHNodes will be created as the Draft Point objects, at the same coordinates of the Draft Points. |
||
==Options== |
==Options== <!--T:10--> |
||
<!--T:11--> |
|||
* To enter coordinates manually, simply enter the numbers, then press {{KEY|Enter}} between each X, Y and Z component. You can press the {{Button|[[Image:Draft_AddPoint.svg|16px]] |
* To enter coordinates manually, simply enter the numbers, then press {{KEY|Enter}} between each X, Y and Z component. You can press the {{Button|[[Image:Draft_AddPoint.svg|16px]] add point}} button when you have the desired values to insert the point. |
||
* Click the checkbox to toggle ''continue'' mode. If continue mode is on, the FHNode tool will restart after you place a node, allowing you to place another one without pressing the tool button again. |
|||
* Press {{KEY|Esc}} or the {{Button|Close}} button to abort the current command. |
* Press {{KEY|Esc}} or the {{Button|Close}} button to abort the current command. |
||
==Properties== |
==Properties== <!--T:12--> |
||
<!--T:13--> |
|||
* {{PropertyData|X}}: the X coordinate of the node |
* {{PropertyData|X}}: the X coordinate of the node |
||
* {{PropertyData|Y}}: the Y coordinate of the node |
* {{PropertyData|Y}}: the Y coordinate of the node |
||
* {{PropertyData|Z}}: the Z coordinate of the node |
* {{PropertyData|Z}}: the Z coordinate of the node |
||
==Scripting== |
==Scripting== <!--T:14--> |
||
<!--T:15--> |
|||
{{Emphasis|See also:}} [[FreeCAD Scripting Basics]]. |
{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]]. |
||
<!--T:16--> |
|||
The FHNode object can be used in [[macros]] and from the [[Python]] console by using the following function: |
The FHNode object can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following function: |
||
</translate> |
|||
{{Code|code= |
{{Code|code= |
||
node = makeFHNode(baseobj=None, X=0.0, Y=0.0, Z=0.0, color=None, size=None, name='FHNode') |
node = makeFHNode(baseobj=None, X=0.0, Y=0.0, Z=0.0, color=None, size=None, name='FHNode') |
||
}} |
}} |
||
<translate> |
|||
<!--T:17--> |
|||
* Creates a {{incode|FHNode}} object. |
* Creates a {{incode|FHNode}} object. |
||
* {{incode|baseobj}} is the Draft Point object whose position can be used as base for the FHNode. It has priority over {{incode|X}}, {{incode|Y}}, {{incode|Z}}. If no {{incode|baseobj}} is given, {{incode|X}},{{incode|Y}},{{incode|Z}} are used as coordinates. |
* {{incode|baseobj}} is the Draft Point object whose position can be used as base for the FHNode. It has priority over {{incode|X}}, {{incode|Y}}, {{incode|Z}}. If no {{incode|baseobj}} is given, {{incode|X}},{{incode|Y}},{{incode|Z}} are used as coordinates. |
||
Line 58: | Line 87: | ||
* {{incode|name}} is the name of the object |
* {{incode|name}} is the name of the object |
||
<!--T:18--> |
|||
The placement of the FHNode can be changed by modifying its {{incode|Placement}} property, or changing the {{incode|X}},{{incode|Y}},{{incode|Z}} properties individually. Changing {{incode|X}},{{incode|Y}},{{incode|Z}} modifies the node position in the relative coordinate system of the {{incode|Placement}}. |
The placement of the FHNode can be changed by modifying its {{incode|Placement}} property, or changing the {{incode|X}},{{incode|Y}},{{incode|Z}} properties individually. Changing {{incode|X}},{{incode|Y}},{{incode|Z}} modifies the node position in the relative coordinate system of the {{incode|Placement}}. |
||
<!--T:19--> |
|||
Additionally, the _FHNode class exposes these methods. The _FHNode class can be accessed through the FHNode object Proxy (e.g. fhnode.Proxy). |
Additionally, the _FHNode class exposes these methods. The _FHNode class can be accessed through the FHNode object Proxy (e.g. fhnode.Proxy). |
||
</translate> |
|||
{{Code|code= |
{{Code|code= |
||
pos = getAbsCoord() |
pos = getAbsCoord() |
||
}} |
}} |
||
<translate> |
|||
<!--T:20--> |
|||
* Get a {{incode|FreeCAD.Vector}} containing the node coordinates in the absolute reference system |
* Get a {{incode|FreeCAD.Vector}} containing the node coordinates in the absolute reference system |
||
</translate> |
|||
{{Code|code= |
{{Code|code= |
||
pos = getRelCoord() |
pos = getRelCoord() |
||
}} |
}} |
||
<translate> |
|||
<!--T:21--> |
|||
* Get a {{incode|FreeCAD.Vector}} containing the node coordinates relative to the FHNode Placement |
* Get a {{incode|FreeCAD.Vector}} containing the node coordinates relative to the FHNode Placement |
||
</translate> |
|||
{{Code|code= |
{{Code|code= |
||
pos = setRelCoord(rel_coord, placement=None) |
pos = setRelCoord(rel_coord, placement=None) |
||
}} |
}} |
||
<translate> |
|||
<!--T:22--> |
|||
* Sets the node position relative to the placement |
* Sets the node position relative to the placement |
||
* {{incode|rel_coord}} is a FreeCAD.Vector containing the node coordinates relative to the FHNode Placement |
* {{incode|rel_coord}} is a FreeCAD.Vector containing the node coordinates relative to the FHNode Placement |
||
* {{incode|placement}} is a new FHNode placement. If {{incode|None}}, the placement is not changed |
* {{incode|placement}} is a new FHNode placement. If {{incode|None}}, the placement is not changed |
||
</translate> |
|||
{{Code|code= |
{{Code|code= |
||
pos = setAbsCoord(abs_coord, placement=None) |
pos = setAbsCoord(abs_coord, placement=None) |
||
}} |
}} |
||
<translate> |
|||
<!--T:23--> |
|||
* Sets the absolute node position, considering the object placement, and in case forcing a new placement |
* Sets the absolute node position, considering the object placement, and in case forcing a new placement |
||
* {{incode|abs_coord}} is a FreeCAD.Vector containing the node coordinates in the absolute reference system |
* {{incode|abs_coord}} is a FreeCAD.Vector containing the node coordinates in the absolute reference system |
||
* {{incode|placement}} is a new FHNode placement. If {{incode|None}}, the placement is not changed |
* {{incode|placement}} is a new FHNode placement. If {{incode|None}}, the placement is not changed |
||
<!--T:24--> |
|||
Example: |
Example: |
||
</translate> |
|||
{{Code|code= |
{{Code|code= |
||
import FreeCAD, EM |
import FreeCAD, EM |
||
Line 98: | Line 142: | ||
fhnode = EM.makeFHNode(X=1.0,Y=2.0,Z=0.0) |
fhnode = EM.makeFHNode(X=1.0,Y=2.0,Z=0.0) |
||
}} |
}} |
||
<translate> |
|||
{{clear}} |
|||
<!--T:30--> |
|||
[[Category:User Documentation]] |
|||
{{Docnav |
|||
[[Category:Addons]] |
|||
| |
|||
[[Category:External Workbenches]] |
|||
|[[EM_FHSegment|FHSegment]] |
|||
|[[EM_Workbench|EM]] |
|||
|IconL= |
|||
|IconR=EM_FHSegment.svg |
|||
|IconC=EMWorkbench.svg |
|||
}} |
|||
</translate> |
|||
{{EM Tools navi{{#translation:}}}} |
|||
{{Userdocnavi{{#translation:}}}} |
Latest revision as of 09:09, 19 November 2021
EM FHNode |
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 |
Description
The FHNode tool inserts a FastHenry node object.
FastHenry FHNode
Usage
The FHNode object can be based on the position of a Draft Point object, or you can select the 3D location of the FHNode.
- Press the EM FHNode button, or press E then N keys.
- Click a point on the 3D view, or type coordinates and press the add point button.
Alternatively, you can also:
- Select one or multiple Draft Point object(s)
- Press the EM FHNode button, or press E then N keys. As many FHNodes will be created as the Draft Point objects, at the same coordinates of the Draft Points.
Options
- To enter coordinates manually, simply enter the numbers, then press Enter between each X, Y and Z component. You can press the add point button when you have the desired values to insert the point.
- Click the checkbox to toggle continue mode. If continue mode is on, the FHNode tool will restart after you place a node, allowing you to place another one without pressing the tool button again.
- Press Esc or the Close button to abort the current command.
Properties
- DataX: the X coordinate of the node
- DataY: the Y coordinate of the node
- DataZ: the Z coordinate of the node
Scripting
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')
- Creates a
FHNode
object. baseobj
is the Draft Point object whose position can be used as base for the FHNode. It has priority overX
,Y
,Z
. If nobaseobj
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 toEMFHNODE_DEF_NODECOLOR
.size
is the node size. Defaults toEMFHNODE_DEF_NODESIZE
.name
is the name of the object
The 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()
- Get a
FreeCAD.Vector
containing the node coordinates in the absolute reference system
pos = getRelCoord()
- Get a
FreeCAD.Vector
containing the node coordinates relative to the FHNode Placement
pos = setRelCoord(rel_coord, placement=None)
- Sets the node position relative to the placement
rel_coord
is a FreeCAD.Vector containing the node coordinates relative to the FHNode Placementplacement
is a new FHNode placement. IfNone
, the placement is not changed
pos = setAbsCoord(abs_coord, placement=None)
- Sets the absolute node position, considering the object placement, and in case forcing a new placement
abs_coord
is a FreeCAD.Vector containing the node coordinates in the absolute reference systemplacement
is a new FHNode placement. IfNone
, the placement is not changed
Example:
import FreeCAD, EM
fhnode = EM.makeFHNode(X=1.0,Y=2.0,Z=0.0)
Electromagnetics
- FastHenry tools: FHNode, FHSegment, FHPath, FHPlane, FHPlaneHole, FHPlaneAddRemoveNodeHole, FHEquiv, FHPort, FHSolver, FHInputFile
- FasterCap tools: see GitHub source code
User documentation
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub