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