CLDKnowledgeFunctions Functions

This page discusses:

CreateCldCurveFromScan

Creates a curve fitted to scan data.

Signature

CreateCldCurveFromScan (Support : CLDGeom): CLDCurveFromScan

Arguments

Name Input or Output Required Type Comment
Support In CLDGeom -

ReturnType

CLDCurveFromScan

Curve from Scan feature

Example

let Scan(CLDGeom)
let result(CLDCurveFromScan)
set result = CreateCldCurveFromScan(Scan)

CreateCldPlanarScan

Creates a planar scan from a CLDGeom support and a plane.

Signature

CreateCldPlanarScan (Support : CLDGeom, Cutting Plane: Plane): CLDPlanarScan

Arguments

Name Input or Output Required Type Comment
Support In CLDGeom -
Cutting Plane In Plane -

ReturnType

CLDPlanarScan

Planar scan feature

Example

let Support(CLDGeom)
let Plane(Plane)
let result(CLDPlanarScan)
set result = CreateCldPlanarScan(Support, Plane)

CreateCldRoughOffset

Creates a rough offset feature from a list of CLDGeom objects.

Signature

CreateCldRoughOffset(Objects : List) : CLDRoughOffset

Arguments

Name Input/Output Required? Type Comment
Objects In List List of CLDGeom objects to offset.

ReturnType

CLDRoughOffset

Created CLDRoughOffset feature. The supplied creation wrappers do not define a universal failure sentinel.

Example

let Objects(List)
let result(CLDRoughOffset)
set result = CreateCldRoughOffset(Objects)

CreateCldDistAnalysis

Creates a deviation analysis between reference data and data to measure.

Signature

CreateCldDistAnalysis(Reference : List, ToMeasure : List) : CLDDistAnalysis

Arguments

Name Input/Output Required? Type Comment
Reference In List List of reference objects. Accepted element classes require the missing deviation-analysis implementation.
ToMeasure In List List of objects to measure. Accepted element classes require the missing deviation-analysis implementation.

ReturnType

CLDDistAnalysis

Created CLDDistAnalysis feature. The supplied creation wrappers do not define a universal failure sentinel.

Example

let Reference(List)
let ToMeasure(List)
let result(CLDDistAnalysis)
set result = CreateCldDistAnalysis(Reference, ToMeasure)

CreateCldDistAnalysis

Creates a deviation analysis between reference data and data to measure.

Signature

CreateCldDistAnalysis(Reference : List, ToMeasure : List, Accuracy : LENGTH, OnlyOrthogonal : Integer, Exact : Integer, UseDirection : Integer) : CLDDistAnalysis

Arguments

Name Input/Output Required? Type Comment
Reference In List List of reference objects. Accepted element classes require the missing deviation-analysis implementation.
ToMeasure In List List of objects to measure. Accepted element classes require the missing deviation-analysis implementation.
Accuracy In LENGTH Analysis accuracy expressed as a length.
OnlyOrthogonal In Integer Integer flag for orthogonal-only analysis; detailed handling is not supplied.
Exact In Integer Integer flag for exact analysis; detailed handling is not supplied.
UseDirection In Integer Integer flag for directional analysis; configure Direction as needed.

ReturnType

CLDDistAnalysis

Created CLDDistAnalysis feature. The supplied creation wrappers do not define a universal failure sentinel.

Example

let Reference(List)
let ToMeasure(List)
let Accuracy(LENGTH)
let OnlyOrthogonal(Integer)
let Exact(Integer)
let UseDirection(Integer)
let result(CLDDistAnalysis)
set result = CreateCldDistAnalysis(Reference, ToMeasure, Accuracy, OnlyOrthogonal, Exact, UseDirection)

CreateCldDistAnalysis

Creates a deviation analysis between reference data and data to measure.

Signature

CreateCldDistAnalysis(Reference : List, ToMeasure : List, Accuracy : LENGTH, OnlyOrthogonal : Integer, Exact : Integer, UseDirection : Integer, Direction : Direction) : CLDDistAnalysis

Arguments

Name Input/Output Required? Type Comment
Reference In List List of reference objects. Accepted element classes require the missing deviation-analysis implementation.
ToMeasure In List List of objects to measure. Accepted element classes require the missing deviation-analysis implementation.
Accuracy In LENGTH Analysis accuracy expressed as a length.
OnlyOrthogonal In Integer Integer flag for orthogonal-only analysis; detailed handling is not supplied.
Exact In Integer Integer flag for exact analysis; detailed handling is not supplied.
UseDirection In Integer Integer flag for directional analysis; configure Direction as needed.
Direction In Direction Analysis direction object.

ReturnType

CLDDistAnalysis

Created CLDDistAnalysis feature. The supplied creation wrappers do not define a universal failure sentinel.

Example

