select_points_object_model_3dT_select_points_object_model_3dSelectPointsObjectModel3dSelectPointsObjectModel3dselect_points_object_model_3d (Operator)

Name

select_points_object_model_3dT_select_points_object_model_3dSelectPointsObjectModel3dSelectPointsObjectModel3dselect_points_object_model_3d — Apply a threshold to an attribute of 3D object models.

Signature

select_points_object_model_3d( : : ObjectModel3D, Attrib, MinValue, MaxValue : ObjectModel3DThresholded)

Herror T_select_points_object_model_3d(const Htuple ObjectModel3D, const Htuple Attrib, const Htuple MinValue, const Htuple MaxValue, Htuple* ObjectModel3DThresholded)

void SelectPointsObjectModel3d(const HTuple& ObjectModel3D, const HTuple& Attrib, const HTuple& MinValue, const HTuple& MaxValue, HTuple* ObjectModel3DThresholded)

static HObjectModel3DArray HObjectModel3D::SelectPointsObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HTuple& Attrib, const HTuple& MinValue, const HTuple& MaxValue)

HObjectModel3D HObjectModel3D::SelectPointsObjectModel3d(const HString& Attrib, double MinValue, double MaxValue) const

HObjectModel3D HObjectModel3D::SelectPointsObjectModel3d(const char* Attrib, double MinValue, double MaxValue) const

HObjectModel3D HObjectModel3D::SelectPointsObjectModel3d(const wchar_t* Attrib, double MinValue, double MaxValue) const   (Windows only)

static void HOperatorSet.SelectPointsObjectModel3d(HTuple objectModel3D, HTuple attrib, HTuple minValue, HTuple maxValue, out HTuple objectModel3DThresholded)

static HObjectModel3D[] HObjectModel3D.SelectPointsObjectModel3d(HObjectModel3D[] objectModel3D, HTuple attrib, HTuple minValue, HTuple maxValue)

HObjectModel3D HObjectModel3D.SelectPointsObjectModel3d(string attrib, double minValue, double maxValue)

def select_points_object_model_3d(object_model_3d: MaybeSequence[HHandle], attrib: MaybeSequence[str], min_value: MaybeSequence[Union[int, float]], max_value: MaybeSequence[Union[int, float]]) -> Sequence[HHandle]

def select_points_object_model_3d_s(object_model_3d: MaybeSequence[HHandle], attrib: MaybeSequence[str], min_value: MaybeSequence[Union[int, float]], max_value: MaybeSequence[Union[int, float]]) -> HHandle

Description

select_points_object_model_3dselect_points_object_model_3dSelectPointsObjectModel3dSelectPointsObjectModel3dSelectPointsObjectModel3dselect_points_object_model_3d selects points of the 3D object model ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d according to the attributes and thresholds passed in AttribAttribAttribAttribattribattrib, MinValueMinValueMinValueMinValueminValuemin_value, and MaxValueMaxValueMaxValueMaxValuemaxValuemax_value respectively. The selected points are returned in the 3D object model ObjectModel3DThresholdedObjectModel3DThresholdedObjectModel3DThresholdedObjectModel3DThresholdedobjectModel3DThresholdedobject_model_3dthresholded. All attributes that are connected with the points (e.g., polygons or triangles) are adapted in such a way that there is no reference to the removed points left.

AttribAttribAttribAttribattribattrib can either contain a tuple of numbers that has the same length as ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d has points, or a list of attribute names on which the thresholds are applied.

If AttribAttribAttribAttribattribattrib contains a tuple of numbers, exactly one number must be passed in both MinValueMinValueMinValueMinValueminValuemin_value and MaxValueMaxValueMaxValueMaxValuemaxValuemax_value. All points for which the corresponding entry in AttribAttribAttribAttribattribattrib is between the two thresholds are added to the output 3D object model ObjectModel3DThresholdedObjectModel3DThresholdedObjectModel3DThresholdedObjectModel3DThresholdedobjectModel3DThresholdedobject_model_3dthresholded.

Otherwise, AttribAttribAttribAttribattribattrib can contain a list of attribute names that refer to properties of the 3D object model ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d. All points, for which the value stored in the attribute AttribAttribAttribAttribattribattrib is inside the interval specified in MinValueMinValueMinValueMinValueminValuemin_value and MaxValueMaxValueMaxValueMaxValuemaxValuemax_value are stored in the output 3D object model. MinValueMinValueMinValueMinValueminValuemin_value and MaxValueMaxValueMaxValueMaxValuemaxValuemax_value must contain exactly as many values as AttribAttribAttribAttribattribattrib. If AttribAttribAttribAttribattribattrib contains multiple values, only those points are stored in the output 3D object model that fulfill all the criteria.

Depending on the properties of ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d, the following values are possible for AttribAttribAttribAttribattribattrib:

The following attributes are available:

'point_coord_x'"point_coord_x""point_coord_x""point_coord_x""point_coord_x""point_coord_x":

The x-coordinates of the set of 3D points.

'point_coord_y'"point_coord_y""point_coord_y""point_coord_y""point_coord_y""point_coord_y":

The y-coordinates of the set of 3D points.

'point_coord_z'"point_coord_z""point_coord_z""point_coord_z""point_coord_z""point_coord_z":

The z-coordinates of the set of 3D points.

