mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-04 18:08:26 +00:00
Move operation
module to top-level
This commit is contained in:
parent
891b004592
commit
76f38fbc9a
@ -8,7 +8,7 @@ use winit::{
|
||||
window::{Window, WindowAttributes, WindowId},
|
||||
};
|
||||
|
||||
use crate::{geometry::HandleAny, render::Renderer, view::OperationView};
|
||||
use crate::{operation::HandleAny, render::Renderer, view::OperationView};
|
||||
|
||||
pub fn run(shape: HandleAny) -> anyhow::Result<()> {
|
||||
let view = OperationView::new(shape);
|
||||
|
@ -1,6 +1,6 @@
|
||||
use std::{collections::BTreeMap, fs::File};
|
||||
|
||||
use crate::geometry::Operation;
|
||||
use crate::operation::Operation;
|
||||
|
||||
pub fn export(op: &dyn Operation) -> anyhow::Result<()> {
|
||||
let tri_mesh = op.tri_mesh();
|
||||
|
@ -1,11 +1,5 @@
|
||||
mod operation;
|
||||
mod sketch;
|
||||
mod tri_mesh;
|
||||
mod triangle;
|
||||
|
||||
pub use self::{
|
||||
operation::{Handle, HandleAny, Operation, OperationOutput},
|
||||
sketch::Sketch,
|
||||
tri_mesh::TriMesh,
|
||||
triangle::Triangle,
|
||||
};
|
||||
pub use self::{sketch::Sketch, tri_mesh::TriMesh, triangle::Triangle};
|
||||
|
@ -1,10 +1,9 @@
|
||||
use crate::{
|
||||
math::{Plane, Point},
|
||||
operation::Handle,
|
||||
topology::{face::Face, vertex::Vertex},
|
||||
};
|
||||
|
||||
use super::Handle;
|
||||
|
||||
pub struct Sketch {
|
||||
pub points: Vec<Point<2>>,
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
use std::fmt;
|
||||
|
||||
use crate::math::Point;
|
||||
|
||||
use super::{
|
||||
operation::{HandleAny, OperationOutput},
|
||||
Operation, TriMesh,
|
||||
use crate::{
|
||||
math::Point,
|
||||
operation::{HandleAny, Operation, OperationOutput},
|
||||
};
|
||||
|
||||
use super::TriMesh;
|
||||
|
||||
#[derive(Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]
|
||||
pub struct Triangle {
|
||||
pub points: [Point<3>; 3],
|
||||
|
@ -5,6 +5,7 @@ mod export;
|
||||
mod geometry;
|
||||
mod math;
|
||||
mod model;
|
||||
mod operation;
|
||||
mod render;
|
||||
mod topology;
|
||||
mod view;
|
||||
|
@ -1,6 +1,7 @@
|
||||
use crate::{
|
||||
geometry::{Handle, HandleAny, Sketch},
|
||||
geometry::Sketch,
|
||||
math::{Bivector, Plane, Point, Vector},
|
||||
operation::{Handle, HandleAny},
|
||||
topology::sweep::SweepExt,
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use std::{cmp::Ordering, fmt, rc::Rc};
|
||||
|
||||
use super::tri_mesh::TriMesh;
|
||||
use crate::geometry::TriMesh;
|
||||
|
||||
pub trait Operation {
|
||||
fn display(&self, f: &mut fmt::Formatter) -> fmt::Result;
|
@ -1,7 +1,7 @@
|
||||
use glam::Vec3;
|
||||
use wgpu::util::DeviceExt;
|
||||
|
||||
use crate::geometry::Operation;
|
||||
use crate::operation::Operation;
|
||||
|
||||
use super::vertex::Vertex;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use std::fmt::Write;
|
||||
|
||||
use crate::{geometry::Operation, view::OperationView};
|
||||
use crate::{operation::Operation, view::OperationView};
|
||||
|
||||
pub struct TextRenderer {
|
||||
text_atlas: glyphon::TextAtlas,
|
||||
|
@ -1,8 +1,9 @@
|
||||
use std::fmt;
|
||||
|
||||
use crate::{
|
||||
geometry::{Handle, HandleAny, Operation, OperationOutput, TriMesh},
|
||||
geometry::TriMesh,
|
||||
math::Plane,
|
||||
operation::{Handle, HandleAny, Operation, OperationOutput},
|
||||
};
|
||||
|
||||
use super::{face::Face, solid::Solid};
|
||||
|
@ -4,10 +4,9 @@ use itertools::Itertools;
|
||||
use spade::Triangulation;
|
||||
|
||||
use crate::{
|
||||
geometry::{
|
||||
Handle, HandleAny, Operation, OperationOutput, TriMesh, Triangle,
|
||||
},
|
||||
geometry::{TriMesh, Triangle},
|
||||
math::{Plane, Point},
|
||||
operation::{Handle, HandleAny, Operation, OperationOutput},
|
||||
};
|
||||
|
||||
use super::vertex::Vertex;
|
||||
|
@ -1,6 +1,9 @@
|
||||
use std::fmt;
|
||||
|
||||
use crate::geometry::{Handle, HandleAny, Operation, OperationOutput, TriMesh};
|
||||
use crate::{
|
||||
geometry::TriMesh,
|
||||
operation::{Handle, HandleAny, Operation, OperationOutput},
|
||||
};
|
||||
|
||||
use super::face::Face;
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
use std::fmt;
|
||||
|
||||
use crate::geometry::{Handle, HandleAny, Operation, OperationOutput, TriMesh};
|
||||
use crate::{
|
||||
geometry::TriMesh,
|
||||
operation::{Handle, HandleAny, Operation, OperationOutput},
|
||||
};
|
||||
|
||||
use super::face::Face;
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
use std::fmt;
|
||||
|
||||
use crate::{
|
||||
geometry::{Handle, HandleAny, Operation, OperationOutput, TriMesh},
|
||||
geometry::TriMesh,
|
||||
math::Vector,
|
||||
operation::{Handle, HandleAny, Operation, OperationOutput},
|
||||
};
|
||||
|
||||
use super::{
|
||||
|
@ -1,8 +1,9 @@
|
||||
use std::fmt;
|
||||
|
||||
use crate::{
|
||||
geometry::{Handle, HandleAny, Operation, OperationOutput, TriMesh},
|
||||
geometry::TriMesh,
|
||||
math::Vector,
|
||||
operation::{Handle, HandleAny, Operation, OperationOutput},
|
||||
};
|
||||
|
||||
use super::face::Face;
|
||||
|
@ -1,8 +1,9 @@
|
||||
use std::fmt;
|
||||
|
||||
use crate::{
|
||||
geometry::{HandleAny, Operation, OperationOutput, TriMesh},
|
||||
geometry::TriMesh,
|
||||
math::{Point, Vector},
|
||||
operation::{HandleAny, Operation, OperationOutput},
|
||||
};
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)]
|
||||
|
@ -1,6 +1,9 @@
|
||||
use std::{fmt, iter};
|
||||
|
||||
use crate::geometry::{HandleAny, Operation, OperationOutput, TriMesh};
|
||||
use crate::{
|
||||
geometry::TriMesh,
|
||||
operation::{HandleAny, Operation, OperationOutput},
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct OperationView {
|
||||
|
Loading…
Reference in New Issue
Block a user