Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify Sketch/PartialSketch, Shell/PartialShell, and Solid/PartialSolid #1685

Merged
merged 11 commits into from
Mar 15, 2023
3 changes: 1 addition & 2 deletions crates/fj-kernel/src/algorithms/sweep/face.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use crate::{
geometry::curve::GlobalPath,
insert::Insert,
objects::{Cycle, Face, Objects, Shell},
partial::{PartialObject, PartialShell},
services::Service,
storage::Handle,
};
Expand Down Expand Up @@ -99,6 +98,6 @@ impl Sweep for Handle<Face> {
let top_face = top_face.insert(objects);
faces.push(top_face);

PartialShell { faces }.build(objects).insert(objects)
Shell::new(faces).insert(objects)
}
}
4 changes: 1 addition & 3 deletions crates/fj-kernel/src/algorithms/sweep/sketch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use fj_math::Vector;
use crate::{
insert::Insert,
objects::{Objects, Sketch, Solid},
partial::{Partial, PartialObject, PartialSolid},
services::Service,
storage::Handle,
};
Expand All @@ -27,7 +26,6 @@ impl Sweep for Handle<Sketch> {
shells.push(shell);
}

let shells = shells.into_iter().map(Partial::from).collect();
PartialSolid { shells }.build(objects).insert(objects)
Solid::new(shells).insert(objects)
}
}
9 changes: 0 additions & 9 deletions crates/fj-kernel/src/builder/face.rs

This file was deleted.

9 changes: 1 addition & 8 deletions crates/fj-kernel/src/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,10 @@
// These are new-style builders that build on top of the partial object API.
mod cycle;
mod edge;
mod face;
mod shell;
mod sketch;
mod solid;

use std::array;

pub use self::{
cycle::CycleBuilder, edge::HalfEdgeBuilder, face::FaceBuilder,
shell::ShellBuilder, sketch::SketchBuilder, solid::SolidBuilder,
};
pub use self::{cycle::CycleBuilder, edge::HalfEdgeBuilder};

/// Pass objects to a builder method
///
Expand Down
9 changes: 0 additions & 9 deletions crates/fj-kernel/src/builder/shell.rs

This file was deleted.

9 changes: 0 additions & 9 deletions crates/fj-kernel/src/builder/sketch.rs

This file was deleted.

9 changes: 0 additions & 9 deletions crates/fj-kernel/src/builder/solid.rs

This file was deleted.

1 change: 0 additions & 1 deletion crates/fj-kernel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ pub mod builder;
pub mod geometry;
pub mod insert;
pub mod objects;
pub mod partial;
pub mod services;
pub mod storage;
pub mod validate;
53 changes: 0 additions & 53 deletions crates/fj-kernel/src/partial/mod.rs

This file was deleted.

3 changes: 0 additions & 3 deletions crates/fj-kernel/src/partial/objects/mod.rs

This file was deleted.

31 changes: 0 additions & 31 deletions crates/fj-kernel/src/partial/objects/shell.rs

This file was deleted.

31 changes: 0 additions & 31 deletions crates/fj-kernel/src/partial/objects/sketch.rs

This file was deleted.

34 changes: 0 additions & 34 deletions crates/fj-kernel/src/partial/objects/solid.rs

This file was deleted.

42 changes: 0 additions & 42 deletions crates/fj-kernel/src/partial/traits.rs

This file was deleted.

Loading