Group related methods

This commit is contained in:
Hanno Braun 2024-10-23 19:43:35 +02:00
parent 721b2d1e8a
commit 01e5ffbd05

View File

@ -180,14 +180,6 @@ impl Geometry {
self.curve.get(curve)
}
/// # Access the geometry generator for the provided curve
pub fn generator_for_curve(
&self,
curve: &Handle<Curve>,
) -> Option<&CurveGeom2> {
self.curve_generators.get(curve)
}
/// # Access the geometry of the provided surface
///
/// ## Panics
@ -199,6 +191,19 @@ impl Geometry {
.expect("Expected geometry of surface to be defined")
}
/// # Access the geometry of the provided vertex
pub fn of_vertex(&self, vertex: &Handle<Vertex>) -> Option<&VertexGeom> {
self.vertex.get(vertex)
}
/// # Access the geometry generator for the provided curve
pub fn generator_for_curve(
&self,
curve: &Handle<Curve>,
) -> Option<&CurveGeom2> {
self.curve_generators.get(curve)
}
/// # Access the geometry generator for the provided surface
pub fn generator_for_surface(
&self,
@ -207,11 +212,6 @@ impl Geometry {
self.surface_generators.get(surface)
}
/// # Access the geometry of the provided vertex
pub fn of_vertex(&self, vertex: &Handle<Vertex>) -> Option<&VertexGeom> {
self.vertex.get(vertex)
}
/// Access the geometry of the xy-plane
pub fn xy_plane(&self) -> &SweptCurve {
self.of_surface(&self.xy_plane)