'point_normal_x'"point_normal_x""point_normal_x""point_normal_x""point_normal_x""point_normal_x":

The x-components of the 3D point normals of the set of 3D points.

'point_normal_y'"point_normal_y""point_normal_y""point_normal_y""point_normal_y""point_normal_y":

The y-components of the 3D point normals of the set of 3D points.

'point_normal_z'"point_normal_z""point_normal_z""point_normal_z""point_normal_z""point_normal_z":

The z-components of the 3D point normals of the set of 3D points.

'mapping_row'"mapping_row""mapping_row""mapping_row""mapping_row""mapping_row":

The row-components of the 2D mapping of the set of 3D points.

'mapping_col'"mapping_col""mapping_col""mapping_col""mapping_col""mapping_col":

The column-components of the 2D mapping of the set of 3D points.

'neighbor_distance'"neighbor_distance""neighbor_distance""neighbor_distance""neighbor_distance""neighbor_distance":
'neighbor_distance N'"neighbor_distance N""neighbor_distance N""neighbor_distance N""neighbor_distance N""neighbor_distance N":

The distance of the N-th nearest point. N must be a positive integer and is by default 25. For every point, all other points are sorted according to their distance and the distance of the N-th point is used.

'num_neighbors X'"num_neighbors X""num_neighbors X""num_neighbors X""num_neighbors X""num_neighbors X":

The number of neighbors within a distance of at most X. It can be used to remove sparsely populated parts of the 3D object model, such as outliers or points that are created by smoothing between 3D surfaces.

'num_neighbors_fast X'"num_neighbors_fast X""num_neighbors_fast X""num_neighbors_fast X""num_neighbors_fast X""num_neighbors_fast X":

The approximate number of neighbors within a distance of at most X. The distances are approximated using voxels, leading to a faster processing compared to 'num_neighbors'"num_neighbors""num_neighbors""num_neighbors""num_neighbors""num_neighbors".

Extended attribute:

Enter the name of an extended attribute of the type 'vertices'"vertices""vertices""vertices""vertices""vertices" and the selection will be applied based on the values of the extended attribute.

Execution Information

Parameters

ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d (input_control)  object_model_3d(-array) HObjectModel3D, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the 3D object models.

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

Attributes the threshold is applied to.

Default value: 'point_coord_z' "point_coord_z" "point_coord_z" "point_coord_z" "point_coord_z" "point_coord_z"

List of values: 'mapping_col'"mapping_col""mapping_col""mapping_col""mapping_col""mapping_col", 'mapping_row'"mapping_row""mapping_row""mapping_row""mapping_row""mapping_row", 'neighbor_distance'"neighbor_distance""neighbor_distance""neighbor_distance""neighbor_distance""neighbor_distance", 'num_neighbors'"num_neighbors""num_neighbors""num_neighbors""num_neighbors""num_neighbors", 'num_neighbors_fast'"num_neighbors_fast""num_neighbors_fast""num_neighbors_fast""num_neighbors_fast""num_neighbors_fast", '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"

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

Minimum value for the attributes specified by AttribAttribAttribAttribattribattrib.

Default value: 0.5

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

Maximum value for the attributes specified by AttribAttribAttribAttribattribattrib.

Default value: 1.0

ObjectModel3DThresholdedObjectModel3DThresholdedObjectModel3DThresholdedObjectModel3DThresholdedobjectModel3DThresholdedobject_model_3dthresholded (output_control)  object_model_3d(-array) HObjectModel3D, HTupleSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the reduced 3D object models.

Example (HDevelop)

gen_object_model_3d_from_points (rand(100), rand(100),\
                                    rand(100), ObjectModel3D)
select_points_object_model_3d (ObjectModel3D, 'point_coord_z',\
                               0.5, 1, ObjectModel3DThresholded)
get_object_model_3d_params (ObjectModel3DThresholded, 'num_points',\
                            NumPoints)

Result

select_points_object_model_3dselect_points_object_model_3dSelectPointsObjectModel3dSelectPointsObjectModel3dSelectPointsObjectModel3dselect_points_object_model_3d returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised. If the required points are missing in the object model, i.e., an empty object model is passed, the error 9515 is raised.

Possible Predecessors

read_object_model_3dread_object_model_3dReadObjectModel3dReadObjectModel3dReadObjectModel3dread_object_model_3d, xyz_to_object_model_3dxyz_to_object_model_3dXyzToObjectModel3dXyzToObjectModel3dXyzToObjectModel3dxyz_to_object_model_3d

Possible Successors

connection_object_model_3dconnection_object_model_3dConnectionObjectModel3dConnectionObjectModel3dConnectionObjectModel3dconnection_object_model_3d, project_object_model_3dproject_object_model_3dProjectObjectModel3dProjectObjectModel3dProjectObjectModel3dproject_object_model_3d, object_model_3d_to_xyzobject_model_3d_to_xyzObjectModel3dToXyzObjectModel3dToXyzObjectModel3dToXyzobject_model_3d_to_xyz

See also

connection_object_model_3dconnection_object_model_3dConnectionObjectModel3dConnectionObjectModel3dConnectionObjectModel3dconnection_object_model_3d, reduce_object_model_3d_by_viewreduce_object_model_3d_by_viewReduceObjectModel3dByViewReduceObjectModel3dByViewReduceObjectModel3dByViewreduce_object_model_3d_by_view

Module

3D Metrology