Reference for exported types and functions
API docstrings
These types and functions are the exported API by this package.
BlankLocalizationCore.AbstractHoleGeometry — Type
Supertype of hole like localization geometries.
BlankLocalizationCore.AbstractPlaneGeometry — Type
Supertype of plane like geometries.
BlankLocalizationCore.FeatureDescriptor — Type
Store description of a feature: its name, the corresponding part zero, if it has or has not a machined and a rough state.
BlankLocalizationCore.GeometryStyle — Type
GeometryStyleTrait that describes the "style" of an AbstractLocalizationGeometry. Currently it can be either IsPrimitive or IsFreeForm.
BlankLocalizationCore.HoleAndNormal — Type
HoleAndNormal <: AbstractHoleGeometry
A hole structure with center point, axis and radius.
BlankLocalizationCore.HoleLocalizationFeature — Type
HoleLocalizationFeature(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 — Type
Free form geometries are discrete representations, e.g. a mesh or a point cloud.
BlankLocalizationCore.IsPrimitive — Type
Primitive geometries can be explicitly described, e.g. a box or sphere.
BlankLocalizationCore.LocalizationFeature — Type
LocalizationFeature{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 — Type
MeshHole <: 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 — Type
MeshPlane <: AbstractPlaneGeometry
A simple mesh plane geometry, that contains the mesh of a planar face.
BlankLocalizationCore.MultiOperationProblem — Type
MultiOperationProblemCollect all data for a multi operation problem, including: part zeros, holes, planes, tolerances, parameters and optimization result.
BlankLocalizationCore.MultiOperationProblem — Method
MultiOperationProblem(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 — Type
OptimizationResultStore the status (result) of an optimization run and the minimum allowance value.
BlankLocalizationCore.PartZero — Type
PartZero(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 — Type
PlaneAndNormal <: AbstractPlaneGeometry
A simple plane structure with one point and a normal vector.
BlankLocalizationCore.PlaneLocalizationFeature — Type
PlaneLocalizationFeature(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 — Type
SimpleHole <: 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 — Type
SimplePlane <: 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 — Type
ToleranceA 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 — Method
allowancetable(mop::MultiOperationProblem)Generate the allowance table for a given mop to examine the allowance for each feature.
BlankLocalizationCore.featurepoint — Function
featurepoint()Return the feature point of an IsPrimitive geometry. Definition signature should look like: featurepoint(::IsPrimitive, x).
BlankLocalizationCore.featureradius — Function
featureradius()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 — Function
filteredsurfacepoints()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 — Method
genmachinedholes(mop::MultiOperationProblem)Generate Meshes object for each machined hole.
BlankLocalizationCore.genmachinedplanes — Method
genroughplanes(mop::MultiOperationProblem)Generate Meshes object for each machined plane.
BlankLocalizationCore.genroughholes — Method
genroughholes(mop::MultiOperationProblem)Generate Meshes object for each rough hole.
BlankLocalizationCore.genroughplanes — Method
genroughplanes(mop::MultiOperationProblem)Generate Meshes object for each rough plane.
BlankLocalizationCore.isoptimum — Method
isoptimum(mop::MultiOperationProblem)Tell if mop's solution is in an optimal state, either: OPTIMAL or LOCALLY_SOLVED.
BlankLocalizationCore.isoptimum — Method
isoptimum(or::OptimizationResult)Tell if or is in an optimal solution state, either: OPTIMAL or LOCALLY_SOLVED.
BlankLocalizationCore.localizationfeature — Method
localizationfeature(descriptor::FeatureDescriptor, rough::AbstractHoleGeometry, machined::AbstractHoleGeometry)Convenience constructor for HoleLocalizationFeature.
BlankLocalizationCore.localizationfeature — Method
localizationfeature(descriptor::FeatureDescriptor, rough::AbstractPlaneGeometry, machined::AbstractPlaneGeometry)Convenience constructor for PlaneLocalizationFeature.
BlankLocalizationCore.minimumallowance — Method
minimumallowance(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 — Method
minimumallowance(mop::MultiOperationProblem)Calculate the minimum allowances (radial and axial) for the given mop. Calls allowancetable under the hood.
BlankLocalizationCore.printpartzeropositions — Method
printpartzeropositions(mop::MultiOperationProblem)Print the positions of the part zeros of a MultiOperationProblem.
BlankLocalizationCore.printpartzeropositions — Method
printpartzeropositions(partzeros::Vector{PartZero})Print the positions of an array of part zeros.
BlankLocalizationCore.setparameters! — Method
setparameters!(mop::MultiOperationProblem, pardict)Set parameter dictionary of a MultiOperationProblem to pardict.
BlankLocalizationCore.surfacepoints — Function
surfacepoints()Return the points of the surface of an IsFreeForm geometry. Definition signature should look like: surfacepoints(::IsFreeForm, x).
BlankLocalizationCore.toleranceerror — Method
toleranceerror(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 — Method
toleranceerror(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 — Method
tolerancetable(mop::MultiOperationProblem)Generate the tolerance table for a given mop to examine the tolerances.
BlankLocalizationCore.visualizationgeometry — Function
visualizationgeometry(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 — Type
Union type for Float64 and Nothing.
BlankLocalizationCore.NOTHING3 — Constant
A 3 long vector of nothings.
BlankLocalizationCore.AbstractLocalizationGeometry — Type
Supertype for localization geometries.
BlankLocalizationCore.HV — Method
Create a homogeneous vector by appending 1 to the end of a vector.
BlankLocalizationCore.collectallowancedholes — Method
collectallowancedholes(mop::MultiOperationProblem)Collect holes that have machined and rough states, thus allowance should be calculated for.
BlankLocalizationCore.collectallowancedplanes — Method
collectallowancedplanes(mop::MultiOperationProblem)Collect planes that have machined and rough states, thus allowance should be calculated for.
BlankLocalizationCore.collectmachinedholes — Method
collectmachinedholes(mop::MultiOperationProblem)Collect holes that have a machined state.
BlankLocalizationCore.collectmachinedplanes — Method
collectmachinedplanes(mop::MultiOperationProblem)Collect planes that have a machined state.
BlankLocalizationCore.collectroughholes — Method
collectroughholes(mop::MultiOperationProblem)Collect those holes, that have rough stage.
BlankLocalizationCore.collectroughplanes — Method
collectroughplanes(mop::MultiOperationProblem)Collect those planes, that have rough stage.
BlankLocalizationCore.getfeaturebyname — Method
getfeaturebyname(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 — Method
collectholesbypartzero(mop::MultiOperationProblem, partzeroname)Collect holes that are grouped to part zero called partzeroname.
BlankLocalizationCore.getpartzeroHM — Method
getpartzeroHM(partzero::PartZero)Get homogeneous matrix of part zero partzero.
BlankLocalizationCore.getpartzerobyname — Method
getpartzerobyname(partzeros::Vector{PartZero}, partzeroname::AbstractString)Return the first part zero from partzeros, thats name is partzeroname.
BlankLocalizationCore.getpartzeroinverseHM — Method
getpartzeroinverseHM(partzero::PartZero)Get the inverse homogeneous matrix of part zero partzero.
BlankLocalizationCore.inverthomtr — Method
inverthomtr(M)Invert a homogeneous transformation matrix.
BlankLocalizationCore.transformmachinedgeoms — Method
transformmachinedgeoms(lf::LocalizationFeature)Get the rough state of lf and transform it according to its current part zero transformation.