Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocalizationFeature should be concrete type? #19

Open
cserteGT3 opened this issue Sep 7, 2023 · 0 comments · May be fixed by #3
Open

LocalizationFeature should be concrete type? #19

cserteGT3 opened this issue Sep 7, 2023 · 0 comments · May be fixed by #3

Comments

@cserteGT3
Copy link
Owner

Current implementation:

abstract type LocalizationFeature{R,M} end

struct HoleLocalizationFeature{R<:AbstractHoleGeometry,M<:AbstractHoleGeometry} <: LocalizationFeature{R,M}
    descriptor::FeatureDescriptor
    rough::R
    machined::M
end

struct PlaneLocalizationFeature{R<:AbstractPlaneGeometry,M<:AbstractPlaneGeometry} <: LocalizationFeature{R,M}
    descriptor::FeatureDescriptor
    rough::R
    machined::M
end

Can I replace it with something like:

struct LocalizationFeature{R,M}
    descriptor::FeatureDescriptor
    rough::R
    machined::M
end

const HoleLocalizationFeature = LocalizationFeature{R,M} where {R<:AbstractHoleGeometry,M<:AbstractHoleGeometry}
const PlaneLocalizationFeature =  LocalizationFeature{R,M} where {R<:AbstractPlaneGeometry,M<:AbstractPlaneGeometry}

R and M must be handled separately, because it is possible, that those are of different types (a mesh hole type and a primitive hole type for example).
Does it change if #3 will be merged?

@cserteGT3 cserteGT3 linked a pull request Nov 13, 2023 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant