Reference for exported types and functions
API docstrings
These types and functions are the exported API by this package.
BlankLocalizationCore.AbstractHoleGeometry
— TypeSupertype of hole like localization geometries.
BlankLocalizationCore.AbstractPlaneGeometry
— TypeSupertype of plane like geometries.
BlankLocalizationCore.FeatureDescriptor
— TypeStore description of a feature: its name, the corresponding part zero, if it has or has not a machined and a rough state.
BlankLocalizationCore.GeometryStyle
— TypeGeometryStyle
Trait that describes the "style" of an AbstractLocalizationGeometry
. Currently it can be either IsPrimitive
or IsFreeForm
.
BlankLocalizationCore.HoleAndNormal
— TypeHoleAndNormal <: AbstractHoleGeometry
A hole structure with center point, axis and radius.
BlankLocalizationCore.HoleLocalizationFeature
— TypeHoleLocalizationFeature(descriptor::FeatureDescriptor, rough::R, machined::M) where {R<:AbstractHoleGeometry,M<:AbstractHoleGeometry}
A holelike localization feature. The rough and machined geometries don't necessarily have to be the same type.
BlankLocalizationCore.IsFreeForm
— TypeFree form geometries are discrete representations, e.g. a mesh or a point cloud.
BlankLocalizationCore.IsPrimitive
— TypePrimitive geometries can be explicitly described, e.g. a box or sphere.
BlankLocalizationCore.LocalizationFeature
— TypeLocalizationFeature{R,M}
Supertype of any localization features. A localization feature contains a feature descriptor (FeatureDescriptor
) and a rough and machined geometry (AbstractLocalizationGeometry
). The two geometries must be of same type (hole, plane, etc.). If a feature doesn't have a rough of machined state, an empty object should be used (and the feature descriptor should also store this information). based on its rough geometry.
BlankLocalizationCore.MeshHole
— TypeMeshHole <: AbstractHoleGeometry
A simple mesh hole geometry, that contains the mesh of the hole's surface and the convex hull of the points (see our paper for details).
BlankLocalizationCore.MeshPlane
— TypeMeshPlane <: AbstractPlaneGeometry
A simple mesh plane geometry, that contains the mesh of a planar face.
BlankLocalizationCore.MultiOperationProblem
— TypeMultiOperationProblem
Collect all data for a multi operation problem, including: part zeros, holes, planes, tolerances, parameters and optimization result.
BlankLocalizationCore.MultiOperationProblem
— MethodMultiOperationProblem(partzeros, holes, planes, tolerances, parameters)
Construct a multi operation problem. For usage, please see the example section in the documentation. The parameters for the optimization are also described there with greater details.
Arguments
partzeros::Vector{PartZero}
: array of part zeros.holes::Vector{HoleLocalizationFeature}
: array of holes.planes::Vector{PlaneLocalizationFeature}
: array of planes.tolerances::Vector{Tolerance}
: array of tolerances.parameters::Dict{String,Any}
: parameters in the form of a dictionary. Keys include:minAllowance
,OptimizeForToleranceCenter
,UseTolerances
,SetPartZeroPosition
,maxPlaneZAllowance
.
BlankLocalizationCore.OptimizationResult
— TypeOptimizationResult
Store the status (result) of an optimization run and the minimum allowance value.
BlankLocalizationCore.PartZero
— TypePartZero(name, position, rotationmatrix)
Define a part zero with name, position and rotationmatrix relative to the workpiece datum.
Example
julia> PartZero("front", [0,0,0], hcat([0,1,0], [0,0,1], [1,0,0]))
Part zero: "front"
[0.0 0.0 1.0 0.0; 1.0 0.0 0.0 0.0; 0.0 1.0 0.0 0.0; 0.0 0.0 0.0 1.0]
BlankLocalizationCore.PlaneAndNormal
— TypePlaneAndNormal <: AbstractPlaneGeometry
A simple plane structure with one point and a normal vector.
BlankLocalizationCore.PlaneLocalizationFeature
— TypePlaneLocalizationFeature(descriptor::FeatureDescriptor, rough::R, machined::M) where {R<:AbstractPlaneGeometry,M<:AbstractPlaneGeometry}
A planelike localization feature. The rough and machined geometries don't necessarily have to be the same type.
BlankLocalizationCore.SimpleHole
— TypeSimpleHole <: AbstractHoleGeometry
A simple "hole" structure with a center point and a radius. Axis of the hole is defined by its partzero taken from the feature descriptor.
BlankLocalizationCore.SimplePlane
— TypeSimplePlane <: AbstractPlaneGeometry
A simple plane structure with one point. Normal vector of the plane is defined by its partzero taken from the feature descriptor.
BlankLocalizationCore.Tolerance
— TypeTolerance
A toleranced distance of two features. This struct stores the names of the features, if their rough or machined "form" is toleranced and also along which axis is their distance toleranced. The nominal, lower and upper values are self-explanatory and a comment can be also added as a string.
BlankLocalizationCore.allowancetable
— Methodallowancetable(mop::MultiOperationProblem)
Generate the allowance table for a given mop
to examine the allowance for each feature.
BlankLocalizationCore.featurepoint
— Functionfeaturepoint()
Return the feature point of an IsPrimitive
geometry. Definition signature should look like: featurepoint(::IsPrimitive, x)
.
BlankLocalizationCore.featureradius
— Functionfeatureradius()
Return the radius of a IsPrimitive
geometry that is subtype of [AbstractHoleGeometry
]. There is a default implementation that can be used: featureradius(::IsPrimitive, x) = x.r
.
BlankLocalizationCore.filteredsurfacepoints
— Functionfilteredsurfacepoints()
Return the filtered points of the surface of an IsFreeForm
geometry, that may define active constraints in the optimization task (for example convex hull of mesh). Definition signature should look like: filteredsurfacepoints(::IsFreeForm, x)
.
BlankLocalizationCore.genmachinedholes
— Methodgenmachinedholes(mop::MultiOperationProblem)
Generate Meshes object for each machined hole.
BlankLocalizationCore.genmachinedplanes
— Methodgenroughplanes(mop::MultiOperationProblem)
Generate Meshes object for each machined plane.
BlankLocalizationCore.genroughholes
— Methodgenroughholes(mop::MultiOperationProblem)
Generate Meshes object for each rough hole.
BlankLocalizationCore.genroughplanes
— Methodgenroughplanes(mop::MultiOperationProblem)
Generate Meshes object for each rough plane.
BlankLocalizationCore.isoptimum
— Methodisoptimum(mop::MultiOperationProblem)
Tell if mop
's solution is in an optimal state, either: OPTIMAL
or LOCALLY_SOLVED
.
BlankLocalizationCore.isoptimum
— Methodisoptimum(or::OptimizationResult)
Tell if or
is in an optimal solution state, either: OPTIMAL
or LOCALLY_SOLVED
.
BlankLocalizationCore.localizationfeature
— Methodlocalizationfeature(descriptor::FeatureDescriptor, rough::AbstractHoleGeometry, machined::AbstractHoleGeometry)
Convenience constructor for HoleLocalizationFeature
.
BlankLocalizationCore.localizationfeature
— Methodlocalizationfeature(descriptor::FeatureDescriptor, rough::AbstractPlaneGeometry, machined::AbstractPlaneGeometry)
Convenience constructor for PlaneLocalizationFeature
.
BlankLocalizationCore.minimumallowance
— Methodminimumallowance(allowancedb)
Calculate the minimum allowances (radial and axial) for the given allowance database (computed by allowancetable
). Return NaN
if there's no allowance.
BlankLocalizationCore.minimumallowance
— Methodminimumallowance(mop::MultiOperationProblem)
Calculate the minimum allowances (radial and axial) for the given mop
. Calls allowancetable
under the hood.
BlankLocalizationCore.printpartzeropositions
— Methodprintpartzeropositions(mop::MultiOperationProblem)
Print the positions of the part zeros of a MultiOperationProblem
.
BlankLocalizationCore.printpartzeropositions
— Methodprintpartzeropositions(partzeros::Vector{PartZero})
Print the positions of an array of part zeros.
BlankLocalizationCore.setparameters!
— Methodsetparameters!(mop::MultiOperationProblem, pardict)
Set parameter dictionary of a MultiOperationProblem
to pardict
.
BlankLocalizationCore.surfacepoints
— Functionsurfacepoints()
Return the points of the surface of an IsFreeForm
geometry. Definition signature should look like: surfacepoints(::IsFreeForm, x)
.
BlankLocalizationCore.toleranceerror
— Methodtoleranceerror(tolerancedb)
Calculate the average relative tolerance error for the given tolerance database (computed by tolerancetable
). Gives the result in the 0-100 % range.
BlankLocalizationCore.toleranceerror
— Methodtoleranceerror(mop::MultiOperationProblem)
Calculate the average relative tolerance error for the given mop
. Calls tolerancetable
under the hood. Gives the result in the 0-100 % range.
BlankLocalizationCore.tolerancetable
— Methodtolerancetable(mop::MultiOperationProblem)
Generate the tolerance table for a given mop
to examine the tolerances.
BlankLocalizationCore.visualizationgeometry
— Functionvisualizationgeometry(geom::AbstractLocalizationGeometry)
Return a Meshes.jl object that can be visualized.
Private functions
These functions and types are not exported, though they can be used if needed.
BlankLocalizationCore.FON
— TypeUnion type for Float64
and Nothing
.
BlankLocalizationCore.NOTHING3
— ConstantA 3 long vector of nothing
s.
BlankLocalizationCore.AbstractLocalizationGeometry
— TypeSupertype for localization geometries.
BlankLocalizationCore.HV
— MethodCreate a homogeneous vector by appending 1 to the end of a vector.
BlankLocalizationCore.collectallowancedholes
— Methodcollectallowancedholes(mop::MultiOperationProblem)
Collect holes that have machined and rough states, thus allowance should be calculated for.
BlankLocalizationCore.collectallowancedplanes
— Methodcollectallowancedplanes(mop::MultiOperationProblem)
Collect planes that have machined and rough states, thus allowance should be calculated for.
BlankLocalizationCore.collectmachinedholes
— Methodcollectmachinedholes(mop::MultiOperationProblem)
Collect holes that have a machined state.
BlankLocalizationCore.collectmachinedplanes
— Methodcollectmachinedplanes(mop::MultiOperationProblem)
Collect planes that have a machined state.
BlankLocalizationCore.collectroughholes
— Methodcollectroughholes(mop::MultiOperationProblem)
Collect those holes, that have rough stage.
BlankLocalizationCore.collectroughplanes
— Methodcollectroughplanes(mop::MultiOperationProblem)
Collect those planes, that have rough stage.
BlankLocalizationCore.getfeaturebyname
— Methodgetfeaturebyname(mop::MultiOperationProblem, featurename)
Get a hole or plane feature by its name. It is assumed that all features have distinct names. Return nothing
, if no feature is found with featurename
.
BlankLocalizationCore.getholesbypartzero
— Methodcollectholesbypartzero(mop::MultiOperationProblem, partzeroname)
Collect holes that are grouped to part zero called partzeroname
.
BlankLocalizationCore.getpartzeroHM
— MethodgetpartzeroHM(partzero::PartZero)
Get homogeneous matrix of part zero partzero
.
BlankLocalizationCore.getpartzerobyname
— Methodgetpartzerobyname(partzeros::Vector{PartZero}, partzeroname::AbstractString)
Return the first part zero from partzeros
, thats name is partzeroname
.
BlankLocalizationCore.getpartzeroinverseHM
— MethodgetpartzeroinverseHM(partzero::PartZero)
Get the inverse homogeneous matrix of part zero partzero
.
BlankLocalizationCore.inverthomtr
— Methodinverthomtr(M)
Invert a homogeneous transformation matrix.
BlankLocalizationCore.transformmachinedgeoms
— Methodtransformmachinedgeoms(lf::LocalizationFeature)
Get the rough state of lf
and transform it according to its current part zero transformation.