Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0cdf4da
initial design
Jun 29, 2023
1d770a1
remove const annotation to be compatible with 1.0
Jun 29, 2023
4c62618
implement first version of tolerance structure
Jun 29, 2023
95c689e
implement getters and setters
Jun 29, 2023
3df9d37
get started with interface and optimization implementation
Jun 29, 2023
f621f49
implement jump model for primitive geometries
Jun 30, 2023
cac294d
add allowance and tolerance table computing and printing
Jun 30, 2023
d9b8a9c
bugfix: query distp in addplane2model instead of disth
Jul 4, 2023
569adc3
define jump distance variables when adding constraints at features
Jul 4, 2023
98d6725
first implementation for FreeForm optimization
Jul 4, 2023
c8b43ad
fix Project.toml after messed up rebase
Jul 5, 2023
8326b25
rework allowance calculation methods and interface
Jul 5, 2023
2a8a401
compute allowance for IsFreeForms' as well
Jul 5, 2023
cd8daa3
fix sign in IsFreeForm allowance calculation
Jul 6, 2023
6c078e0
when evaluating, search for the minimum allowance, not mean of them
Jul 6, 2023
4d95d61
allow negative minimum allowance in opt program
Jul 6, 2023
48e8dbf
short blank localization description
Jul 13, 2023
e9e1db1
get started with example documentation
Jul 14, 2023
d6d6344
add page for future api description
Jul 14, 2023
1724193
get to tolerances
Jul 14, 2023
e465759
ignore windows batch files
Jul 15, 2023
5a28430
finishing todos based on CAD
Jul 15, 2023
595f632
first version of tolerances
Jul 15, 2023
68505f6
finishing the example
Jul 15, 2023
1b36353
first version of visualizations
Jul 15, 2023
7ebec2e
rework visualization for easier use
Jul 15, 2023
03c5c76
documentation advancements
Jul 17, 2023
7ae2d2d
minor docs updates
Jul 18, 2023
8e346ad
finish example documentation
Jul 19, 2023
74cc588
acknowledge julia packages
Jul 19, 2023
1fb7e0d
forgot to mention the installation method
Jul 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/Manifest.toml
/docs/Manifest.toml
/docs/build/
*.bat
14 changes: 14 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,21 @@ uuid = "dc39d501-6ffa-4c27-9708-7dc7e3b1a5c3"
authors = ["Tamás Cserteg <cserteg.tamas@sztaki.hu>", "András Kovács <akovacs@sztaki.hu> and contributors"]
version = "1.0.0-DEV"

