-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #694 from hannobraun/objects
Move all objects to new `objects` module
- Loading branch information
Showing
32 changed files
with
104 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
crates/fj-kernel/src/topology/builder.rs → crates/fj-kernel/src/builder.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
//! Geometry objects | ||
//! | ||
//! Simplifying a bit, geometry is responsible for where things are, but now how | ||
//! they are related. The types in this module are referred to by the types in | ||
//! [`crate::topology`], which are responsible for defining how objects are | ||
//! related. | ||
//! Miscellaneous geometry code | ||
mod curves; | ||
mod points; | ||
mod surfaces; | ||
|
||
pub use self::{ | ||
curves::Curve, | ||
points::Point, | ||
surfaces::{Surface, SweptCurve}, | ||
}; | ||
pub use self::points::Point; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
crates/fj-kernel/src/topology/cycle.rs → crates/fj-kernel/src/objects/cycle.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
//! Objects of a shape | ||
//! | ||
//! Objects, in Fornjot parlance, are the elements that make up shapes. An | ||
//! object can be simple and just contain data (like, for example, [`Vertex`]), | ||
//! or they can be quite complex and refer to other objects. | ||
//! | ||
//! # Equality | ||
//! | ||
//! Two objects, even if they are distinct and live in different memory | ||
//! locations, are considered equal, if the data they contain and the objects | ||
//! they reference are considered equal. | ||
//! | ||
//! In contrast to that, two [`Handle`]s are considered equal, only if they | ||
//! reference the same object, in the same memory location. This means that two | ||
//! objects can be considered equal, even if the [`Handle`]s they contain are | ||
//! not. | ||
//! | ||
//! Equality is defined like this, two cover two distinct use cases: | ||
//! | ||
//! - If you need to know whether two [`Handle`]s actually refer to the same | ||
//! object in the same [`Shape`], you can compare the [`Handle`]s. | ||
//! - If you only need to check whether two objects look the same, but don't | ||
//! care whether they are in the same shape, compare the objects directly. | ||
//! | ||
//! The second use case is common in test code. | ||
//! | ||
//! # Implementation Note | ||
//! | ||
//! The definition of equality, as detailed above, is overly complex. It is | ||
//! necessary though, due to the way the kernel's core data structures work. | ||
//! Each shape's objects are stored in a distinct [`Shape`] structure, even if | ||
//! there is a high amount of redundancy between those shapes. | ||
//! | ||
//! If there was a single, append-only data structure for all objects in a CAD | ||
//! model, in which objects were immutable, there would be no special definition | ||
//! of equality for objects. Unfortunately, nobody has figured out how to make | ||
//! this work yet. | ||
//! | ||
//! [`Handle`]: crate::shape::Handle | ||
//! [`Shape`]: crate::shape::Shape | ||
mod curves; | ||
mod cycle; | ||
mod edge; | ||
mod face; | ||
mod surfaces; | ||
mod vertex; | ||
|
||
pub use self::{ | ||
curves::Curve, | ||
cycle::Cycle, | ||
edge::{Edge, VerticesOfEdge}, | ||
face::{CyclesInFace, Face}, | ||
surfaces::{Surface, SweptCurve}, | ||
vertex::Vertex, | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.