mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-27 17:45:53 +00:00
Extract debug
module into separate crate
This commit is contained in:
parent
7268a0c9fc
commit
9d5fc6903e
8
Cargo.lock
generated
8
Cargo.lock
generated
@ -631,6 +631,7 @@ dependencies = [
|
|||||||
"clap",
|
"clap",
|
||||||
"figment",
|
"figment",
|
||||||
"fj",
|
"fj",
|
||||||
|
"fj-debug",
|
||||||
"fj-math",
|
"fj-math",
|
||||||
"futures",
|
"futures",
|
||||||
"libloading",
|
"libloading",
|
||||||
@ -651,6 +652,13 @@ dependencies = [
|
|||||||
"winit",
|
"winit",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "fj-debug"
|
||||||
|
version = "0.5.0"
|
||||||
|
dependencies = [
|
||||||
|
"parry3d-f64",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fj-math"
|
name = "fj-math"
|
||||||
version = "0.5.0"
|
version = "0.5.0"
|
||||||
|
@ -3,6 +3,7 @@ resolver = "2"
|
|||||||
members = [
|
members = [
|
||||||
"fj",
|
"fj",
|
||||||
"fj-app",
|
"fj-app",
|
||||||
|
"fj-debug",
|
||||||
"fj-math",
|
"fj-math",
|
||||||
|
|
||||||
"models/cuboid",
|
"models/cuboid",
|
||||||
@ -14,5 +15,6 @@ members = [
|
|||||||
]
|
]
|
||||||
default-members = [
|
default-members = [
|
||||||
"fj-app",
|
"fj-app",
|
||||||
|
"fj-debug",
|
||||||
"fj-math",
|
"fj-math",
|
||||||
]
|
]
|
||||||
|
@ -43,6 +43,10 @@ features = ["env", "toml"]
|
|||||||
version = "0.5.0"
|
version = "0.5.0"
|
||||||
path = "../fj"
|
path = "../fj"
|
||||||
|
|
||||||
|
[dependencies.fj-debug]
|
||||||
|
version = "0.5.0"
|
||||||
|
path = "../fj-debug"
|
||||||
|
|
||||||
[dependencies.fj-math]
|
[dependencies.fj-math]
|
||||||
version = "0.5.0"
|
version = "0.5.0"
|
||||||
path = "../fj-math"
|
path = "../fj-math"
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
use bytemuck::{Pod, Zeroable};
|
use bytemuck::{Pod, Zeroable};
|
||||||
|
use fj_debug::DebugInfo;
|
||||||
use fj_math::Triangle;
|
use fj_math::Triangle;
|
||||||
use nalgebra::{vector, Point};
|
use nalgebra::{vector, Point};
|
||||||
|
|
||||||
use crate::{
|
use crate::mesh::{Index, MeshMaker};
|
||||||
debug::DebugInfo,
|
|
||||||
mesh::{Index, MeshMaker},
|
|
||||||
};
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Vertices {
|
pub struct Vertices {
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
|
|
||||||
|
use fj_debug::DebugInfo;
|
||||||
use fj_math::{Point, Scalar, Triangle, Vector};
|
use fj_math::{Point, Scalar, Triangle, Vector};
|
||||||
|
|
||||||
use crate::{
|
use crate::kernel::{
|
||||||
debug::DebugInfo,
|
geometry::{Circle, Curve, Line},
|
||||||
kernel::{
|
topology::{
|
||||||
geometry::{Circle, Curve, Line},
|
edges::{Cycle, Edge},
|
||||||
topology::{
|
faces::Face,
|
||||||
edges::{Cycle, Edge},
|
vertices::Vertex,
|
||||||
faces::Face,
|
|
||||||
vertices::Vertex,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
|
use fj_debug::DebugInfo;
|
||||||
use fj_math::{Aabb, Point, Scalar};
|
use fj_math::{Aabb, Point, Scalar};
|
||||||
|
|
||||||
use crate::{
|
use crate::kernel::{
|
||||||
debug::DebugInfo,
|
geometry::Surface,
|
||||||
kernel::{
|
shape::Shape,
|
||||||
geometry::Surface,
|
topology::{edges::Cycle, faces::Face},
|
||||||
shape::Shape,
|
|
||||||
topology::{edges::Cycle, faces::Face},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::ToShape;
|
use super::ToShape;
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
|
use fj_debug::DebugInfo;
|
||||||
use fj_math::{Aabb, Scalar};
|
use fj_math::{Aabb, Scalar};
|
||||||
|
|
||||||
use crate::{
|
use crate::kernel::{
|
||||||
debug::DebugInfo,
|
shape::Shape,
|
||||||
kernel::{
|
topology::{
|
||||||
shape::Shape,
|
edges::{Cycle, Edge},
|
||||||
topology::{
|
faces::Face,
|
||||||
edges::{Cycle, Edge},
|
vertices::Vertex,
|
||||||
faces::Face,
|
|
||||||
vertices::Vertex,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
|
use fj_debug::DebugInfo;
|
||||||
use fj_math::{Aabb, Scalar};
|
use fj_math::{Aabb, Scalar};
|
||||||
|
|
||||||
use crate::{
|
use crate::kernel::{
|
||||||
debug::DebugInfo,
|
shape::Shape,
|
||||||
kernel::{
|
topology::{
|
||||||
shape::Shape,
|
edges::{Cycle, Edge},
|
||||||
topology::{
|
faces::Face,
|
||||||
edges::{Cycle, Edge},
|
vertices::Vertex,
|
||||||
faces::Face,
|
|
||||||
vertices::Vertex,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,10 +5,9 @@ pub mod sketch;
|
|||||||
pub mod sweep;
|
pub mod sweep;
|
||||||
pub mod transform;
|
pub mod transform;
|
||||||
|
|
||||||
|
use fj_debug::DebugInfo;
|
||||||
use fj_math::{Aabb, Scalar};
|
use fj_math::{Aabb, Scalar};
|
||||||
|
|
||||||
use crate::debug::DebugInfo;
|
|
||||||
|
|
||||||
use super::shape::Shape;
|
use super::shape::Shape;
|
||||||
|
|
||||||
/// Implemented by all shapes
|
/// Implemented by all shapes
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
|
use fj_debug::DebugInfo;
|
||||||
use fj_math::{Aabb, Point, Scalar};
|
use fj_math::{Aabb, Point, Scalar};
|
||||||
|
|
||||||
use crate::{
|
use crate::kernel::{
|
||||||
debug::DebugInfo,
|
geometry::Surface,
|
||||||
kernel::{
|
shape::Shape,
|
||||||
geometry::Surface,
|
topology::{edges::Cycle, faces::Face, vertices::Vertex},
|
||||||
shape::Shape,
|
|
||||||
topology::{edges::Cycle, faces::Face, vertices::Vertex},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::ToShape;
|
use super::ToShape;
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
|
use fj_debug::DebugInfo;
|
||||||
use fj_math::{Aabb, Scalar, Vector};
|
use fj_math::{Aabb, Scalar, Vector};
|
||||||
|
|
||||||
use crate::{
|
use crate::kernel::{algorithms::sweep::sweep_shape, shape::Shape};
|
||||||
debug::DebugInfo,
|
|
||||||
kernel::{algorithms::sweep::sweep_shape, shape::Shape},
|
|
||||||
};
|
|
||||||
|
|
||||||
use super::ToShape;
|
use super::ToShape;
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
|
use fj_debug::DebugInfo;
|
||||||
use fj_math::{Aabb, Scalar, Transform};
|
use fj_math::{Aabb, Scalar, Transform};
|
||||||
use parry3d_f64::math::Isometry;
|
use parry3d_f64::math::Isometry;
|
||||||
|
|
||||||
use crate::{debug::DebugInfo, kernel::shape::Shape};
|
use crate::kernel::shape::Shape;
|
||||||
|
|
||||||
use super::ToShape;
|
use super::ToShape;
|
||||||
|
|
||||||
|
@ -3,19 +3,15 @@ use std::{
|
|||||||
hash::{Hash, Hasher},
|
hash::{Hash, Hasher},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use fj_debug::{DebugInfo, TriangleEdgeCheck};
|
||||||
use fj_math::{Aabb, Scalar, Segment, Triangle};
|
use fj_math::{Aabb, Scalar, Segment, Triangle};
|
||||||
use parry2d_f64::query::{Ray as Ray2, RayCast as _};
|
use parry2d_f64::query::{Ray as Ray2, RayCast as _};
|
||||||
use parry3d_f64::query::Ray as Ray3;
|
use parry3d_f64::query::Ray as Ray3;
|
||||||
|
|
||||||
use crate::{
|
use crate::kernel::{
|
||||||
debug::{DebugInfo, TriangleEdgeCheck},
|
algorithms::{approximation::Approximation, triangulation::triangulate},
|
||||||
kernel::{
|
geometry::Surface,
|
||||||
algorithms::{
|
shape::Handle,
|
||||||
approximation::Approximation, triangulation::triangulate,
|
|
||||||
},
|
|
||||||
geometry::Surface,
|
|
||||||
shape::Handle,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::edges::Cycle;
|
use super::edges::Cycle;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
mod args;
|
mod args;
|
||||||
mod camera;
|
mod camera;
|
||||||
mod config;
|
mod config;
|
||||||
mod debug;
|
|
||||||
mod graphics;
|
mod graphics;
|
||||||
mod input;
|
mod input;
|
||||||
mod kernel;
|
mod kernel;
|
||||||
@ -14,6 +13,7 @@ use std::ffi::OsStr;
|
|||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::{collections::HashMap, sync::mpsc, time::Instant};
|
use std::{collections::HashMap, sync::mpsc, time::Instant};
|
||||||
|
|
||||||
|
use fj_debug::DebugInfo;
|
||||||
use fj_math::Scalar;
|
use fj_math::Scalar;
|
||||||
use futures::executor::block_on;
|
use futures::executor::block_on;
|
||||||
use notify::Watcher as _;
|
use notify::Watcher as _;
|
||||||
@ -29,7 +29,6 @@ use crate::{
|
|||||||
args::Args,
|
args::Args,
|
||||||
camera::Camera,
|
camera::Camera,
|
||||||
config::Config,
|
config::Config,
|
||||||
debug::DebugInfo,
|
|
||||||
graphics::{DrawConfig, Renderer},
|
graphics::{DrawConfig, Renderer},
|
||||||
kernel::shapes::ToShape as _,
|
kernel::shapes::ToShape as _,
|
||||||
mesh::MeshMaker,
|
mesh::MeshMaker,
|
||||||
|
14
fj-debug/Cargo.toml
Normal file
14
fj-debug/Cargo.toml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[package]
|
||||||
|
name = "fj-debug"
|
||||||
|
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"]
|
||||||
|
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
parry3d-f64 = "0.8.0"
|
Loading…
Reference in New Issue
Block a user