modify_component_relationsT_modify_component_relationsModifyComponentRelationsModifyComponentRelationsmodify_component_relations (算子)

名称

modify_component_relationsT_modify_component_relationsModifyComponentRelationsModifyComponentRelationsmodify_component_relations — 修改训练结果中的关系。

签名

modify_component_relations( : : ComponentTrainingID, ReferenceComponent, ToleranceComponent, PositionTolerance, AngleTolerance : )

Herror T_modify_component_relations(const Htuple ComponentTrainingID, const Htuple ReferenceComponent, const Htuple ToleranceComponent, const Htuple PositionTolerance, const Htuple AngleTolerance)

void ModifyComponentRelations(const HTuple& ComponentTrainingID, const HTuple& ReferenceComponent, const HTuple& ToleranceComponent, const HTuple& PositionTolerance, const HTuple& AngleTolerance)

void HComponentTraining::ModifyComponentRelations(const HTuple& ReferenceComponent, const HTuple& ToleranceComponent, const HTuple& PositionTolerance, const HTuple& AngleTolerance) const

void HComponentTraining::ModifyComponentRelations(const HString& ReferenceComponent, const HString& ToleranceComponent, double PositionTolerance, double AngleTolerance) const

void HComponentTraining::ModifyComponentRelations(const char* ReferenceComponent, const char* ToleranceComponent, double PositionTolerance, double AngleTolerance) const

void HComponentTraining::ModifyComponentRelations(const wchar_t* ReferenceComponent, const wchar_t* ToleranceComponent, double PositionTolerance, double AngleTolerance) const   ( Windows only)

static void HOperatorSet.ModifyComponentRelations(HTuple componentTrainingID, HTuple referenceComponent, HTuple toleranceComponent, HTuple positionTolerance, HTuple angleTolerance)

void HComponentTraining.ModifyComponentRelations(HTuple referenceComponent, HTuple toleranceComponent, HTuple positionTolerance, HTuple angleTolerance)

void HComponentTraining.ModifyComponentRelations(string referenceComponent, string toleranceComponent, double positionTolerance, double angleTolerance)

def modify_component_relations(component_training_id: HHandle, reference_component: MaybeSequence[Union[int, str]], tolerance_component: MaybeSequence[Union[int, str]], position_tolerance: MaybeSequence[float], angle_tolerance: MaybeSequence[float]) -> None

描述

modify_component_relationsmodify_component_relationsModifyComponentRelationsModifyComponentRelationsModifyComponentRelationsmodify_component_relations modifies the relations between the model components within the component training result ComponentTrainingIDComponentTrainingIDComponentTrainingIDComponentTrainingIDcomponentTrainingIDcomponent_training_id. The selection of the relation(s) that should be changed is performed by setting ReferenceComponentReferenceComponentReferenceComponentReferenceComponentreferenceComponentreference_component and ToleranceComponentToleranceComponentToleranceComponentToleranceComponenttoleranceComponenttolerance_component, respectively. This means that the relative movement of component ToleranceComponentToleranceComponentToleranceComponentToleranceComponenttoleranceComponenttolerance_component with respect to the component ReferenceComponentReferenceComponentReferenceComponentReferenceComponentreferenceComponentreference_component is modified.

The size of the change is specified as follows: By specifying a position tolerance PositionTolerancePositionTolerancePositionTolerancePositionTolerancepositionToleranceposition_tolerance, the semi-axes of the rectangle that describes the reference point's movement (see train_model_componentstrain_model_componentsTrainModelComponentsTrainModelComponentsTrainModelComponentstrain_model_components) are enlarged by PositionTolerancePositionTolerancePositionTolerancePositionTolerancepositionToleranceposition_tolerance pixels. Accordingly, by specifying an orientation tolerance AngleToleranceAngleToleranceAngleToleranceAngleToleranceangleToleranceangle_tolerance, the angle range that describes the variation of the relative orientation (see train_model_componentstrain_model_componentsTrainModelComponentsTrainModelComponentsTrainModelComponentstrain_model_components) is enlarged by AngleToleranceAngleToleranceAngleToleranceAngleToleranceangleToleranceangle_tolerance to both sides. Consequently, negative tolerance values lead to a decreased size of the relations. The operator modify_component_relationsmodify_component_relationsModifyComponentRelationsModifyComponentRelationsModifyComponentRelationsmodify_component_relations is particularly useful when the training images that were used during the training do not cover the entire spectrum of the relative movements.

