Skip to content

surface_normals_object_model_3dSurfaceNormalsObjectModel3dSurfaceNormalsObjectModel3dsurface_normals_object_model_3dT_surface_normals_object_model_3dšŸ”—

Short descriptionšŸ”—

surface_normals_object_model_3dSurfaceNormalsObjectModel3dSurfaceNormalsObjectModel3dsurface_normals_object_model_3dT_surface_normals_object_model_3d — Calculate the 3D surface normals of a 3D object model.

SignaturešŸ”—

surface_normals_object_model_3d( object_model_3d ObjectModel3D, string Method, attribute.name GenParamName, attribute.value GenParamValue, out object_model_3d ObjectModel3DNormals )void SurfaceNormalsObjectModel3d( const HTuple& ObjectModel3D, const HTuple& Method, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* ObjectModel3DNormals )static void HOperatorSet.SurfaceNormalsObjectModel3d( HTuple objectModel3D, HTuple method, HTuple genParamName, HTuple genParamValue, out HTuple objectModel3DNormals )def surface_normals_object_model_3d( object_model_3d: MaybeSequence[HHandle], method: str, gen_param_name: Sequence[str], gen_param_value: Sequence[Union[float, int, str]] ) -> Sequence[HHandle]

def surface_normals_object_model_3d_s( object_model_3d: MaybeSequence[HHandle], method: str, gen_param_name: Sequence[str], gen_param_value: Sequence[Union[float, int, str]] ) -> HHandleHerror T_surface_normals_object_model_3d( const Htuple ObjectModel3D, const Htuple Method, const Htuple GenParamName, const Htuple GenParamValue, Htuple* ObjectModel3DNormals )

static HObjectModel3DArray HObjectModel3D::SurfaceNormalsObjectModel3d( const HObjectModel3DArray& ObjectModel3D, const HString& Method, const HTuple& GenParamName, const HTuple& GenParamValue )

HObjectModel3D HObjectModel3D::SurfaceNormalsObjectModel3d( const HString& Method, const HTuple& GenParamName, const HTuple& GenParamValue ) const

HObjectModel3D HObjectModel3D::SurfaceNormalsObjectModel3d( const char* Method, const HTuple& GenParamName, const HTuple& GenParamValue ) const

HObjectModel3D HObjectModel3D::SurfaceNormalsObjectModel3d( const wchar_t* Method, const HTuple& GenParamName, const HTuple& GenParamValue ) const (Windows only)

static HObjectModel3D[] HObjectModel3D.SurfaceNormalsObjectModel3d( HObjectModel3D[] objectModel3D, string method, HTuple genParamName, HTuple genParamValue )

HObjectModel3D HObjectModel3D.SurfaceNormalsObjectModel3d( string method, HTuple genParamName, HTuple genParamValue )

DescriptionšŸ”—

The operator surface_normals_object_model_3dSurfaceNormalsObjectModel3d calculates the 3D surface normals for the object ObjectModel3DobjectModel3Dobject_model_3d using the method specified by Methodmethodmethod. The calculated normals are appended to the input object and the resulting object is returned in ObjectModel3DNormalsobjectModel3DNormalsobject_model_3dnormals.

For Methodmethodmethod 'mls'"mls", the normals estimation method Moving Least Squares (MLS) is applied. The MLS method for normals estimation is essentially identical with the MLS method used by smooth_object_model_3dSmoothObjectModel3d with the exception that in surface_normals_object_model_3dSurfaceNormalsObjectModel3d the 3D points are not smoothed, i.e., the original 3D points of ObjectModel3DobjectModel3Dobject_model_3d remain unchanged. For more details on the MLS as well as a full list and descriptions of the supported MLS parameters refer to smooth_object_model_3dSmoothObjectModel3d.

If the object ObjectModel3DobjectModel3Dobject_model_3d contains triangles, the Methodmethodmethod 'triangles'"triangles" can be used to obtain point normals from the normals of the triangles neighboring a point. The normals of the neighboring triangles are weighted according to the angle which the triangle encloses at the point. The triangle normals are returned in the extended attributes ā€˜&triangle_normal_x’, ā€˜&triangle_normal_y’ and ā€˜&triangle_normal_z’. If the extended attributes already exist, they will not be overwritten.

If the object ObjectModel3DobjectModel3Dobject_model_3d contains a 2D mapping (for example a 3D object model that was created with xyz_to_object_model_3dXyzToObjectModel3d), the Methodmethodmethod 'xyz_mapping'"xyz_mapping" can be used to obtain point normals from the neighborhood of the points in the 2D mapping. In an 11x11 neighborhood of the points in the 2D mapping, a plane is fit through the corresponding 3D points. The normal of this plane then gets switched in a direction consistent with the 2D mapping, for example along the viewing direction of the sensor or in the opposite direction.

Note that for points where the normal vector cannot be estimated, it is set to the zero vector. This happens, for example, if the 3D object model contains an identical point more than 'mls_kNN'"mls_kNN" times.

Execution informationšŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on internal data level.

This operator supports canceling timeouts and interrupts.

ParametersšŸ”—

ObjectModel3DobjectModel3Dobject_model_3d (input_control) object_model_3d(-array) → (handle)HTuple (HHandle)HObjectModel3D, HTuple (IntPtr)MaybeSequence[HHandle]Htuple (handle)

Handle of the 3D object model containing 3D point data.

Methodmethodmethod (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Normals calculation method.

Default: 'mls'"mls"
List of values: 'mls', 'triangles', 'xyz_mapping'"mls", "triangles", "xyz_mapping"

GenParamNamegenParamNamegen_param_name (input_control) attribute.name-array → (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

Names of generic smoothing parameters.

Default: [][]
List of values: 'mls_abs_sigma', 'mls_force_inwards', 'mls_kNN', 'mls_order', 'mls_relative_sigma'"mls_abs_sigma", "mls_force_inwards", "mls_kNN", "mls_order", "mls_relative_sigma"

GenParamValuegenParamValuegen_param_value (input_control) attribute.value-array → (real / integer / string)HTuple (double / Hlong / HString)HTuple (double / int / long / string)Sequence[Union[float, int, str]]Htuple (double / Hlong / char*)

Values of generic smoothing parameters.

Default: [][]
Suggested values: 10, 20, 40, 60, 0.1, 0.5, 1.0, 2.0, 0, 1, 2, 'true', 'false'10, 20, 40, 60, 0.1, 0.5, 1.0, 2.0, 0, 1, 2, "true", "false"

ObjectModel3DNormalsobjectModel3DNormalsobject_model_3dnormals (output_control) object_model_3d(-array) → (handle)HTuple (HHandle)HObjectModel3D, HTuple (IntPtr)Sequence[HHandle]Htuple (handle)

Handle of the 3D object model with calculated 3D normals.

Combinations with other operatorsšŸ”—

Combinations

Possible predecessors

sample_object_model_3dSampleObjectModel3d

Possible successors

create_surface_modelCreateSurfaceModel, fuse_object_model_3dFuseObjectModel3d

Alternatives

smooth_object_model_3dSmoothObjectModel3d

ModulešŸ”—

3D Metrology