mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-27 01:25:52 +00:00
Move fj::Group
within the file
This way, the types in the file are alphabetically sorted again, which makes things easier to find.
This commit is contained in:
parent
dbae52a811
commit
e632bd55ca
@ -20,6 +20,36 @@ impl From<Shape3d> for Shape {
|
||||
}
|
||||
}
|
||||
|
||||
/// A group of two 3-dimensional shapes
|
||||
///
|
||||
/// A group is a collection of disjoint shapes. It is not a union, in that the
|
||||
/// shapes in the group are not allowed to touch or overlap.
|
||||
///
|
||||
/// # Limitations
|
||||
///
|
||||
/// Whether the shapes in the group touch or overlap is not currently checked.
|
||||
#[derive(Clone, Debug)]
|
||||
#[repr(C)]
|
||||
pub struct Group {
|
||||
/// The first of the shapes
|
||||
pub a: Shape3d,
|
||||
|
||||
/// The second of the shapes
|
||||
pub b: Shape3d,
|
||||
}
|
||||
|
||||
impl From<Group> for Shape {
|
||||
fn from(shape: Group) -> Self {
|
||||
Self::Shape3d(Shape3d::Union(Box::new(shape)))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Group> for Shape3d {
|
||||
fn from(shape: Group) -> Self {
|
||||
Self::Union(Box::new(shape))
|
||||
}
|
||||
}
|
||||
|
||||
/// A transformed 3-dimensional shape
|
||||
///
|
||||
/// # Limitations
|
||||
@ -97,33 +127,3 @@ impl From<Sweep> for Shape3d {
|
||||
Self::Sweep(shape)
|
||||
}
|
||||
}
|
||||
|
||||
/// A group of two 3-dimensional shapes
|
||||
///
|
||||
/// A group is a collection of disjoint shapes. It is not a union, in that the
|
||||
/// shapes in the group are not allowed to touch or overlap.
|
||||
///
|
||||
/// # Limitations
|
||||
///
|
||||
/// Whether the shapes in the group touch or overlap is not currently checked.
|
||||
#[derive(Clone, Debug)]
|
||||
#[repr(C)]
|
||||
pub struct Group {
|
||||
/// The first of the shapes
|
||||
pub a: Shape3d,
|
||||
|
||||
/// The second of the shapes
|
||||
pub b: Shape3d,
|
||||
}
|
||||
|
||||
impl From<Group> for Shape {
|
||||
fn from(shape: Group) -> Self {
|
||||
Self::Shape3d(Shape3d::Union(Box::new(shape)))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Group> for Shape3d {
|
||||
fn from(shape: Group) -> Self {
|
||||
Self::Union(Box::new(shape))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user