From 65aabb48f9fc40b02db4d7eff3c0bfd2b182670b Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 20 Jan 2023 15:24:56 +0100 Subject: [PATCH] Remove `Vertex` --- crates/fj-kernel/src/objects/full/vertex.rs | 38 --------------------- crates/fj-kernel/src/objects/mod.rs | 2 +- 2 files changed, 1 insertion(+), 39 deletions(-) diff --git a/crates/fj-kernel/src/objects/full/vertex.rs b/crates/fj-kernel/src/objects/full/vertex.rs index b969135b72..1fee8ba057 100644 --- a/crates/fj-kernel/src/objects/full/vertex.rs +++ b/crates/fj-kernel/src/objects/full/vertex.rs @@ -2,44 +2,6 @@ use fj_math::Point; use crate::{objects::Surface, storage::Handle}; -/// A vertex -/// -/// `Vertex` is defined in terms of a 1-dimensional position on a curve. Each -/// `Vertex` has an associated [`SurfaceVertex`], which defines the 2D position -/// on the surface, and a [`GlobalVertex`] which defines the global 3D position. -/// -/// Both can be accessed through [`Vertex::surface_form`]. -#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] -pub struct Vertex { - position: Point<1>, - surface_form: Handle, -} - -impl Vertex { - /// Construct an instance of `Vertex` - pub fn new( - position: impl Into>, - surface_form: Handle, - ) -> Self { - let position = position.into(); - - Self { - position, - surface_form, - } - } - - /// Access the position of the vertex on the curve - pub fn position(&self) -> Point<1> { - self.position - } - - /// Access the surface form of this vertex - pub fn surface_form(&self) -> &Handle { - &self.surface_form - } -} - /// A vertex, defined in surface (2D) coordinates #[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub struct SurfaceVertex { diff --git a/crates/fj-kernel/src/objects/mod.rs b/crates/fj-kernel/src/objects/mod.rs index 6036e2b73c..9fe7e2f9da 100644 --- a/crates/fj-kernel/src/objects/mod.rs +++ b/crates/fj-kernel/src/objects/mod.rs @@ -87,7 +87,7 @@ pub use self::{ sketch::Sketch, solid::Solid, surface::Surface, - vertex::{GlobalVertex, SurfaceVertex, Vertex}, + vertex::{GlobalVertex, SurfaceVertex}, }, object::{Bare, BehindHandle, Form, Object, WithHandle}, stores::{Objects, Surfaces},