Operators |
set_scene_3d_label_param — Set parameters of a text label in a 3D scene.
set_scene_3d_label_param( : : Scene3D, LabelIndex, GenParamName, GenParamValue : )
set_scene_3d_label_param sets parameters of the label LabelIndex in the 3D scene Scene3D. The name and value of a parameter must be given in GenParamName and GenParamValue. It is only possible to provide one GenParamName,GenParamValue pair but multiple labels. The parameter is applied to all labels in LabelIndex.
The following values can be set:
Coordinates of the reference point, as a tuple of [X, Y, Z] coordinates. To remove the current reference point, it is possible to pass an empty tuple for 'reference_point' . This is only possible if 'relates_to' is 'window' .
Position (relative or absolute depending on the parameter 'relates_to' ) of the label, as a tuple of [Row, Column] coordinates or one of the following predefined positions: 'top_left' , 'top' , 'top_right' , 'left' , 'center' , 'right' , 'bottom_left' , 'bottom' , or 'bottom_right' .
Relation of the position. May be 'window' (fixed positioning in window coordinates) or 'point' (positioning relative to the reference point). 'relates_to' cannot be set to 'point' if the reference point has been set to an empty tuple. Values: 'window' or 'point'
Text of the label. Multiple Lines must be separated with '\n' .
Font of the text label.
Values: Available fonts can be queried using query_font.
Default value: Font of the first window the scene is displayed in, default system font otherwise.
Color of the text on the label. The available colors can be queried with the operator query_color. In addition, the color may be specified as an RGB triplet in the form '#rrggbb' , where 'rr', 'gg', and 'bb' are hexadecimal numbers between '00' and 'ff', respectively.
Values: 'red', 'green', ...
Default value: 'white'
Transparency of the text label's background.
Values: floating point value between 0.0 (fully transparent) and 1.0 (fully opaque).
Default value: 1.0
Color of the label itself. The available colors can be queried with the operator query_color. In addition, the color may be specified as an RGB triplet in the form '#rrggbb' , where 'rr', 'gg', and 'bb' are hexadecimal numbers between '00' and 'ff', respectively.
Values: 'red', 'green', ...
Default value: 'gray'
Flag that determines if the background of the label should be visualized.
Values: 'true' or 'false'
Default value: 'true'
Flag that determines if the connecting line between the label and reference 3D point should be visualized.
Values: 'true' or 'false'
Default value: 'true'
Sets the visibility of the label. If set to 'if_point_is_visible' , the label is only visible if its reference point is visible. If the compatibility mode is enabled or no reference point is set, 'if_point_is_visible' is equal to 'true' .
Values: 'true', 'false', 'if_point_is_visible'
Default value: 'true'
Handle of the 3D scene.
Index of the text label.
Names of the generic parameters.
Default value: 'color'
List of values: 'color' , 'disp_background' , 'disp_connecting_line' , 'font' , 'position' , 'reference_point' , 'relates_to' , 'text' , 'text_color' , 'visibility'
Values of the generic parameters.
Default value: 'red'
List of values: 'blue' , 'bottom' , 'bottom_left' , 'bottom_right' , 'center' , 'green' , 'left' , 'point' , 'red' , 'right' , 'top' , 'top_left' , 'top_right' , 'window'
set_scene_3d_label_param returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.
3D Metrology
Operators |