let Reference(List)
let ToMeasure(List)
let Accuracy(LENGTH)
let OnlyOrthogonal(Integer)
let Exact(Integer)
let UseDirection(Integer)
let Direction(Direction)
let result(CLDDistAnalysis)
set result = CreateCldDistAnalysis(Reference, ToMeasure, Accuracy, OnlyOrthogonal, Exact, UseDirection, Direction)

CldPolygonize3D

Creates a 3D mesh from a point cloud using the Polygonize 3D mesher in AUTO mode.

Signature

CldPolygonize3D(Cloud : CLDGeom, Neighborhood : LENGTH) : CLDGeom

Arguments

Name Input/Output Required? Type Comment
Cloud In CLDGeom Input point cloud exposed as CLDGeom.
Neighborhood In LENGTH Meshing neighborhood distance. NLS guidance: 3 * CldGetCharactDistance(Cloud).

ReturnType

CLDGeom

The meshed CLDGeom datum.

Example

let Cloud(CLDGeom)
let result(CLDGeom)
set result = CldPolygonize3D(Cloud, 1mm)

CldCheckMesh

Analyzes a mesh and returns the total number of detected defects without modifying the mesh.

Signature

CldCheckMesh(Mesh : CLDGeom) : Integer

Arguments

Name Input/Output Required? Type Comment
Mesh In CLDGeom Input mesh exposed as CLDGeom.

ReturnType

Integer

Integer: total issue count (0 = clean mesh).

Example

let Mesh(CLDGeom)
let result(Integer)
result = CldCheckMesh(Mesh)

CldRepairMesh

Creates a repaired mesh datum using per-mesh settings or flags supplied in the call.

Signature

CldRepairMesh(Mesh : CLDGeom) : CLDGeom

Arguments

Name Input/Output Required? Type Comment
Mesh In CLDGeom Input mesh exposed as CLDGeom.

ReturnType

CLDGeom

Repaired CLDGeom datum.

Example

let Mesh(CLDGeom)
let result(CLDGeom)
set result = CldRepairMesh(Mesh)

CldRepairMesh

Creates a repaired mesh datum using per-mesh settings or flags supplied in the call.

Signature

CldRepairMesh(Mesh : CLDGeom, FillSmallHoles : Integer, FixNonManifold : Integer, ReorientFaces : Integer) : CLDGeom

Arguments

Name Input/Output Required? Type Comment
Mesh In CLDGeom Input mesh exposed as CLDGeom.
FillSmallHoles In Integer 1 enables small-hole filling; 0 disables it. NLS default: 0.
FixNonManifold In Integer 1 enables non-manifold repair; 0 disables it. NLS default: 1.
ReorientFaces In Integer 1 enables face reorientation; 0 disables it. NLS default: 1.

ReturnType

CLDGeom

Repaired CLDGeom datum.

Example

let Mesh(CLDGeom)
let result(CLDGeom)
set result = CldRepairMesh(Mesh, 0, 1, 1)

CldGetMeanEdgeLength

Returns the mean edge length of a mesh CLDGeom, aggregated over all polygon cells.

Signature

CldGetMeanEdgeLength(Mesh : CLDGeom) : LENGTH

Arguments

Name Input/Output Required? Type Comment
Mesh In CLDGeom Input mesh exposed as CLDGeom.

ReturnType

LENGTH

Length: mean edge size. Returns -1mm if the input is not a mesh.

Example

let Mesh(CLDGeom)
let result(LENGTH)
result = CldGetMeanEdgeLength(Mesh)

CldEstimateHoleSize

Estimates a hole size from free mesh boundaries, aligned with the Mesh Envelope Auto button. Returns 1mm when no free edge is found.

Signature

CldEstimateHoleSize(Mesh : CLDGeom) : LENGTH

Arguments

Name Input/Output Required? Type Comment
Mesh In CLDGeom Input mesh exposed as CLDGeom.

ReturnType

LENGTH

Length: estimated hole size. Returns -1mm if the input is not a mesh.

Example

let Mesh(CLDGeom)
let result(LENGTH)
result = CldEstimateHoleSize(Mesh)

CldGetCharactDistance

Returns the characteristic distance of active cloud points, aligned with the interactive Polygonize 3D command. Use 3 * CldGetCharactDistance(cloud) as default neighborhood.

Signature

CldGetCharactDistance(Cloud : CLDGeom) : LENGTH

Arguments

Name Input/Output Required? Type Comment
Cloud In CLDGeom Input point cloud exposed as CLDGeom.

ReturnType

LENGTH

Length: characteristic distance. Returns -1mm if the input is invalid.

Example

let Cloud(CLDGeom)
let result(LENGTH)
result = CldGetCharactDistance(Cloud)

CldGetNbPoints

Returns the number of points in a CLDGeom body.

Signature

CldGetNbPoints(Geom : CLDGeom) : Integer

Arguments

Name Input/Output Required? Type Comment
Geom In CLDGeom Input cloud or mesh exposed as CLDGeom.

ReturnType

Integer

