Name
simplify_object_model_3dT_simplify_object_model_3dSimplifyObjectModel3dsimplify_object_model_3dSimplifyObjectModel3dSimplifyObjectModel3d — Simplify a triangulated 3D object model.
Herror simplify_object_model_3d(const HTuple& ObjectModel3D, const HTuple& Method, const HTuple& Amount, const HTuple& GenParamName, const HTuple& GenParamValue, Hlong* SimplifiedObjectModel3D)
Herror simplify_object_model_3d(const HTuple& ObjectModel3D, const HTuple& Method, const HTuple& Amount, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* SimplifiedObjectModel3D)
HTuple HObjectModel3D::SimplifyObjectModel3d(const HTuple& Method, const HTuple& Amount, const HTuple& GenParamName, const HTuple& GenParamValue) const
void SimplifyObjectModel3d(const HTuple& ObjectModel3D, const HTuple& Method, const HTuple& Amount, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* SimplifiedObjectModel3D)
static HObjectModel3DArray HObjectModel3D::SimplifyObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HString& Method, const HTuple& Amount, const HTuple& GenParamName, const HTuple& GenParamValue)
HObjectModel3D HObjectModel3D::SimplifyObjectModel3d(const HString& Method, double Amount, const HTuple& GenParamName, const HTuple& GenParamValue) const
HObjectModel3D HObjectModel3D::SimplifyObjectModel3d(const char* Method, double Amount, const HTuple& GenParamName, const HTuple& GenParamValue) const
static void HOperatorSet.SimplifyObjectModel3d(HTuple objectModel3D, HTuple method, HTuple amount, HTuple genParamName, HTuple genParamValue, out HTuple simplifiedObjectModel3D)
static HObjectModel3D[] HObjectModel3D.SimplifyObjectModel3d(HObjectModel3D[] objectModel3D, string method, HTuple amount, HTuple genParamName, HTuple genParamValue)
HObjectModel3D HObjectModel3D.SimplifyObjectModel3d(string method, double amount, HTuple genParamName, HTuple genParamValue)
simplify_object_model_3dsimplify_object_model_3dSimplifyObjectModel3dsimplify_object_model_3dSimplifyObjectModel3dSimplifyObjectModel3d simplifies the triangulated 3D object model
ObjectModel3DObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D by removing model points and
returns the result in SimplifiedObjectModel3DSimplifiedObjectModel3DSimplifiedObjectModel3DSimplifiedObjectModel3DSimplifiedObjectModel3DsimplifiedObjectModel3D. Note that in
contrast to sample_object_model_3dsample_object_model_3dSampleObjectModel3dsample_object_model_3dSampleObjectModel3dSampleObjectModel3d points are removed
such that the original geometry of the object model is represented as good
as possible. Typically, this means that edges are preserved while the
point density within smooth parts is reduced.
This might be helpful, for example, to speed up subsequent operator calls
by using a 3D object model of reduced complexity.
The triangulation of the input 3D object model is preserved as opposed to
the operator sample_object_model_3dsample_object_model_3dSampleObjectModel3dsample_object_model_3dSampleObjectModel3dSampleObjectModel3d, which samples surfaces to
equidistant unconnected 3D points.
Currently, the operator offers only a single simplification method
('preserve_point_coordintates'"preserve_point_coordintates""preserve_point_coordintates""preserve_point_coordintates""preserve_point_coordintates""preserve_point_coordintates"), which can be set in
MethodMethodMethodMethodMethodmethod. This method ensures that the points in the
simplified object model SimplifiedObjectModel3DSimplifiedObjectModel3DSimplifiedObjectModel3DSimplifiedObjectModel3DSimplifiedObjectModel3DsimplifiedObjectModel3D have the same
coordinates as the respective points in the input object model
ObjectModel3DObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D.
simplify_object_model_3dsimplify_object_model_3dSimplifyObjectModel3dsimplify_object_model_3dSimplifyObjectModel3dSimplifyObjectModel3d only works for triangulated object models.
Whether an object model contains a triangulation can be queried with
get_object_model_3d_paramsget_object_model_3d_paramsGetObjectModel3dParamsget_object_model_3d_paramsGetObjectModel3dParamsGetObjectModel3dParams
(GenParamNameGenParamNameGenParamNameGenParamNameGenParamNamegenParamName='has_triangles''has_triangles''has_triangles''has_triangles''has_triangles''hasTriangles'). Object models that
do not contain a triangulation must be triangulated beforehand, e.g., by
using triangulate_object_model_3dtriangulate_object_model_3dTriangulateObjectModel3dtriangulate_object_model_3dTriangulateObjectModel3dTriangulateObjectModel3d or prepare_object_model_3dprepare_object_model_3dPrepareObjectModel3dprepare_object_model_3dPrepareObjectModel3dPrepareObjectModel3d
(PurposePurposePurposePurposePurposepurpose='segmentation''segmentation''segmentation''segmentation''segmentation''segmentation').
The degree of simplification can be set with AmountAmountAmountAmountAmountamount. By default,
AmountAmountAmountAmountAmountamount specifies the percentage of points of the input object
model that should be contained in the output object model. Thus, the
smaller the value of AmountAmountAmountAmountAmountamount in this case is chosen the
stronger the object model will be simplified.
Alternatively, the meaning of the parameter AmountAmountAmountAmountAmountamount can be
modified. For this, the generic parameter 'amount_type'"amount_type""amount_type""amount_type""amount_type""amount_type" can
be set to one of the following values:
'percentage_remaining' AmountAmountAmountAmountAmountamount specifies the percentage of points
(default) of the input object model that should be contained
in the output object model.
Range of values: [0.0 ... 100.0]
'percentage_to_remove' AmountAmountAmountAmountAmountamount specifies the percentage of points
of the input object model that should be removed.
Range of values: [0.0 ... 100.0]
'num_points_remaining' AmountAmountAmountAmountAmountamount specifies the number of points
of the input object model that should be contained
in the output object model.
Range of values:
[0 ... number of points in the input object model]
'num_points_to_remove' AmountAmountAmountAmountAmountamount specifies the number of points
of the input object model that should be removed.
Range of values:
[0 ... number of points in the input object model]
Sometimes triangular meshes flip during the simplification, i.e., the
direction of their normal vectors changes by 180 degrees. This
especially happens for artificially created CAD models that consist of
planar parts. To avoid this flipping, the generic
parameter 'avoid_triangle_flips'"avoid_triangle_flips""avoid_triangle_flips""avoid_triangle_flips""avoid_triangle_flips""avoid_triangle_flips" can be set to 'true'"true""true""true""true""true"
(the default is 'false'"false""false""false""false""false"). Note that in this case, the run-time of
simplify_object_model_3dsimplify_object_model_3dSimplifyObjectModel3dsimplify_object_model_3dSimplifyObjectModel3dSimplifyObjectModel3d will increase.
Note that multiple calls of simplify_object_model_3dsimplify_object_model_3dSimplifyObjectModel3dsimplify_object_model_3dSimplifyObjectModel3dSimplifyObjectModel3d with a
lower degree of simplification might result in a different simplified
object model compared to a single call with a higher degree of
simplification. Also note that isolated (i.e., non-triangulated) points
will be removed. This might result in a number of points in
SimplifiedObjectModel3DSimplifiedObjectModel3DSimplifiedObjectModel3DSimplifiedObjectModel3DSimplifiedObjectModel3DsimplifiedObjectModel3D that slightly deviates from the degree of
simplification that is specified in AmountAmountAmountAmountAmountamount.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Handle of the 3D object model that should be
simplified.
Method that should be used for simplification.
Default value:
'preserve_point_coordinates'
"preserve_point_coordinates"
"preserve_point_coordinates"
"preserve_point_coordinates"
"preserve_point_coordinates"
"preserve_point_coordinates"
List of values: 'preserve_point_coordinates'"preserve_point_coordinates""preserve_point_coordinates""preserve_point_coordinates""preserve_point_coordinates""preserve_point_coordinates"
Degree of simplification (default: percentage
of remaining model points).
Names of the generic parameters.
Default value: []
List of values: 'amount_type'"amount_type""amount_type""amount_type""amount_type""amount_type", 'avoid_triangle_flips'"avoid_triangle_flips""avoid_triangle_flips""avoid_triangle_flips""avoid_triangle_flips""avoid_triangle_flips"
Values of the generic parameters.
Default value: []
Suggested values: 'percentage_remaining'"percentage_remaining""percentage_remaining""percentage_remaining""percentage_remaining""percentage_remaining", 'percentage_to_remove'"percentage_to_remove""percentage_to_remove""percentage_to_remove""percentage_to_remove""percentage_to_remove", 'num_points_remaining'"num_points_remaining""num_points_remaining""num_points_remaining""num_points_remaining""num_points_remaining", 'num_points_to_remove'"num_points_to_remove""num_points_to_remove""num_points_to_remove""num_points_to_remove""num_points_to_remove", 'true'"true""true""true""true""true", 'false'"false""false""false""false""false"
Handle of the simplified 3D object model.
read_object_model_3d ('mvtec_bunny.om3', 'm', [], [], ObjectModel3D, Status)
visualize_object_model_3d (WindowHandle, ObjectModel3D, [], [], [], [], \
[], [], [], Pose)
simplify_object_model_3d (ObjectModel3D, 'preserve_point_coordinates', \
5.0, 'amount_type', 'percentage_remaining', \
SimplifiedObjectModel3D)
visualize_object_model_3d (WindowHandle, SimplifiedObjectModel3D, [], \
Pose, [], [], [], [], [], Pose)
simplify_object_model_3dsimplify_object_model_3dSimplifyObjectModel3dsimplify_object_model_3dSimplifyObjectModel3dSimplifyObjectModel3d returns 2 (H_MSG_TRUE) if all parameters are
correct. If necessary, an exception is raised.
prepare_object_model_3dprepare_object_model_3dPrepareObjectModel3dprepare_object_model_3dPrepareObjectModel3dPrepareObjectModel3d,
read_object_model_3dread_object_model_3dReadObjectModel3dread_object_model_3dReadObjectModel3dReadObjectModel3d,
triangulate_object_model_3dtriangulate_object_model_3dTriangulateObjectModel3dtriangulate_object_model_3dTriangulateObjectModel3dTriangulateObjectModel3d,
xyz_to_object_model_3dxyz_to_object_model_3dXyzToObjectModel3dxyz_to_object_model_3dXyzToObjectModel3dXyzToObjectModel3d
disp_object_model_3ddisp_object_model_3dDispObjectModel3ddisp_object_model_3dDispObjectModel3dDispObjectModel3d,
smallest_bounding_box_object_model_3dsmallest_bounding_box_object_model_3dSmallestBoundingBoxObjectModel3dsmallest_bounding_box_object_model_3dSmallestBoundingBoxObjectModel3dSmallestBoundingBoxObjectModel3d
sample_object_model_3dsample_object_model_3dSampleObjectModel3dsample_object_model_3dSampleObjectModel3dSampleObjectModel3d,
smooth_object_model_3dsmooth_object_model_3dSmoothObjectModel3dsmooth_object_model_3dSmoothObjectModel3dSmoothObjectModel3d
Michael Garland, Paul S. Heckbert: Surface Simplification Using Quadric
Error Metrics, Proceedings of the 24th Annual Conference on Computer
Graphics and Interactive Techniques (SIGGRAPH '97), 209-216, ACM Press,
1997
3D Metrology