Update struct field name

This commit is contained in:
Hanno Braun 2024-03-23 11:52:10 +01:00
parent 860a0690b8
commit e40d4f828f
8 changed files with 12 additions and 12 deletions

View File

@ -105,7 +105,7 @@ mod tests {
let d = [0., 1.];
let face =
Face::unbound(core.layers.objects.surfaces.xy_plane(), &mut core)
Face::unbound(core.layers.topology.surfaces.xy_plane(), &mut core)
.update_region(
|region, core| {
region.update_exterior(
@ -145,7 +145,7 @@ mod tests {
let g = [3., 3.];
let h = [3., 1.];
let surface = core.layers.objects.surfaces.xy_plane();
let surface = core.layers.topology.surfaces.xy_plane();
let face = Face::unbound(surface.clone(), &mut core).update_region(
|region, core| {
@ -234,7 +234,7 @@ mod tests {
let d = [1., 1.];
let e = [0., 9.];
let surface = core.layers.objects.surfaces.xy_plane();
let surface = core.layers.topology.surfaces.xy_plane();
let face = Face::unbound(surface.clone(), &mut core).update_region(
|region, core| {

View File

@ -26,7 +26,7 @@ pub struct Layers {
///
/// Manages the stores of topological and geometric objects that make up
/// shapes.
pub objects: Layer<Topology>,
pub topology: Layer<Topology>,
/// The geometry layer
///
@ -51,7 +51,7 @@ impl Layers {
let geometry = Geometry::new(&objects);
Self {
objects: Layer::new(objects),
topology: Layer::new(objects),
geometry: Layer::new(geometry),
validation: Layer::default(),
presentation: Layer::default(),

View File

@ -38,9 +38,9 @@ macro_rules! impl_insert {
type Inserted = Handle<Self>;
fn insert(self, core: &mut Core) -> Self::Inserted {
let handle = core.layers.objects.$store.reserve();
let handle = core.layers.topology.$store.reserve();
let object = (handle.clone(), self).into();
core.layers.objects.insert(
core.layers.topology.insert(
object,
&core.layers.geometry,
&mut core.layers.validation,

View File

@ -49,7 +49,7 @@ mod tests {
let mut core = Core::new();
let valid = Face::circle(
core.layers.objects.surfaces.xy_plane(),
core.layers.topology.surfaces.xy_plane(),
[0., 0.],
1.,
&mut core,

View File

@ -88,7 +88,7 @@ mod tests {
let mut core = Core::new();
let valid = Face::polygon(
core.layers.objects.surfaces.xy_plane(),
core.layers.topology.surfaces.xy_plane(),
[[0., 0.], [3., 0.], [0., 3.]],
&mut core,
)

View File

@ -13,7 +13,7 @@ use fj::{
pub fn model(size: impl Into<Vector<3>>, core: &mut fj::core::Core) -> Solid {
let [x, y, z] = size.into().components;
let bottom_surface = core.layers.objects.surfaces.xy_plane();
let bottom_surface = core.layers.topology.surfaces.xy_plane();
let sweep_path = Vector::from([Scalar::ZERO, Scalar::ZERO, z]);
Sketch::empty()

View File

@ -17,7 +17,7 @@ pub fn model(
height: f64,
core: &mut fj::core::Core,
) -> Solid {
let bottom_surface = core.layers.objects.surfaces.xy_plane();
let bottom_surface = core.layers.topology.surfaces.xy_plane();
let sweep_path = Vector::from([0., 0., height]);
Sketch::empty()

View File

@ -40,7 +40,7 @@ pub fn model(
inner_points.push([x / 2., y / 2.]);
}
let bottom_surface = core.layers.objects.surfaces.xy_plane();
let bottom_surface = core.layers.topology.surfaces.xy_plane();
let sweep_path = Vector::from([0., 0., h]);
Sketch::empty()