set_object_model_3d_attrib_modT_set_object_model_3d_attrib_modSetObjectModel3dAttribModSetObjectModel3dAttribModset_object_model_3d_attrib_mod (算子名称)

名称

set_object_model_3d_attrib_modT_set_object_model_3d_attrib_modSetObjectModel3dAttribModSetObjectModel3dAttribModset_object_model_3d_attrib_mod — Set attributes of a 3D object model.

参数签名

set_object_model_3d_attrib_mod( : : ObjectModel3D, AttribName, AttachExtAttribTo, AttribValues : )

Herror T_set_object_model_3d_attrib_mod(const Htuple ObjectModel3D, const Htuple AttribName, const Htuple AttachExtAttribTo, const Htuple AttribValues)

void SetObjectModel3dAttribMod(const HTuple& ObjectModel3D, const HTuple& AttribName, const HTuple& AttachExtAttribTo, const HTuple& AttribValues)

void HObjectModel3D::SetObjectModel3dAttribMod(const HTuple& AttribName, const HString& AttachExtAttribTo, const HTuple& AttribValues) const

void HObjectModel3D::SetObjectModel3dAttribMod(const HString& AttribName, const HString& AttachExtAttribTo, double AttribValues) const

void HObjectModel3D::SetObjectModel3dAttribMod(const char* AttribName, const char* AttachExtAttribTo, double AttribValues) const

void HObjectModel3D::SetObjectModel3dAttribMod(const wchar_t* AttribName, const wchar_t* AttachExtAttribTo, double AttribValues) const   ( Windows only)

static void HOperatorSet.SetObjectModel3dAttribMod(HTuple objectModel3D, HTuple attribName, HTuple attachExtAttribTo, HTuple attribValues)

void HObjectModel3D.SetObjectModel3dAttribMod(HTuple attribName, string attachExtAttribTo, HTuple attribValues)

void HObjectModel3D.SetObjectModel3dAttribMod(string attribName, string attachExtAttribTo, double attribValues)

def set_object_model_3d_attrib_mod(object_model_3d: HHandle, attrib_name: MaybeSequence[str], attach_ext_attrib_to: str, attrib_values: MaybeSequence[Union[float, int]]) -> None

描述

set_object_model_3d_attrib_modset_object_model_3d_attrib_modSetObjectModel3dAttribModSetObjectModel3dAttribModSetObjectModel3dAttribModset_object_model_3d_attrib_mod sets the standard attributes or the extended attributes given in AttribNameAttribNameAttribNameAttribNameattribNameattrib_name of a 3D object model ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d to the values in AttribValuesAttribValuesAttribValuesAttribValuesattribValuesattrib_values. set_object_model_3d_attrib_modset_object_model_3d_attrib_modSetObjectModel3dAttribModSetObjectModel3dAttribModSetObjectModel3dAttribModset_object_model_3d_attrib_mod is identical to set_object_model_3d_attribset_object_model_3d_attribSetObjectModel3dAttribSetObjectModel3dAttribSetObjectModel3dAttribset_object_model_3d_attrib, with the exception that it does not create a new 3D object model but modifies the given one. It is possible to attach the values of extended attributes to already existing standard attributes of the 3D object model by setting the parameter AttachExtAttribToAttachExtAttribToAttachExtAttribToAttachExtAttribToattachExtAttribToattach_ext_attrib_to. For standard attributes, AttachExtAttribToAttachExtAttribToAttachExtAttribToAttachExtAttribToattachExtAttribToattach_ext_attrib_to is ignored.

If the attributes in AttribNameAttribNameAttribNameAttribNameattribNameattrib_name do not exist, they are created if possible. If already existing attributes are set, the length of AttribValuesAttribValuesAttribValuesAttribValuesattribValuesattrib_values must match the existing attribute values. In this case the existing attribute values are replaced. If extended attributes are attached to already existing standard attributes with AttachExtAttribToAttachExtAttribToAttachExtAttribToAttachExtAttribToattachExtAttribToattach_ext_attrib_to, the length of AttribValuesAttribValuesAttribValuesAttribValuesattribValuesattrib_values must match the existing attribute values.

For a detailed description see operator set_object_model_3d_attribset_object_model_3d_attribSetObjectModel3dAttribSetObjectModel3dAttribSetObjectModel3dAttribset_object_model_3d_attrib.

注意

If multiple attributes are given in AttribNameAttribNameAttribNameAttribNameattribNameattrib_name, AttribValuesAttribValuesAttribValuesAttribValuesattribValuesattrib_values is divided into sub-tuples of equal length. Each sub-tuple is then assigned to one attribute. E.g., if AttribNameAttribNameAttribNameAttribNameattribNameattrib_name and AttribValuesAttribValuesAttribValuesAttribValuesattribValuesattrib_values are set to

