set_scene_3d_label_paramT_set_scene_3d_label_paramSetScene3dLabelParamSetScene3dLabelParamset_scene_3d_label_param (Operator)
Name
set_scene_3d_label_paramT_set_scene_3d_label_paramSetScene3dLabelParamSetScene3dLabelParamset_scene_3d_label_param
— Set parameters of a text label in a 3D scene.
Signature
void SetScene3dLabelParam(const HTuple& Scene3D, const HTuple& LabelIndex, const HTuple& GenParamName, const HTuple& GenParamValue)
void HScene3D::SetScene3dLabelParam(const HTuple& LabelIndex, const HString& GenParamName, const HTuple& GenParamValue) const
void HScene3D::SetScene3dLabelParam(Hlong LabelIndex, const HString& GenParamName, const HTuple& GenParamValue) const
void HScene3D::SetScene3dLabelParam(Hlong LabelIndex, const char* GenParamName, const HTuple& GenParamValue) const
void HScene3D::SetScene3dLabelParam(Hlong LabelIndex, const wchar_t* GenParamName, const HTuple& GenParamValue) const
(
Windows only)
Description
set_scene_3d_label_paramset_scene_3d_label_paramSetScene3dLabelParamSetScene3dLabelParamSetScene3dLabelParamset_scene_3d_label_param
sets parameters of the
label LabelIndexLabelIndexLabelIndexLabelIndexlabelIndexlabel_index
in the 3D scene Scene3DScene3DScene3DScene3Dscene3Dscene_3d
. The name
and value of a parameter must be given in GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name
and GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
. It is only possible to provide one
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name
,GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
pair but multiple
labels. The parameter is applied to all labels in LabelIndexLabelIndexLabelIndexLabelIndexlabelIndexlabel_index
.
The following values can be set:
- 'reference_point'"reference_point""reference_point""reference_point""reference_point""reference_point":
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'"reference_point""reference_point""reference_point""reference_point""reference_point".
This is only possible if 'relates_to'"relates_to""relates_to""relates_to""relates_to""relates_to" is
'window'"window""window""window""window""window".
- 'position'"position""position""position""position""position":
Position (relative or absolute depending on the parameter
'relates_to'"relates_to""relates_to""relates_to""relates_to""relates_to") of the label, as a tuple of
[Row, Column] coordinates or one of the following predefined
positions:
'top_left'"top_left""top_left""top_left""top_left""top_left", 'top'"top""top""top""top""top", 'top_right'"top_right""top_right""top_right""top_right""top_right",
'left'"left""left""left""left""left", 'center'"center""center""center""center""center", 'right'"right""right""right""right""right",
'bottom_left'"bottom_left""bottom_left""bottom_left""bottom_left""bottom_left", 'bottom'"bottom""bottom""bottom""bottom""bottom", or
'bottom_right'"bottom_right""bottom_right""bottom_right""bottom_right""bottom_right".
- 'relates_to'"relates_to""relates_to""relates_to""relates_to""relates_to":
-
Relation of the position. May be 'window'"window""window""window""window""window"
(fixed positioning in window coordinates) or 'point'"point""point""point""point""point"
(positioning relative to the reference point).
'relates_to'"relates_to""relates_to""relates_to""relates_to""relates_to" cannot be set to 'point'"point""point""point""point""point" if
the reference point has been set to an empty tuple.
List of values: 'window'"window""window""window""window""window" , 'point'"point""point""point""point""point".
Default: 'window'"window""window""window""window""window".
- 'text'"text""text""text""text""text":
-
Text of the label. Multiple Lines must be separated with
'\n'"\n""\n""\n""\n""\n".
- 'font'"font""font""font""font""font":
-
Font of the text label.
Possible values: Available fonts can be queried using
query_fontquery_fontQueryFontQueryFontQueryFontquery_font
.
Default: Font of the first window the scene is
displayed in, default system font otherwise.
- 'text_color'"text_color""text_color""text_color""text_color""text_color":
-
Color of the text on the label. The available colors can be queried
with the operator query_colorquery_colorQueryColorQueryColorQueryColorquery_color
. In addition, the color may
be specified as an RGB triplet in the form '#rrggbb'"#rrggbb""#rrggbb""#rrggbb""#rrggbb""#rrggbb",
where 'rr', 'gg', and 'bb' are hexadecimal numbers between '00'
and 'ff', respectively.
Possible values: 'red'"red""red""red""red""red", 'green'"green""green""green""green""green".
Default: 'white'"white""white""white""white""white".
- 'alpha'"alpha""alpha""alpha""alpha""alpha":
-
Transparency of the text label's background.
Possible values: floating point value between 0.0 (fully transparent)
and 1.0 (fully opaque).
Default: 1.0
- 'color'"color""color""color""color""color":
-
Color of the label itself. The available colors can be queried
with the operator query_colorquery_colorQueryColorQueryColorQueryColorquery_color
. In addition, the color may
be specified as an RGB triplet in the form '#rrggbb'"#rrggbb""#rrggbb""#rrggbb""#rrggbb""#rrggbb",
where 'rr', 'gg', and 'bb' are hexadecimal numbers between '00'
and 'ff', respectively.
Possible values: 'red'"red""red""red""red""red", 'green'"green""green""green""green""green".
Default: 'gray'"gray""gray""gray""gray""gray".
- 'disp_background'"disp_background""disp_background""disp_background""disp_background""disp_background":
-
Flag that determines if the background of the label should be
visualized.
List of values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false".
Default: 'true'"true""true""true""true""true".
- 'disp_connecting_line'"disp_connecting_line""disp_connecting_line""disp_connecting_line""disp_connecting_line""disp_connecting_line":
-
Flag that determines if the connecting line between the label and
reference 3D point should be visualized.
List of values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false".
Default: 'true'"true""true""true""true""true".
- 'visible'"visible""visible""visible""visible""visible":
-
Sets the visibility of the label. If set to
'if_point_is_visible'"if_point_is_visible""if_point_is_visible""if_point_is_visible""if_point_is_visible""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'"if_point_is_visible""if_point_is_visible""if_point_is_visible""if_point_is_visible""if_point_is_visible" is equal to 'true'"true""true""true""true""true".
List of values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false",
'if_point_is_visible'"if_point_is_visible""if_point_is_visible""if_point_is_visible""if_point_is_visible""if_point_is_visible".
Default: 'true'"true""true""true""true""true".
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
Scene3DScene3DScene3DScene3Dscene3Dscene_3d
(input_control) scene_3d →
HScene3D, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the 3D scene.
LabelIndexLabelIndexLabelIndexLabelIndexlabelIndexlabel_index
(input_control) integer(-array) →
HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Index of the text label.
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name
(input_control) string →
HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Names of the generic parameters.
Default:
'color'
"color"
"color"
"color"
"color"
"color"
List of values:
'color'"color""color""color""color""color", 'disp_background'"disp_background""disp_background""disp_background""disp_background""disp_background", 'disp_connecting_line'"disp_connecting_line""disp_connecting_line""disp_connecting_line""disp_connecting_line""disp_connecting_line", 'font'"font""font""font""font""font", 'position'"position""position""position""position""position", 'reference_point'"reference_point""reference_point""reference_point""reference_point""reference_point", 'relates_to'"relates_to""relates_to""relates_to""relates_to""relates_to", 'text'"text""text""text""text""text", 'text_color'"text_color""text_color""text_color""text_color""text_color", 'visible'"visible""visible""visible""visible""visible"
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
(input_control) string-array →
HTupleSequence[Union[str, int, float]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)
Values of the generic parameters.
Default:
'red'
"red"
"red"
"red"
"red"
"red"
List of values:
'blue'"blue""blue""blue""blue""blue", 'bottom'"bottom""bottom""bottom""bottom""bottom", 'bottom_left'"bottom_left""bottom_left""bottom_left""bottom_left""bottom_left", 'bottom_right'"bottom_right""bottom_right""bottom_right""bottom_right""bottom_right", 'center'"center""center""center""center""center", 'green'"green""green""green""green""green", 'left'"left""left""left""left""left", 'point'"point""point""point""point""point", 'red'"red""red""red""red""red", 'right'"right""right""right""right""right", 'top'"top""top""top""top""top", 'top_left'"top_left""top_left""top_left""top_left""top_left", 'top_right'"top_right""top_right""top_right""top_right""top_right", 'window'"window""window""window""window""window"
Result
set_scene_3d_label_paramset_scene_3d_label_paramSetScene3dLabelParamSetScene3dLabelParamSetScene3dLabelParamset_scene_3d_label_param
returns 2 (
H_MSG_TRUE)
if all parameters are
correct. If necessary, an exception is raised.
Possible Predecessors
add_scene_3d_labeladd_scene_3d_labelAddScene3dLabelAddScene3dLabelAddScene3dLabeladd_scene_3d_label
Module
3D Metrology