EM FHPlaneHole: Difference between revisions
(Initial creation - work in progress) |
(Work in progress) |
||
Line 28: | Line 28: | ||
The FHPlaneHole object can be based on the position of a [[Draft_Point|Draft Point]] object, or you can select the 3D location of the FHPlaneHole. |
The FHPlaneHole object can be based on the position of a [[Draft_Point|Draft Point]] object, or you can select the 3D location of the FHPlaneHole. |
||
# Press the {{Button|[[Image: |
# Press the {{Button|[[Image:EM_FHPlaneHole.svg|16px]] [[EM_FHPlaneHole|EM FHPlaneHole]]}} button, or press {{KEY|E}} then {{KEY|H}} keys. |
||
# Click a point on the 3D view, or type a [[Draft_Coordinates|coordinate]] and press the {{Button|[[Image:Draft_AddPoint.svg|16px]] [[Draft_AddPoint|add point]]}} button. |
# Click a point on the 3D view, or type a [[Draft_Coordinates|coordinate]] and press the {{Button|[[Image:Draft_AddPoint.svg|16px]] [[Draft_AddPoint|add point]]}} button. |
||
Line 34: | Line 34: | ||
# Select one or multiple [[Draft_Point|Draft Point]] object(s) |
# Select one or multiple [[Draft_Point|Draft Point]] object(s) |
||
# Press the {{Button|[[Image: |
# Press the {{Button|[[Image:EM_FHPlaneHole.svg|16px]] [[EM_FHPlaneHole|EM FHPlaneHole]]}} button, or press {{KEY|E}} then {{KEY|H}} keys. As many FHPlaneHole objects will be created as the Draft Point objects, at the same coordinates of the Draft Points. |
||
===Remarks=== |
|||
* FHPlaneHole objects have no meaning if they are not part of a [[EM_FHPlane|FHPlane]]. To adopt a FHPlaneHole within a FHPlane, use the [[EM_FHPlaneAddRemoveNodeHole|EM FHPlaneAddRemoveNodeHole]] command, or select the FHPlaneHole at [[EM_FHPlane|FHPlane]] creation. To remove a FHPlaneHole from a FHPlane, you can use the [[EM_FHPlaneAddRemoveNodeHole|EM FHPlaneAddRemoveNodeHole]] command. |
|||
* FHPlaneHole objects represent FastHenry plane holes, and therefore follow the same rules of the uniform conductive plane holes. In particular, holes are created removing the internal plane nodes from the plane node array, before constructing the segment mesh. You can enable the view of the internal FHPlane nodes by turning the [[EM_FHPlane|FHPlane]] {{PropertyData|ShowNodes}} property on. Three types of FHPlaneHoles exist, and can be selected by changing the {{PropertyData|Type}} FHPlaneNode property. |
|||
# Point hole: Removes the single FHPlane internal node closer to the position of the FHPlaneHole. The Point FHPlaneHole is shown as a single vertex (small dot), to help to visualize its position; see the FastHenry Point FHPlaneHole picture above. |
|||
# Rect hole: Removes all the FHPlane internal nodes that are within as well as close to the area defined by the base point of the FHPlaneNode and the {{PropertyData|Length}} and {{PropertyData|Width}} properties. This means that not only the internal nodes strictly within the rectangular area defined by the FHPlaneHole are removed, but also the internal nodes outside the rectangle, but within half of the internal node - node distance. The Rect FHPlaneHole is shown as a 2D rectangle, to help to visualize its position and area; see the FastHenry Rect FHPlaneHole picture above. |
|||
# Circle hole: Removes all the FHPlane internal nodes that are within as well as close to the area defined by the base point of the FHPlaneNode and the {{PropertyData|Radius}} property. This means that not only the internal nodes strictly within the circular area defined by the FHPlaneHole are removed, but also the internal nodes outside the circle, but within half of the internal node - node distance. The Circle FHPlaneHole is shown as a 2D circle, to help to visualize its position and area; see the FastHenry Circle FHPlaneHole picture above. Note that if the FHPlane discretization as specified by the {{PropertyData|seg1}} and {{PropertyData|seg1}} FHPlane properties is coarse, the shape of the circular hole can not resemble a circle. This is normal, and it is how FastHenry handles circular holes, not a defect of the ElectroMagnetic Workbench for FastHenry. |
|||
==Options== |
==Options== |
||
Line 43: | Line 52: | ||
==Properties== |
==Properties== |
||
* {{PropertyData|X}}: the X coordinate of the |
* {{PropertyData|X}}: the X coordinate of the FHPlaneHole |
||
* {{PropertyData|Y}}: the Y coordinate of the |
* {{PropertyData|Y}}: the Y coordinate of the FHPlaneHole |
||
* {{PropertyData|Z}}: the Z coordinate of the |
* {{PropertyData|Z}}: the Z coordinate of the FHPlaneHole |
||
* {{PropertyData|Length}}: the Rectangular hole length (along x from FHPlaneHole base point) |
|||
* {{PropertyData|Width}}: the Rectangular hole width (along y from FHPlaneHole base point) |
|||
* {{PropertyData|Radius}}: the Circular hole radius |
|||
* {{PropertyData|Type}}: the type of FastHenry plane hole. Can be "Point", "Rect" or "Circle". |
|||
==Scripting== |
==Scripting== |
Revision as of 15:16, 5 January 2019
EM FHPlaneHole |
Menu location |
---|
EM → FHPlaneHole |
Workbenches |
EM |
Default shortcut |
E H |
Introduced in version |
0.17 (Add-on) |
See also |
EM FHPlane, EM FHNode, EM FHPlaneAddRemoveNodeHole |
Description
The FHPlaneHole tool inserts a plane hole object, that represents a FastHenry uniform conductive plane hole.
File:EM point FHPlaneNode Example.png
FastHenry Point FHPlaneHole
File:EM rect FHPlaneNode Example.png
FastHenry Rect FHPlaneHole
File:EM circle FHPlaneNode Example.png
FastHenry Circle FHPlaneHole
How to use
The FHPlaneHole object can be based on the position of a Draft Point object, or you can select the 3D location of the FHPlaneHole.
- Press the EM FHPlaneHole button, or press E then H keys.
- Click a point on the 3D view, or type a coordinate and press the add point button.
Alternatively, you can also:
- Select one or multiple Draft Point object(s)
- Press the EM FHPlaneHole button, or press E then H keys. As many FHPlaneHole objects will be created as the Draft Point objects, at the same coordinates of the Draft Points.
Remarks
- FHPlaneHole objects have no meaning if they are not part of a FHPlane. To adopt a FHPlaneHole within a FHPlane, use the EM FHPlaneAddRemoveNodeHole command, or select the FHPlaneHole at FHPlane creation. To remove a FHPlaneHole from a FHPlane, you can use the EM FHPlaneAddRemoveNodeHole command.
- FHPlaneHole objects represent FastHenry plane holes, and therefore follow the same rules of the uniform conductive plane holes. In particular, holes are created removing the internal plane nodes from the plane node array, before constructing the segment mesh. You can enable the view of the internal FHPlane nodes by turning the FHPlane DataShowNodes property on. Three types of FHPlaneHoles exist, and can be selected by changing the DataType FHPlaneNode property.
- Point hole: Removes the single FHPlane internal node closer to the position of the FHPlaneHole. The Point FHPlaneHole is shown as a single vertex (small dot), to help to visualize its position; see the FastHenry Point FHPlaneHole picture above.
- Rect hole: Removes all the FHPlane internal nodes that are within as well as close to the area defined by the base point of the FHPlaneNode and the DataLength and DataWidth properties. This means that not only the internal nodes strictly within the rectangular area defined by the FHPlaneHole are removed, but also the internal nodes outside the rectangle, but within half of the internal node - node distance. The Rect FHPlaneHole is shown as a 2D rectangle, to help to visualize its position and area; see the FastHenry Rect FHPlaneHole picture above.
- Circle hole: Removes all the FHPlane internal nodes that are within as well as close to the area defined by the base point of the FHPlaneNode and the DataRadius property. This means that not only the internal nodes strictly within the circular area defined by the FHPlaneHole are removed, but also the internal nodes outside the circle, but within half of the internal node - node distance. The Circle FHPlaneHole is shown as a 2D circle, to help to visualize its position and area; see the FastHenry Circle FHPlaneHole picture above. Note that if the FHPlane discretization as specified by the Dataseg1 and Dataseg1 FHPlane properties is coarse, the shape of the circular hole can not resemble a circle. This is normal, and it is how FastHenry handles circular holes, not a defect of the ElectroMagnetic Workbench for FastHenry.
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.
- Press Esc or the Close button to abort the current command.
Properties
- DataX: the X coordinate of the FHPlaneHole
- DataY: the Y coordinate of the FHPlaneHole
- DataZ: the Z coordinate of the FHPlaneHole
- DataLength: the Rectangular hole length (along x from FHPlaneHole base point)
- DataWidth: the Rectangular hole width (along y from FHPlaneHole base point)
- DataRadius: the Circular hole radius
- DataType: the type of FastHenry plane hole. Can be "Point", "Rect" or "Circle".
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)