AttribNameAttribNameAttribNameAttribNameattribNameattrib_name := ['&attrib1','&attrib2','&attrib3']["&attrib1","&attrib2","&attrib3"]["&attrib1","&attrib2","&attrib3"]["&attrib1","&attrib2","&attrib3"]["&attrib1","&attrib2","&attrib3"]["&attrib1","&attrib2","&attrib3"],

AttribValuesAttribValuesAttribValuesAttribValuesattribValuesattrib_values := [0.0,1.0,2.0,3.0,4.0,5.0],

the following values are assigned to the individual attributes:

'&attrib1'"&attrib1""&attrib1""&attrib1""&attrib1""&attrib1" = [0.0,1.0], '&attrib2'"&attrib2""&attrib2""&attrib2""&attrib2""&attrib2" = [2.0,3.0], '&attrib3'"&attrib3""&attrib3""&attrib3""&attrib3""&attrib3" = [4.0,5.0].

Consequently, it is not possible to set multiple attributes of different lengths in one call.

set_object_model_3d_attrib_modset_object_model_3d_attrib_modSetObjectModel3dAttribModSetObjectModel3dAttribModSetObjectModel3dAttribModset_object_model_3d_attrib_mod modifies the content of an already existing 3D object model. 该算子 stores the input AttribValuesAttribValuesAttribValuesAttribValuesattribValuesattrib_values unmodified in the 3D object model. Therefore, special attention must be paid to the consistency of the input data, as most of 该算子s expect consistent 3D object models.

运行信息

参数表

ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d (input_control)  object_model_3d HObjectModel3D, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the 3D object model.

AttribNameAttribNameAttribNameAttribNameattribNameattrib_name (input_control)  string(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Name of the attributes.

List of values: 'blue'"blue""blue""blue""blue""blue", 'green'"green""green""green""green""green", 'lines'"lines""lines""lines""lines""lines", 'original_point_indices'"original_point_indices""original_point_indices""original_point_indices""original_point_indices""original_point_indices", 'point_coord_x'"point_coord_x""point_coord_x""point_coord_x""point_coord_x""point_coord_x", 'point_coord_y'"point_coord_y""point_coord_y""point_coord_y""point_coord_y""point_coord_y", 'point_coord_z'"point_coord_z""point_coord_z""point_coord_z""point_coord_z""point_coord_z", 'point_normal_x'"point_normal_x""point_normal_x""point_normal_x""point_normal_x""point_normal_x", 'point_normal_y'"point_normal_y""point_normal_y""point_normal_y""point_normal_y""point_normal_y", 'point_normal_z'"point_normal_z""point_normal_z""point_normal_z""point_normal_z""point_normal_z", 'polygons'"polygons""polygons""polygons""polygons""polygons", 'red'"red""red""red""red""red", 'score'"score""score""score""score""score", 'triangles'"triangles""triangles""triangles""triangles""triangles", 'xyz_mapping'"xyz_mapping""xyz_mapping""xyz_mapping""xyz_mapping""xyz_mapping"

AttachExtAttribToAttachExtAttribToAttachExtAttribToAttachExtAttribToattachExtAttribToattach_ext_attrib_to (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Defines where extended attributes are attached to.

Default: []

List of values: [], 'lines'"lines""lines""lines""lines""lines", 'object'"object""object""object""object""object", 'points'"points""points""points""points""points", 'polygons'"polygons""polygons""polygons""polygons""polygons", 'triangles'"triangles""triangles""triangles""triangles""triangles"

AttribValuesAttribValuesAttribValuesAttribValuesattribValuesattrib_values (input_control)  real(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Attribute values.

结果

如果参数均有效,算子 set_object_model_3d_attrib_modset_object_model_3d_attrib_modSetObjectModel3dAttribModSetObjectModel3dAttribModSetObjectModel3dAttribModset_object_model_3d_attrib_mod 返回值 2 ( H_MSG_TRUE) . 如有必要,将引发异常。

可能的前置算子

gen_empty_object_model_3dgen_empty_object_model_3dGenEmptyObjectModel3dGenEmptyObjectModel3dGenEmptyObjectModel3dgen_empty_object_model_3d

可能的后置算子

get_object_model_3d_paramsget_object_model_3d_paramsGetObjectModel3dParamsGetObjectModel3dParamsGetObjectModel3dParamsget_object_model_3d_params

可替代算子

set_object_model_3d_attribset_object_model_3d_attribSetObjectModel3dAttribSetObjectModel3dAttribSetObjectModel3dAttribset_object_model_3d_attrib

参考其它

copy_object_model_3dcopy_object_model_3dCopyObjectModel3dCopyObjectModel3dCopyObjectModel3dcopy_object_model_3d, remove_object_model_3d_attrib_modremove_object_model_3d_attrib_modRemoveObjectModel3dAttribModRemoveObjectModel3dAttribModRemoveObjectModel3dAttribModremove_object_model_3d_attrib_mod

模块

3D Metrology