[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Meshes = "eacbb407-ea5a-433e-ab97-5258b1ca43fa"
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Rotations = "6038ab10-8711-5258-84ad-4b1120ba62dc"

[compat]
DataFrames = "1"
JuMP = "1.4"
Meshes = "0.32"
PrettyTables = "2"
julia = "1.6"

[extras]
Expand Down
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,51 @@
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://cserteGT3.github.io/BlankLocalizationCore.jl/stable/)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://cserteGT3.github.io/BlankLocalizationCore.jl/dev/)
[![Build Status](https://github.com/cserteGT3/BlankLocalizationCore.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/cserteGT3/BlankLocalizationCore.jl/actions/workflows/CI.yml?query=branch%3Amain)

This repository contains the reference implentation for the multi operation blank localization technique described in our paper _Multi-operation optimal blank localization for near net shape machining_.
The paper is available is here: <https://www.sciencedirect.com/science/article/pii/S0007850623000884>.

The goal of multi operation blank localization is to align the CNC machining code for the rough (e.g. cast, 3D printed, etc.) parts.
When doing so, one must consider two important factors:

- leaving enough material to be removed by the tool (machining allowance)
- respecting the dimensional tolerances between features (defined on the part drawing)

Our paper proposes a method, that ensures a proper machining allowance (minimum requirement), while trying to optimize to the center of the tolerance fields between features.

The documentation goes through a detailed example of the process while showing how to use the package.

The package is not yet registered, so it needs to be installed by its URL:

```julia
using Pkg
Pkg.add(url="https://github.com/cserteGT3/BlankLocalizationCore.jl")
```

## Design goals

This is a one on one implementation of the optimization model described in the above mentioned paper.
As processing different types of measurement data (such as coordinate measurement machine, or a 3D scanner) requires different methods and techniqes, a well designed interface is available.
The aim is to make it easy to adapt our methodology to any measurement types available.

If you use find this work useful, please cite our paper:

```txt
@article{cserteg:2023_MultioperationOptimalBlank,
title = {Multi-Operation Optimal Blank Localization for near Net Shape Machining},
author = {Cserteg, Tamás and Kovács, András and Váncza, József},
year = {2023},
month = jun,
journal = {CIRP Annals},
issn = {0007-8506},
doi = {10.1016/j.cirp.2023.04.049},
}
```

## Acknowledgements

This package couldn't have been created without the great people behind the following projects (as well as the whole Julia ecosystem):

* [Meshes.jl](https://github.com/JuliaGeometry/Meshes.jl), [MeshViz.jl](https://github.com/JuliaGeometry/MeshViz.jl) and the [Makie.jl](https://github.com/MakieOrg/Makie.jl) ecosystem
* [JuMP.jl](https://jump.dev/)
* [DataFrames.jl](https://github.com/JuliaData/DataFrames.jl) and [PrettyTables.jl](https://github.com/ronisbr/PrettyTables.jl)
3 changes: 3 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ makedocs(;
),
pages=[
"Home" => "index.md",
"Example" => "example.md",
"API extension" => "api.md",
"Reference" => "reference.md"
],
)

Expand Down
56 changes: 56 additions & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Using the API to extend the geometry types

The solver handles hole and face (plane) features that are either [`IsPrimitive`](@ref) or [`IsFreeForm`](@ref).
A few basic types are defined like [`SimpleHole`](@ref) and [`MeshHole`](@ref), but new ones can be also defined.
For example for point clouds, that don't have faces, like a mesh, only points.

This capability is properly documented, as a major API rewrite is going on in [#3](https://github.com/cserteGT3/BlankLocalizationCore.jl/pull/3).

## Defining a new geometry

Defining a new geometry is pretty easy:

* It has to be the subtype of either [`AbstractHoleGeometry`](@ref) or [`AbstractPlaneGeometry`](@ref).
* The [`GeometryStyle`](@ref) trait is need to be defined: it is either a [`IsPrimitive`](@ref) or [`IsFreeForm`](@ref) geometry.
* `IsFreeForm` geometries need to define the [`surfacepoints`](@ref) and [`filteredsurfacepoints`](@ref) functions.
* `IsPrimitive` geometries need to define the [`featurepoint`](@ref) functions
* Those `IsPrimitive` geometries that are subtype of `AbstractHoleGeometry` also need to define the [`featureradius`](@ref) function
* Finally, for visualization purposes the [`visualizationgeometry`](@ref) function should be defined, that returns an object, that can be used with the `Meshviz.viz()` function.

## An example

Let's assume that we want to define a new holelike type: `MyDisk`, which has a featurepoint, a normal, and a radius.

```julia
using BlankLocalizationCore

struct MyDisk <: AbstractHoleGeometry
point::Vector{Float64}
normal::Vector{Float64}
diameter::Float64
end

GeometryStyle(::Type{MyDisk}) = IsPrimitive()
```

It is an `IsPrimitive` and holelike feature, therefore we need to define the:

* `featurepoint`
* `featureradius`
* `visualizationgeometry`

functions.
These look like as follows:

```julia
featurepoint(::IsPrimitive, x::MyDisk) = x.point
featureradius(::IsPrimitive, x::MyDisk) = x.diameter/2

using Meshes

function visualizationgeometry(geom::MyDisk)
plane = Plane(Point3(geom.point), Vec3(geom.normal))
return Disk(plane, geom.diameter/2)
end

```
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading