Operator Reference

set_scene_3d_instance_paramT_set_scene_3d_instance_paramSetScene3dInstanceParamSetScene3dInstanceParamset_scene_3d_instance_param (Operator)

set_scene_3d_instance_paramT_set_scene_3d_instance_paramSetScene3dInstanceParamSetScene3dInstanceParamset_scene_3d_instance_param — Set parameters of an instance in a 3D scene.

Signature

set_scene_3d_instance_param( : : Scene3D, InstanceIndex, GenParamName, GenParamValue : )

Herror T_set_scene_3d_instance_param(const Htuple Scene3D, const Htuple InstanceIndex, const Htuple GenParamName, const Htuple GenParamValue)

void SetScene3dInstanceParam(const HTuple& Scene3D, const HTuple& InstanceIndex, const HTuple& GenParamName, const HTuple& GenParamValue)

void HScene3D::SetScene3dInstanceParam(const HTuple& InstanceIndex, const HTuple& GenParamName, const HTuple& GenParamValue) const

void HScene3D::SetScene3dInstanceParam(Hlong InstanceIndex, const HTuple& GenParamName, const HTuple& GenParamValue) const

static void HOperatorSet.SetScene3dInstanceParam(HTuple scene3D, HTuple instanceIndex, HTuple genParamName, HTuple genParamValue)

void HScene3D.SetScene3dInstanceParam(HTuple instanceIndex, HTuple genParamName, HTuple genParamValue)

void HScene3D.SetScene3dInstanceParam(int instanceIndex, HTuple genParamName, HTuple genParamValue)

def set_scene_3d_instance_param(scene_3d: HHandle, instance_index: MaybeSequence[int], gen_param_name: Sequence[str], gen_param_value: Sequence[Union[str, int, float]]) -> None

Description

set_scene_3d_instance_paramset_scene_3d_instance_paramSetScene3dInstanceParamSetScene3dInstanceParamset_scene_3d_instance_param sets parameters of the instance InstanceIndexInstanceIndexInstanceIndexinstanceIndexinstance_index in the 3D scene Scene3DScene3DScene3Dscene3Dscene_3d. The name and value of a parameter must be given in GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name and GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value. All parameters are applied to all instances.

The following values can be set:

'visible'"visible""visible""visible""visible"

Visibility of the 3D object models. If set to 'false'"false""false""false""false" this instance is not displayed.

List of values: 'true'"true""true""true""true", 'false'"false""false""false""false".

Default: 'true'"true""true""true""true".

'attribute'"attribute""attribute""attribute""attribute"

Explicitly select in which way a 3D object model is visualized.

List of values: 'auto'"auto""auto""auto""auto", 'faces'"faces""faces""faces""faces", 'primitive'"primitive""primitive""primitive""primitive", 'points'"points""points""points""points", 'lines'"lines""lines""lines""lines".

Default: 'auto'"auto""auto""auto""auto".

'color'"color""color""color""color":

Color of the 3D object model. The available colors can be queried with the operator query_colorquery_colorQueryColorQueryColorquery_color. In addition, the color may be specified as an RGB triplet in the form '#rrggbb'"#rrggbb""#rrggbb""#rrggbb""#rrggbb", where 'rr'"rr""rr""rr""rr", 'gg'"gg""gg""gg""gg", and 'bb'"bb""bb""bb""bb" are hexadecimal numbers between '00'"00""00""00""00" and 'ff'"ff""ff""ff""ff", respectively.

Suggested values: 'red'"red""red""red""red", 'green'"green""green""green""green".

Default: 'white'"white""white""white""white"

'alpha'"alpha""alpha""alpha""alpha":

Transparency of the 3D object models. Displaying 3D object models with transparency set to less than 1.0 may significantly increase the runtime of display_scene_3ddisplay_scene_3dDisplayScene3dDisplayScene3ddisplay_scene_3d and render_scene_3drender_scene_3dRenderScene3dRenderScene3drender_scene_3d.

Value range: floating point value between 0.0 (fully transparent) and 1.0 (fully opaque).

Default: 1.0

'disp_pose'"disp_pose""disp_pose""disp_pose""disp_pose":

Flag, if the pose of the 3D object models should be visualized.

List of values: 'true'"true""true""true""true", 'false'"false""false""false""false".

Default: 'false'"false""false""false""false".

'disp_lines'"disp_lines""disp_lines""disp_lines""disp_lines":

Flag, if the contours of the 3D object models' polygons should be displayed.

List of values: 'true'"true""true""true""true", 'false'"false""false""false""false".

Default: 'false'"false""false""false""false".

'disp_normals'"disp_normals""disp_normals""disp_normals""disp_normals":

Flag, if the surface normals of the 3D object models should be visualized.

List of values: 'true'"true""true""true""true", 'false'"false""false""false""false".

Default: 'false'"false""false""false""false".

'line_color'"line_color""line_color""line_color""line_color":

Color of the lines if 'disp_lines'"disp_lines""disp_lines""disp_lines""disp_lines" is set to 'true'"true""true""true""true". The available colors can be queried with the operator query_colorquery_colorQueryColorQueryColorquery_color. In addition, the color may be specified as an RGB triplet in the form '#rrggbb'"#rrggbb""#rrggbb""#rrggbb""#rrggbb", where 'rr'"rr""rr""rr""rr", 'gg'"gg""gg""gg""gg", and 'bb'"bb""bb""bb""bb" are hexadecimal numbers.

Suggested values: 'red'"red""red""red""red", 'green'"green""green""green""green".

Default: The value of 'color'"color""color""color""color".

'line_width'"line_width""line_width""line_width""line_width":

Sets the width of lines in pixel.

Default: 1.0

'normal_color'"normal_color""normal_color""normal_color""normal_color":

Color of the visualized normals if 'disp_normals'"disp_normals""disp_normals""disp_normals""disp_normals" is set to 'true'"true""true""true""true". The available colors can be queried with the operator query_colorquery_colorQueryColorQueryColorquery_color. In addition, the color may be specified as an RGB triplet in the form '#rrggbb'"#rrggbb""#rrggbb""#rrggbb""#rrggbb", where 'rr'"rr""rr""rr""rr", 'gg'"gg""gg""gg""gg", and 'bb'"bb""bb""bb""bb" are hexadecimal numbers.

Suggested values: 'red'"red""red""red""red", 'green'"green""green""green""green".

Default: The value of 'color'"color""color""color""color"

'point_size'"point_size""point_size""point_size""point_size":

Sets the diameter of the points in pixel.

Default: 3.5.

'lut'"lut""lut""lut""lut":

Sets the LUT that transforms the values of the attribute set with 'color_attrib'"color_attrib""color_attrib""color_attrib""color_attrib" into a color.

See set_lutset_lutSetLutSetLutset_lut for available LUTs. If 'lut'"lut""lut""lut""lut" is set to anything but 'default'"default""default""default""default", 'color'"color""color""color""color" is ignored.

Default: 'default'"default""default""default""default".

'color_attrib'"color_attrib""color_attrib""color_attrib""color_attrib":

Name of a point attribute that is used for false color visualization.

If an attribute is set, the color of the displayed 3D points is determined by the point's attribute value and the currently set LUT (see 'lut'"lut""lut""lut""lut"). This way, it is possible to visualize attributes in false colors.

Example: If 'color_attrib'"color_attrib""color_attrib""color_attrib""color_attrib" is set to 'coord_z'"coord_z""coord_z""coord_z""coord_z", and 'lut'"lut""lut""lut""lut" is set to 'color1'"color1""color1""color1""color1", the z-coordinates will be color coded from red to blue.

If 'lut'"lut""lut""lut""lut" is set to 'default'"default""default""default""default", the attribute values are used to scale the color that was set by the parameter 'color'"color""color""color""color".

If 'lut'"lut""lut""lut""lut" is set to a different value, the attribute values of all points are internally scaled to the interval [0,255] and used as input value for the LUT function.

The mapping is also controlled by the parameters 'color_attrib_start'"color_attrib_start""color_attrib_start""color_attrib_start""color_attrib_start" and 'color_attrib_end'"color_attrib_end""color_attrib_end""color_attrib_end""color_attrib_end" (see below).

If faces are displayed, their color is interpolated between the color of the corner points.

Suggested values: 'none'"none""none""none""none", '&distance'"&distance""&distance""&distance""&distance", 'coord_x'"coord_x""coord_x""coord_x""coord_x", 'coord_y'"coord_y""coord_y""coord_y""coord_y", 'coord_z'"coord_z""coord_z""coord_z""coord_z", user defined point attributes, or any other point attribute available.

Default: 'none'"none""none""none""none".

'color_attrib_start'"color_attrib_start""color_attrib_start""color_attrib_start""color_attrib_start",'color_attrib_end'"color_attrib_end""color_attrib_end""color_attrib_end""color_attrib_end":

The range of interest of the values of the attribute set with 'color_attrib'"color_attrib""color_attrib""color_attrib""color_attrib".

The attribute values between 'color_attrib_start'"color_attrib_start""color_attrib_start""color_attrib_start""color_attrib_start" and 'color_attrib_end'"color_attrib_end""color_attrib_end""color_attrib_end""color_attrib_end" are scaled to the start and end of the selected LUT. Attribute values outside the selected range are clipped. This allows to use a fixed color mapping which will not be distorted by outliers.

If set to 'auto'"auto""auto""auto""auto", the minimum attribute value is mapped to the start of the LUT, the maximum is mapped to the end of the LUT, except if 'color_attrib'"color_attrib""color_attrib""color_attrib""color_attrib" is 'normal_x'"normal_x""normal_x""normal_x""normal_x", 'normal_y'"normal_y""normal_y""normal_y""normal_y", or 'normal_z'"normal_z""normal_z""normal_z""normal_z". In this case, start and end are automatically set to -1 and 1.

It is possible to enter start value that is higher than the end value. This will in effect flip the used LUT.

Suggested values: 0, 0.1, 1, 100, 255, 'auto'"auto""auto""auto""auto".

Default: 'auto'"auto""auto""auto""auto".

'red_channel_attrib'"red_channel_attrib""red_channel_attrib""red_channel_attrib""red_channel_attrib", 'green_channel_attrib'"green_channel_attrib""green_channel_attrib""green_channel_attrib""green_channel_attrib", 'blue_channel_attrib'"blue_channel_attrib""blue_channel_attrib""blue_channel_attrib""blue_channel_attrib":

Name of a point attribute that is used for the red, green, or blue color channel.

This is most useful when used with a group of three connected attributes, like RGB colors or normal vectors. This way it is possible to display points in colored texture, e.g., display the object model with overlayed RGB-sensor data, or display point normals in false colors.

To display only a single attribute in false colors, please use 'color_attrib'"color_attrib""color_attrib""color_attrib""color_attrib" (see above).

By default, the attribute values are assumed to lie between 0 and 255. If the attributes have a different range, you additionally have to set the parameters 'rgb_channel_attrib_start'"rgb_channel_attrib_start""rgb_channel_attrib_start""rgb_channel_attrib_start""rgb_channel_attrib_start" and 'rgb_channel_attrib_end'"rgb_channel_attrib_end""rgb_channel_attrib_end""rgb_channel_attrib_end""rgb_channel_attrib_end" (see below).

If only 1 or 2 channels are set, the remaining channels use the RGB value of the color set with 'color'"color""color""color""color".

If faces are displayed, their color is interpolated between the color of the corner points.

Suggested values: 'none'"none""none""none""none", '&red'"&red""&red""&red""&red", '&green'"&green""&green""&green""&green", '&blue'"&blue""&blue""&blue""&blue", 'normal_x'"normal_x""normal_x""normal_x""normal_x", 'normal_y'"normal_y""normal_y""normal_y""normal_y", 'normal_z'"normal_z""normal_z""normal_z""normal_z", user defined point attributes, or any other point attribute available.

Default: 'none'"none""none""none""none".

'rgb_channel_attrib_start'"rgb_channel_attrib_start""rgb_channel_attrib_start""rgb_channel_attrib_start""rgb_channel_attrib_start", 'rgb_channel_attrib_end'"rgb_channel_attrib_end""rgb_channel_attrib_end""rgb_channel_attrib_end""rgb_channel_attrib_end":

The range of interest of the values of attributes set with 'red_channel_attrib'"red_channel_attrib""red_channel_attrib""red_channel_attrib""red_channel_attrib", 'green_channel_attrib'"green_channel_attrib""green_channel_attrib""green_channel_attrib""green_channel_attrib", and 'blue_channel_attrib'"blue_channel_attrib""blue_channel_attrib""blue_channel_attrib""blue_channel_attrib".

These parameters define the value range that is scaled to the full RGB channels. This is useful, if the input attribute values are not in the interval [0,255].

