diff --git a/Cargo.lock b/Cargo.lock index 5de234255..485132769 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -631,8 +631,8 @@ dependencies = [ "figment", "fj", "fj-debug", - "fj-kernel", "fj-math", + "fj-operations", "futures", "libloading", "nalgebra", @@ -684,6 +684,18 @@ dependencies = [ "parry3d-f64", ] +[[package]] +name = "fj-operations" +version = "0.5.0" +dependencies = [ + "fj", + "fj-debug", + "fj-kernel", + "fj-math", + "nalgebra", + "parry3d-f64", +] + [[package]] name = "flate2" version = "1.0.22" diff --git a/Cargo.toml b/Cargo.toml index 961bb9076..b0c38349e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,7 @@ members = [ "fj-debug", "fj-kernel", "fj-math", + "fj-operations", "models/cuboid", "models/group", @@ -19,4 +20,5 @@ default-members = [ "fj-debug", "fj-kernel", "fj-math", + "fj-operations", ] diff --git a/fj-app/Cargo.toml b/fj-app/Cargo.toml index 663310e2e..51a6df9fe 100644 --- a/fj-app/Cargo.toml +++ b/fj-app/Cargo.toml @@ -42,14 +42,14 @@ path = "../fj" version = "0.5.0" path = "../fj-debug" -[dependencies.fj-kernel] -version = "0.5.0" -path = "../fj-kernel" - [dependencies.fj-math] version = "0.5.0" path = "../fj-math" +[dependencies.fj-operations] +version = "0.5.0" +path = "../fj-operations" + [dependencies.serde] version = "1.0.136" features = ["derive"] diff --git a/fj-app/src/main.rs b/fj-app/src/main.rs index 39a547cf4..6b5819866 100644 --- a/fj-app/src/main.rs +++ b/fj-app/src/main.rs @@ -5,7 +5,6 @@ mod graphics; mod input; mod mesh; mod model; -mod operations; mod window; use std::collections::HashSet; @@ -15,6 +14,7 @@ use std::{collections::HashMap, sync::mpsc, time::Instant}; use fj_debug::DebugInfo; use fj_math::Scalar; +use fj_operations::ToShape as _; use futures::executor::block_on; use notify::Watcher as _; use tracing::trace; @@ -32,7 +32,6 @@ use crate::{ graphics::{DrawConfig, Renderer}, mesh::MeshMaker, model::Model, - operations::ToShape as _, window::Window, }; diff --git a/fj-operations/Cargo.toml b/fj-operations/Cargo.toml new file mode 100644 index 000000000..023bede6e --- /dev/null +++ b/fj-operations/Cargo.toml @@ -0,0 +1,32 @@ +[package] +name = "fj-operations" +version = "0.5.0" +edition = "2021" + +description = "The world needs another CAD program." +readme = "../README.md" +repository = "https://github.com/hannobraun/fornjot" +license = "0BSD" +keywords = ["cad", "programmatic", "code-cad"] +categories = ["mathematics"] + + +[dependencies] +nalgebra = "0.30.0" +parry3d-f64 = "0.8.0" + +[dependencies.fj] +version = "0.5.0" +path = "../fj" + +[dependencies.fj-math] +version = "0.5.0" +path = "../fj-math" + +[dependencies.fj-debug] +version = "0.5.0" +path = "../fj-debug" + +[dependencies.fj-kernel] +version = "0.5.0" +path = "../fj-kernel" diff --git a/fj-app/src/operations/circle.rs b/fj-operations/src/circle.rs similarity index 100% rename from fj-app/src/operations/circle.rs rename to fj-operations/src/circle.rs diff --git a/fj-app/src/operations/difference_2d.rs b/fj-operations/src/difference_2d.rs similarity index 100% rename from fj-app/src/operations/difference_2d.rs rename to fj-operations/src/difference_2d.rs diff --git a/fj-app/src/operations/group.rs b/fj-operations/src/group.rs similarity index 100% rename from fj-app/src/operations/group.rs rename to fj-operations/src/group.rs diff --git a/fj-app/src/operations/mod.rs b/fj-operations/src/lib.rs similarity index 100% rename from fj-app/src/operations/mod.rs rename to fj-operations/src/lib.rs diff --git a/fj-app/src/operations/sketch.rs b/fj-operations/src/sketch.rs similarity index 100% rename from fj-app/src/operations/sketch.rs rename to fj-operations/src/sketch.rs diff --git a/fj-app/src/operations/sweep.rs b/fj-operations/src/sweep.rs similarity index 100% rename from fj-app/src/operations/sweep.rs rename to fj-operations/src/sweep.rs diff --git a/fj-app/src/operations/transform.rs b/fj-operations/src/transform.rs similarity index 100% rename from fj-app/src/operations/transform.rs rename to fj-operations/src/transform.rs