class documentation

class Wire(Validatable):

View In Hierarchy

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_base Undocumented
Instance Variable points_transformed Bounding box: Minimum bounds (3D point), maximum bounds (3D point).
Property elements Wire elements
Property length Wire length
Property points_sliced Returns this wire's points after slicing.
Static Method _transform_rotational_symmetry This transformation replicates and rotates this curve `count` times about an `axis` with radius `radius`.
Static Method _transform_stretch 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_sliced Undocumented
Instance Variable _slicer_limit Undocumented

Inherited from Validatable:

Method valid.setter
Property valid True if valid, False if invalid
Instance Variable _valid Undocumented
def __init__(self):
Initializes an empty wire. A 3D piecewise linear curve with some DC current associated with it.
@validator
def recalculate(self, progress_callback):
Slices wire segments into smaller ones until segment lengths equal or undershoot slicer limit.
Parameters
progress_callback:CallableProgress callback
Returns
boolTrue if successful, False if interrupted
def set(self, points, stretch, rotational_symmetry, close_loop, slicer_limit, dc):
Sets the parameters.
Parameters
points:np.ndarrayOrdered list of 3D coordinates (see presets)
stretch:np.ndarrayXYZ stretch transform factors (3D point)
rotational_symmetry:DictDictionary for rotational symmetry transform
close_loop:boolEnable to transform the wire into a closed loop (append first point)
slicer_limit:floatSlicer limit
dc:floatWire current (A)
bounds =

Undocumented

dc =

Undocumented

points_base =

Undocumented

points_transformed =
Bounding box: Minimum bounds (3D point), maximum bounds (3D point).
@property
@require_valid
elements: np.ndarray =
Wire elements
@property
@require_valid
length: float =
Wire length
@property
@require_valid
points_sliced: np.ndarray =
Returns this wire's points after slicing.
@staticmethod
def _transform_rotational_symmetry(axes, parameters, close_loop):
This transformation replicates and rotates this curve `count` times about an `axis` with radius `radius`.
Parameters
axes:np.ndarrayTransposed array of Wire points
parameters:DictDictionary containing the transformation parameters (number of replications, radius, axis and offset angle)
close_loop:boolEnable to transform the wire into a closed loop (append first point)
Returns
np.ndarrayTransposed array of Wire points
@staticmethod
def _transform_stretch(axes, stretch):
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.ndarrayTransposed array of Wire points
stretch:np.ndarrayXYZ stretch transform factors (3D point)
Returns
np.ndarrayTransposed array of Wire points
_elements =

Undocumented

_length =
Wire Elements: Ordered list of segment center points and directions.
_points_sliced =

Undocumented

_slicer_limit =

Undocumented