If set to 'auto'"auto""auto""auto""auto", the minimum attribute value is mapped to 0, the maximum is mapped to 255, except if the attribute is 'normal_x'"normal_x""normal_x""normal_x""normal_x", 'normal_y'"normal_y""normal_y""normal_y""normal_y", or 'normal_z'"normal_z""normal_z""normal_z""normal_z". In this case, start and end are automatically set to -1 and 1.

It is possible to enter start value that is higher than the end value. This will in effect invert the displayed RGB colors.

The range can be set for the channels individually by replacing 'rgb'"rgb""rgb""rgb""rgb" in the parameter name with the channel name, e.g., 'green_channel_attrib_start'"green_channel_attrib_start""green_channel_attrib_start""green_channel_attrib_start""green_channel_attrib_start".

Suggested values: 'auto'"auto""auto""auto""auto", 0, 0.1, 1, 100, 255.

Default: 0, 255.

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

Scene3DScene3DScene3Dscene3Dscene_3d (input_control)  scene_3d HScene3D, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the 3D scene.

InstanceIndexInstanceIndexInstanceIndexinstanceIndexinstance_index (input_control)  integer(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Index of the instance.

GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  string-array HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Names of the generic parameters.

Default: 'color' "color" "color" "color" "color"

List of values: 'alpha'"alpha""alpha""alpha""alpha", 'attribute'"attribute""attribute""attribute""attribute", 'blue_channel_attrib'"blue_channel_attrib""blue_channel_attrib""blue_channel_attrib""blue_channel_attrib", 'color'"color""color""color""color", 'color_attrib'"color_attrib""color_attrib""color_attrib""color_attrib", 'color_attrib_end'"color_attrib_end""color_attrib_end""color_attrib_end""color_attrib_end", 'color_attrib_start'"color_attrib_start""color_attrib_start""color_attrib_start""color_attrib_start", 'disp_lines'"disp_lines""disp_lines""disp_lines""disp_lines", 'disp_normals'"disp_normals""disp_normals""disp_normals""disp_normals", 'disp_pose'"disp_pose""disp_pose""disp_pose""disp_pose", 'green_channel_attrib'"green_channel_attrib""green_channel_attrib""green_channel_attrib""green_channel_attrib", 'line_color'"line_color""line_color""line_color""line_color", 'line_width'"line_width""line_width""line_width""line_width", 'lut'"lut""lut""lut""lut", 'normal_color'"normal_color""normal_color""normal_color""normal_color", 'point_size'"point_size""point_size""point_size""point_size", 'red_channel_attrib'"red_channel_attrib""red_channel_attrib""red_channel_attrib""red_channel_attrib", 'rgb_channel_attrib_end'"rgb_channel_attrib_end""rgb_channel_attrib_end""rgb_channel_attrib_end""rgb_channel_attrib_end", 'rgb_channel_attrib_start'"rgb_channel_attrib_start""rgb_channel_attrib_start""rgb_channel_attrib_start""rgb_channel_attrib_start", 'visible'"visible""visible""visible""visible"

GenParamValueGenParamValueGenParamValuegenParamValuegen_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: 'green' "green" "green" "green" "green"

Suggested values: 'true'"true""true""true""true", 'false'"false""false""false""false", 'coord_x'"coord_x""coord_x""coord_x""coord_x", 'coord_y'"coord_y""coord_y""coord_y""coord_y", 'coord_z'"coord_z""coord_z""coord_z""coord_z", 'normal_x'"normal_x""normal_x""normal_x""normal_x", 'normal_y'"normal_y""normal_y""normal_y""normal_y", 'normal_z'"normal_z""normal_z""normal_z""normal_z", 'red'"red""red""red""red", 'green'"green""green""green""green", 'blue'"blue""blue""blue""blue", 'auto'"auto""auto""auto""auto", 'faces'"faces""faces""faces""faces", 'primitive'"primitive""primitive""primitive""primitive", 'points'"points""points""points""points", 'lines'"lines""lines""lines""lines"

Result

set_scene_3d_instance_paramset_scene_3d_instance_paramSetScene3dInstanceParamSetScene3dInstanceParamset_scene_3d_instance_param returns 2 ( H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Possible Predecessors

add_scene_3d_instanceadd_scene_3d_instanceAddScene3dInstanceAddScene3dInstanceadd_scene_3d_instance

See also

set_scene_3d_paramset_scene_3d_paramSetScene3dParamSetScene3dParamset_scene_3d_param

Module

3D Metrology