In order to select the relations that should be modified, values for ReferenceComponentReferenceComponentReferenceComponentReferenceComponentreferenceComponentreference_component and ToleranceComponentToleranceComponentToleranceComponentToleranceComponenttoleranceComponenttolerance_component can be passed in one of the following ways: For each of both parameters either one value, several values, or the string 'all'"all""all""all""all""all" can be passed. The following table summarizes the different possibilities by giving the affected relations for different combinations of parameter values. Here, four model components are assumed (0, 1, 2, and 3). If, for example, ReferenceComponentReferenceComponentReferenceComponentReferenceComponentreferenceComponentreference_component is set to 0 and ToleranceComponentToleranceComponentToleranceComponentToleranceComponenttoleranceComponenttolerance_component is set to 1, then the relation (0,1), which corresponds to the relative movement of component 1 with respect to component 0, will be modified.

ReferenceComponentReferenceComponentReferenceComponentReferenceComponentreferenceComponentreference_component ToleranceComponentToleranceComponentToleranceComponentToleranceComponenttoleranceComponenttolerance_component Affected Relation(s)
'all' 'all' (0,1) (0,2) (0,3)
(1,0) (1,2) (1,3)
(2,0) (2,1) (2,3)
(3,0) (3,1) (3,2)
'all' [1,2] (0,1) (0,2)
(1,2)
(2,1)
(3,1) (3,2)
[0,1] 'all' (0,1) (0,2) (0,3)
(1,0) (1,2) (1,3)
0 1 (0,1)
0 [1,2] (0,1) (0,2)
[0,1] 2 (0,2) (1,2)
[0,1,2] [1,2,3] (0,1) (1,2) (2,3)

The number of tolerance values passed in PositionTolerancePositionTolerancePositionTolerancePositionTolerancepositionToleranceposition_tolerance and AngleToleranceAngleToleranceAngleToleranceAngleToleranceangleToleranceangle_tolerance must be either 1 or be equal to the number of affected relations. In the former case all affected relations are modified by the same value, whereas in the latter case each relation can be modified individually by passing different values within a tuple.

执行信息

此算子修改后续输入参数的状态:

在执行此算子时,若该参数值需在多个线程间使用,则必须对其访问进行同步。

参数

ComponentTrainingIDComponentTrainingIDComponentTrainingIDComponentTrainingIDcomponentTrainingIDcomponent_training_id (输入控制,状态被修改)  component_training HComponentTraining, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the training result.

ReferenceComponentReferenceComponentReferenceComponentReferenceComponentreferenceComponentreference_component (输入控制)  string(-array) HTupleMaybeSequence[Union[int, str]]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

Model component(s) relative to which the movement(s) should be modified.

默认值: 'all' "all" "all" "all" "all" "all"

建议值: 'all'"all""all""all""all""all", 0, 1, 2, 3, 4, 5, 6

ToleranceComponentToleranceComponentToleranceComponentToleranceComponenttoleranceComponenttolerance_component (输入控制)  string(-array) HTupleMaybeSequence[Union[int, str]]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

Model component(s) of which the relative movement(s) should be modified.

默认值: 'all' "all" "all" "all" "all" "all"

建议值: 'all'"all""all""all""all""all", 0, 1, 2, 3, 4, 5, 6

PositionTolerancePositionTolerancePositionTolerancePositionTolerancepositionToleranceposition_tolerance (输入控制)  real(-array) HTupleMaybeSequence[float]HTupleHtuple (real) (double) (double) (double)

Change of the position relation in pixels.

建议值: 1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 20.0, 30.0

AngleToleranceAngleToleranceAngleToleranceAngleToleranceangleToleranceangle_tolerance (输入控制)  angle.rad(-array) HTupleMaybeSequence[float]HTupleHtuple (real) (double) (double) (double)

Change of the orientation relation in radians.

建议值: 0.017, 0.035, 0.052, 0.070, 0.087, 0.175, 0.349

结果

If the handle of the training result is valid, the operator modify_component_relationsmodify_component_relationsModifyComponentRelationsModifyComponentRelationsModifyComponentRelationsmodify_component_relations 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的前趋

train_model_componentstrain_model_componentsTrainModelComponentsTrainModelComponentsTrainModelComponentstrain_model_components

可能的后继

create_trained_component_modelcreate_trained_component_modelCreateTrainedComponentModelCreateTrainedComponentModelCreateTrainedComponentModelcreate_trained_component_model

模块

匹配