common
rotx(theta: float) -> numpy.ndarray
This function returns a rotation matrix around the X axis.
parameter |
type |
description |
theta
| float
| Rotation angle around the X axis [rad]
|
$$
\mathrm{rotx}(\theta) =
\left( \begin{array}{ccc}
1.0 & 0.0 & 0.0 \\
0.0 & \cos \theta & -\sin \theta \\
0.0 & \sin \theta & \cos \theta
\end{array} \right)
$$
roty(theta: float) -> numpy.ndarray
This function returns a rotation matrix around the Y axis.
parameter |
type |
description |
theta
| float
| Rotation angle around the Y axis [rad]
|
$$
\mathrm{roty}(\theta) =
\left( \begin{array}{ccc}
\cos \theta & 0.0 & \sin \theta \\
0.0 & 1.0 & 0.0 \\
-\sin \theta & 0.0 & \cos \theta
\end{array} \right)
$$
rotz(theta: float) -> numpy.ndarray
This function returns a rotation matrix around the Z axis.
parameter |
type |
description |
theta
| float
| Rotation angle around the Z axis [rad]
|
$$
\mathrm{rotz}(\theta) =
\left( \begin{array}{ccc}
\cos \theta & -\sin \theta & 0.0 \\
\sin \theta & \cos \theta & 0.0 \\
0.0 & 0.0 & 1.0
\end{array} \right)
$$
rotate_base_euler(ang1, ang2, ang3, order='ZYX', base=numpy.eye(3)) -> numpy.ndarray
This function converts the base vectors by the Euler angles, and returns the converted base vectors as a 3 × 3 numpy.ndarray.
parameter |
type |
description |
ang1
| float
| First rotation angle [rad]
|
ang2
| float
| Second rotation angle [rad]
|
ang3
| float
| Third rotation angle [rad]
|
order = 'ZYX'
| str
|
The order of rotations. By default, 'ZYX' (which means firstly rotate around the Z axis, secondly rotate around the local Y axis and thirdly rotate around the local X axis) is selected.
The following 12 cases available (there are 3 × 3 × 3 combinations, but rotating two/three times in the same direction in series does not make sense):
'XYX', 'XYZ', 'XZX', 'XZY',
'YXY', 'YXZ', 'YZX', 'YZY',
'ZXY', 'ZXZ', 'ZYX', 'ZYZ'.
|
base=numpy.eye(3)
| numpy.ndarray
| The original base vectors. X axis is the first colum, Y axis is the second column, and Z axis is the third column. The default value is a 3 × 3 unit matrix.
|
get_number_of_nodes(td: OpenTDv62.ThermalDesktop, submodel_name: str='') -> int
This function returns the number of nodes. By default, it returns the number of nodes of the entire model.
If 'submodel_name' is given, it returns the number of nodes of the specified submodel.
parameter |
type |
description |
td
| OpenTDv62.ThermalDesktop
| Thermal Desktop instance
|
submodel_name = ''
| str
| Name of the submodel
|
get_submodel_nodes(td: OpenTDv62.ThermalDesktop, submodel_name: str) -> list
This function returns the specified submodel node instances as a list.
parameter |
type |
description |
td
| OpenTDv62.ThermalDesktop
| Thermal Desktop instance
|
submodel_name
| str
| Name of the submodel
|
renumber_submodel_nodes(td: OpenTDv62.ThermalDesktop, submodel_name: str)
This function performs renumbering of the node IDs within the specified submodel.
parameter |
type |
description |
td
| OpenTDv62.ThermalDesktop
| Thermal Desktop instance
|
submodel_name
| str
| Name of the submodel
|
merge_submodel_nodes(td: OpenTDv62.ThermalDesktop, submodel_name: str, tolerance: float=0.1e-3)
With this function, nodes which are closer than 'tolerance' will be merged within the specified submodel.
parameter |
type |
description |
td
| OpenTDv62.ThermalDesktop
| Thermal Desktop instance
|
submodel_name
| str
| Name of the submodel
|
tolerance = 0.1e-3
| float
| Tolerance for merging nodes
|
All the contactors will be deleted.
parameter |
type |
description |
td
| OpenTDv62.ThermalDesktop
| Thermal Desktop instance
|
delete_contactors(td: OpenTDv62.ThermalDesktop)
All the conductors will be deleted.
parameter |
type |
description |
td
| OpenTDv62.ThermalDesktop
| Thermal Desktop instance
|
delete_heaters(td: OpenTDv62.ThermalDesktop)
All the heaters will be deleted.
parameter |
type |
description |
td
| OpenTDv62.ThermalDesktop
| Thermal Desktop instance
|
delete_heatloads(td: OpenTDv62.ThermalDesktop)
All the heatloads will be deleted.
parameter |
type |
description |
td
| OpenTDv62.ThermalDesktop
| Thermal Desktop instance
|
Rectangle |
Disk |
Cylinder |
Cone |
Torus |
ScarfedCylinder |
Sphere |
Polygon |
0: Edges |
1: Face |
0: Edges |
1: Face |
0: Edges |
1: Face |
0: Edges |
1: Face |
0: Edges |
1: Face |
0: Edges |
1: Face |
0: Edges |
1: Face |
0: Edges |
1: Face |
Along Y at X=0 |
Top |
Not Used |
Top |
Start Angle |
Out |
Start Angle |
Out |
Start Angle Large |
Out |
Start Angle |
Out |
Start Angle |
Out |
Edge 0 |
Top |
Along X at Ymax |
Bottom |
Max Radius |
Bottom |
Max Height |
In |
Max Height |
In |
Start Angle Small |
In |
Max Height |
In |
Max Height |
In |
Edge 1 |
In |
Along Y at Xmax |
|
Not Used |
|
End Angle |
|
End Angle |
|
End Angle Large |
|
End Angle |
|
End Angle |
|
Edge 2 |
|
Along X at Y=0 |
|
Min Radius |
|
Base |
|
Base |
|
End Angle Small |
|
Base |
|
Min Height |
|
Edge 3 |
|
SolidBrick |
SolidCylinder |
SolidSphere |
1: Face |
1: Face |
1: Face |
XMIN |
GMIN |
GMIN |
XMAX |
GMAX |
GMAX |
YMIN |
RMIN |
RMIN |
YMAX |
RMAX |
RMAX |
ZMIN |
HMIN |
BMIN |
ZMAX |
HMAX |
BMAX |
screenshot(td: OpenTDv62.ThermalDesktop, name: str, view: str='', style: str='XRAY', imageformat: str='png', width: int=0, height: int=0)
With this function, a screenshot can be taken with the specified perspective, style, image format, and size.
parameter |
type |
description |
td
| OpenTDv62.ThermalDesktop
| Thermal Desktop instance
|
name
| str
| Name for the image file
|
view = ''
| str
|
Available perspectives: ‘SW’, ‘SE’, ‘NE’, ‘NW’, ‘TOP’, ‘BOTTOM’, ‘FRONT’, ‘BACK’, ‘LEFT’, ‘RIGHT’.
If the given parameter does not match with the available perspectives, the current perspective on the screen will be used for the screenshot.
|
style = ''
| str
|
Available model styles: ‘WIRE_2D’, ‘WIRE’, ‘CONCEPTUAL’, ‘HIDDEN’, ‘REALISTIC’, ‘SHADED’, ‘SHADED_W_EDGES’, ‘SHADES_OF_GREY’, ‘SKETCHY’, ‘THERMAL’, ‘THERMAL_PP’, ‘XRAY’.
If the given parameter does not match with the available model styles, the current model style on the screen will be used for the screenshot.
|
imageformat
| str
| Available image format: ‘bmp’, ‘emf’, ‘exif’, ‘gif’, ‘icon’, ‘jpeg’, ‘png’, ‘tiff’, ‘wmf’. If the given parameter does not match with the available format, a png image will be generated as default.
|
width = 0
| int
| Width pixel for trimming. If this parameter is larger than 0 and smaller than the original screenshot width, then the image is trimmed to the specified width. The default value is 0, which means no trimming.
|
height = 0
| int
| Height pixel for trimming. If this parameter is larger than 0 and smaller than the original screenshot height, then the image is trimmed to the specified height. The default value is 0, which means no trimming.
|