Integer: point count. Returns -1 if the input is invalid.

Example

let Geom(CLDGeom)
let result(Integer)
result = CldGetNbPoints(Geom)

CldGetNbTriangles

Returns the total number of triangles in all polygon cells of a CLDGeom.

Signature

CldGetNbTriangles(Geom : CLDGeom) : Integer

Arguments

Name Input/Output Required? Type Comment
Geom In CLDGeom Input cloud or mesh exposed as CLDGeom.

ReturnType

Integer

Integer: triangle count (0 for a cloud without mesh).

Example

let Geom(CLDGeom)
let result(Integer)
result = CldGetNbTriangles(Geom)

CldHasMesh

Checks whether a CLDGeom contains at least one polygon cell.

Signature

CldHasMesh(Geom : CLDGeom) : Integer

Arguments

Name Input/Output Required? Type Comment
Geom In CLDGeom Input cloud or mesh exposed as CLDGeom.

ReturnType

Integer

Integer: 1 if a mesh is present, 0 otherwise. Returns -1 if the input is invalid.

Example

let Geom(CLDGeom)
let result(Integer)
result = CldHasMesh(Geom)

CldGetBoundingBoxDiagonal

Returns the diagonal length of the active bounding box of a CLDGeom.

Signature

CldGetBoundingBoxDiagonal(Geom : CLDGeom) : LENGTH

Arguments

Name Input/Output Required? Type Comment
Geom In CLDGeom Input cloud or mesh exposed as CLDGeom.

ReturnType

LENGTH

Length: bounding box diagonal. Returns -1mm if the input is invalid.

Example

let Geom(CLDGeom)
let result(LENGTH)
result = CldGetBoundingBoxDiagonal(Geom)

CldGetNbFreeBoundaries

Returns the total number of free boundary scans in all polygon cells of a mesh CLDGeom.

Signature

CldGetNbFreeBoundaries(Mesh : CLDGeom) : Integer

Arguments

Name Input/Output Required? Type Comment
Mesh In CLDGeom Input mesh exposed as CLDGeom.

ReturnType

Integer

Integer: free boundary count (0 for a closed mesh).

Usage notes

Behavior described from registration and supplied NLS; the corresponding operator implementation is not included.

Example

let Mesh(CLDGeom)
let result(Integer)
result = CldGetNbFreeBoundaries(Mesh)

CldGetToleranceScale

Returns the tolerance scale of the part context for a CLDGeom, aligned with CATCldToleranceInitValue:Scale. Use 0.5 * CldGetToleranceScale(geom) as default AutoSurf tolerance (RestoreSettings UI default).

Signature

CldGetToleranceScale(Geom : CLDGeom) : LENGTH

Arguments

Name Input/Output Required? Type Comment
Geom In CLDGeom Input cloud or mesh exposed as CLDGeom.

ReturnType

LENGTH

Length: tolerance scale. Returns -1mm if the input is invalid.

Example

let Geom(CLDGeom)
let result(LENGTH)
result = CldGetToleranceScale(Geom)

CreateCldTessellate

Creates a tessellated representation of a Body using the specified sag.

Signature

CreateCldTessellate(Element : Body, Sag : LENGTH) : CLDTessellate

Arguments

Name Input/Output Required? Type Comment
Element In Body Body to tessellate; the registered input type is Body.
Sag In LENGTH Tessellation sag expressed as a length.

ReturnType

CLDTessellate

Created CLDTessellate feature. The supplied creation wrappers do not define a universal failure sentinel.

Example

let Element(Body)
let result(CLDTessellate)
set result = CreateCldTessellate(Element, 0.1mm)

ExportCldObject

Exports a CLDGeom object to a file using the requested exchange format.

Signature

ExportCldObject(Object : CLDGeom, Format : String, FilePath : String) : Boolean

Arguments

Name Input/Output Required? Type Comment
Object In CLDGeom CLDGeom object to export.
Format In String Exchange format identifier; STL is shown in the supplied NLS example. No complete format list is supplied.
FilePath In String Destination file path including filename and extension.

ReturnType

Boolean

Boolean export result: True when the XCAD export call succeeds, False when that call fails. Earlier validation failures exit without assigning a result.

Example

let Object(CLDGeom)
let result(Boolean)
result = ExportCldObject(Object, "STL", "C:\Temp\mesh.stl")

CreateCldMeshEnvelope

Creates a mesh envelope feature from an input mesh.

Signature

CreateCldMeshEnvelope(InputMesh : CLDGeom) : CLDMeshEnvelope

Arguments

Name Input/Output Required? Type Comment
InputMesh In CLDGeom Mesh used to compute the envelope.

ReturnType

CLDMeshEnvelope

Created CLDMeshEnvelope feature. The supplied creation wrappers do not define a universal failure sentinel.

Example

let InputMesh(CLDGeom)
let result(CLDMeshEnvelope)
set result = CreateCldMeshEnvelope(InputMesh)