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

Make some small cleanups in the kernel code #1370

Merged
merged 7 commits into from
Nov 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crates/fj-kernel/src/insert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use crate::{

/// Convenience trait to insert objects into their respective stores
pub trait Insert: Sized + Validate {
// TASK: Make error more specific.
/// Insert the object into its respective store
fn insert(
self,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use crate::{
geometry::path::SurfacePath,
get::Get,
objects::Surface,
storage::{Handle, HandleWrapper},
};

use super::Surface;

/// A curve, defined in local surface coordinates
#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
pub struct Curve {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ use std::slice;
use fj_interop::ext::SliceExt;
use fj_math::{Scalar, Winding};

use crate::{geometry::path::SurfacePath, storage::Handle};

use super::{HalfEdge, Surface};
use crate::{
geometry::path::SurfacePath,
objects::{HalfEdge, Surface},
storage::Handle,
};

/// A cycle of connected half-edges
#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ use std::fmt;

use crate::{
get::Get,
objects::{Curve, GlobalCurve, GlobalVertex, Surface, Vertex},
storage::{Handle, HandleWrapper},
};

use super::{Curve, GlobalCurve, GlobalVertex, Surface, Vertex};

/// A half-edge
#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
pub struct HalfEdge {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ use std::collections::{btree_set, BTreeSet};
use fj_interop::mesh::Color;
use fj_math::Winding;

use crate::storage::Handle;

use super::{Cycle, Surface};
use crate::{
objects::{Cycle, Surface},
storage::Handle,
};

/// A face of a shape
///
Expand All @@ -29,8 +30,8 @@ use super::{Cycle, Surface};
/// means that all [`HalfEdge`]s that bound a `Face` have the interior of the
/// face on their left side (on the face's front side).
///
/// [`HalfEdge`]: super::HalfEdge
/// [`Shell`]: super::Shell
/// [`HalfEdge`]: crate::objects::HalfEdge
/// [`Shell`]: crate::objects::Shell
#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
pub struct Face {
exterior: Handle<Cycle>,
Expand Down
9 changes: 9 additions & 0 deletions crates/fj-kernel/src/objects/full/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pub mod curve;
pub mod cycle;
pub mod edge;
pub mod face;
pub mod shell;
pub mod sketch;
pub mod solid;
pub mod surface;
pub mod vertex;
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use crate::{builder::ShellBuilder, storage::Handle};

use super::{face::FaceSet, Face, Objects};
use crate::{
builder::ShellBuilder,
objects::{Face, FaceSet, Objects},
storage::Handle,
};

/// A 3-dimensional closed shell
///
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use crate::{builder::SketchBuilder, storage::Handle};

use super::{face::FaceSet, Face, Objects};
use crate::{
builder::SketchBuilder,
objects::{Face, FaceSet, Objects},
storage::Handle,
};

/// A 2-dimensional shape
///
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
use std::collections::BTreeSet;

use crate::{builder::SolidBuilder, storage::Handle};

use super::{Face, Objects, Shell};
use crate::{
builder::SolidBuilder,
objects::{Face, Objects, Shell},
storage::Handle,
};

/// A 3-dimensional shape
///
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
use fj_math::Point;

use crate::{get::Get, storage::Handle};

use super::{Curve, GlobalCurve, Surface};
use crate::{
get::Get,
objects::{Curve, GlobalCurve, Surface},
storage::Handle,
};

/// A vertex
///
Expand Down
Loading