class documentation
Wire class.
Method | __init__ |
Initializes an empty wire. A 3D piecewise linear curve with some DC current associated with it. |
Method | recalculate |
Slices wire segments into smaller ones until segment lengths equal or undershoot slicer limit. |
Method | set |
Sets the parameters. |
Instance Variable | bounds |
Undocumented |
Instance Variable | dc |
Undocumented |
Instance Variable | points |
Undocumented |
Instance Variable | points |
Bounding box: Minimum bounds (3D point), maximum bounds (3D point). |
Property | elements |
Wire elements |
Property | length |
Wire length |
Property | points |
Returns this wire's points after slicing. |
Static Method | _transform |
This transformation replicates and rotates this curve `count` times about an `axis` with radius `radius`. |
Static Method | _transform |
This transformation stretches (and/or mirrors) this curve by some factor in any direction. Use the factor +1 / -1 to retain / mirror the curve in that direction. |
Instance Variable | _elements |
Undocumented |
Instance Variable | _length |
Wire Elements: Ordered list of segment center points and directions. |
Instance Variable | _points |
Undocumented |
Instance Variable | _slicer |
Undocumented |
Inherited from Validatable
:
Method | valid |
No summary |
Property | valid |
True if valid, False if invalid |
Instance Variable | _valid |
Undocumented |
Slices wire segments into smaller ones until segment lengths equal or undershoot slicer limit.
Parameters | |
progressCallable | Progress callback |
Returns | |
bool | True if successful, False if interrupted |
def set(self, points:
np.ndarray
, stretch: np.ndarray
, rotational_symmetry: dict
, close_loop: bool
, slicer_limit: float
, dc: float
):
¶
Sets the parameters.
Parameters | |
points:np.ndarray | Ordered list of 3D coordinates (see presets) |
stretch:np.ndarray | XYZ stretch transform factors (3D point) |
rotationaldict | Dictionary for rotational symmetry transform |
closebool | Enable to transform the wire into a closed loop (append first point) |
slicerfloat | Slicer limit |
dc:float | Wire current (A) |
@staticmethod
def _transform_rotational_symmetry(axes: np.ndarray
, parameters: dict
, close_loop: bool
) -> np.ndarray
:
¶
This transformation replicates and rotates this curve `count` times about an `axis` with radius `radius`.
Parameters | |
axes:np.ndarray | Transposed array of Wire points |
parameters:dict | Dictionary containing the transformation parameters (number of replications, radius, axis and offset angle) |
closebool | Enable to transform the wire into a closed loop (append first point) |
Returns | |
np.ndarray | Transposed array of Wire points |
This transformation stretches (and/or mirrors) this curve by some factor in any direction. Use the factor +1 / -1 to retain / mirror the curve in that direction.
Parameters | |
axes:np.ndarray | Transposed array of Wire points |
stretch:np.ndarray | XYZ stretch transform factors (3D point) |
Returns | |
np.ndarray | Transposed array of Wire points |