mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-11 21:38:31 +00:00
Merge pull request #776 from hannobraun/docs
Update some documentation; fix remaining doc warnings
This commit is contained in:
commit
db910c73dc
@ -40,10 +40,7 @@ impl Cycle {
|
|||||||
Cycle { edges }
|
Cycle { edges }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Access the edges that this cycle refers to
|
/// Access this cycle's edges
|
||||||
///
|
|
||||||
/// This is a convenience method that saves the caller from dealing with the
|
|
||||||
/// [`Handle`]s.
|
|
||||||
pub fn edges(&self) -> impl Iterator<Item = Edge> + '_ {
|
pub fn edges(&self) -> impl Iterator<Item = Edge> + '_ {
|
||||||
self.edges.iter().cloned()
|
self.edges.iter().cloned()
|
||||||
}
|
}
|
||||||
|
@ -76,18 +76,12 @@ impl Edge {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Access the curve that the edge refers to
|
/// Access this edge's curve
|
||||||
///
|
|
||||||
/// This is a convenience method that saves the caller from dealing with the
|
|
||||||
/// [`Handle`].
|
|
||||||
pub fn curve(&self) -> Curve<3> {
|
pub fn curve(&self) -> Curve<3> {
|
||||||
self.curve.global()
|
self.curve.global()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Access the vertices that the edge refers to
|
/// Access this edge's vertices
|
||||||
///
|
|
||||||
/// This is a convenience method that saves the caller from dealing with the
|
|
||||||
/// [`Handle`]s.
|
|
||||||
pub fn vertices(&self) -> Option<[Vertex; 2]> {
|
pub fn vertices(&self) -> Option<[Vertex; 2]> {
|
||||||
self.vertices.0
|
self.vertices.0
|
||||||
}
|
}
|
||||||
|
@ -58,31 +58,22 @@ impl Face {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Access the surface that the face refers to
|
/// Access this face's surface
|
||||||
///
|
|
||||||
/// This is a convenience method that saves the caller from dealing with the
|
|
||||||
/// [`Handle`].
|
|
||||||
pub fn surface(&self) -> Surface {
|
pub fn surface(&self) -> Surface {
|
||||||
self.brep().surface()
|
self.brep().surface()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Access the exterior cycles that the face refers to
|
/// Access this face's exterior cycles
|
||||||
///
|
|
||||||
/// This is a convenience method that saves the caller from dealing with the
|
|
||||||
/// [`Handle`]s.
|
|
||||||
pub fn exteriors(&self) -> impl Iterator<Item = Cycle> + '_ {
|
pub fn exteriors(&self) -> impl Iterator<Item = Cycle> + '_ {
|
||||||
self.brep().exteriors()
|
self.brep().exteriors()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Access the interior cycles that the face refers to
|
/// Access this face's interior cycles
|
||||||
///
|
|
||||||
/// This is a convenience method that saves the caller from dealing with the
|
|
||||||
/// [`Handle`]s.
|
|
||||||
pub fn interiors(&self) -> impl Iterator<Item = Cycle> + '_ {
|
pub fn interiors(&self) -> impl Iterator<Item = Cycle> + '_ {
|
||||||
self.brep().interiors()
|
self.brep().interiors()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Access all cycles that the face refers to
|
/// Access all cycles of this face
|
||||||
///
|
///
|
||||||
/// This is equivalent to chaining the iterators returned by
|
/// This is equivalent to chaining the iterators returned by
|
||||||
/// [`Face::exteriors`] and [`Face::interiors`].
|
/// [`Face::exteriors`] and [`Face::interiors`].
|
||||||
@ -132,31 +123,22 @@ pub struct FaceBRep {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl FaceBRep {
|
impl FaceBRep {
|
||||||
/// Access the surface that the face refers to
|
/// Access this face's surface
|
||||||
///
|
|
||||||
/// This is a convenience method that saves the caller from dealing with the
|
|
||||||
/// [`Handle`].
|
|
||||||
pub fn surface(&self) -> Surface {
|
pub fn surface(&self) -> Surface {
|
||||||
self.surface
|
self.surface
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Access the exterior cycles that the face refers to
|
/// Access this face's exterior cycles
|
||||||
///
|
|
||||||
/// This is a convenience method that saves the caller from dealing with the
|
|
||||||
/// [`Handle`]s.
|
|
||||||
pub fn exteriors(&self) -> impl Iterator<Item = Cycle> + '_ {
|
pub fn exteriors(&self) -> impl Iterator<Item = Cycle> + '_ {
|
||||||
self.exteriors.as_local()
|
self.exteriors.as_local()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Access the interior cycles that the face refers to
|
/// Access this face's interior cycles
|
||||||
///
|
|
||||||
/// This is a convenience method that saves the caller from dealing with the
|
|
||||||
/// [`Handle`]s.
|
|
||||||
pub fn interiors(&self) -> impl Iterator<Item = Cycle> + '_ {
|
pub fn interiors(&self) -> impl Iterator<Item = Cycle> + '_ {
|
||||||
self.interiors.as_local()
|
self.interiors.as_local()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Access all cycles that the face refers to
|
/// Access all cycles of this face
|
||||||
///
|
///
|
||||||
/// This is equivalent to chaining the iterators returned by
|
/// This is equivalent to chaining the iterators returned by
|
||||||
/// [`Face::exteriors`] and [`Face::interiors`].
|
/// [`Face::exteriors`] and [`Face::interiors`].
|
||||||
|
@ -16,8 +16,10 @@ use fj_math::Point;
|
|||||||
/// Vertices must be unique within a shape, meaning an identical vertex must not
|
/// Vertices must be unique within a shape, meaning an identical vertex must not
|
||||||
/// exist in the same shape. In the context of vertex uniqueness, points that
|
/// exist in the same shape. In the context of vertex uniqueness, points that
|
||||||
/// are close to each other are considered identical. The minimum distance
|
/// are close to each other are considered identical. The minimum distance
|
||||||
/// between distinct vertices can be configured using
|
/// between distinct vertices can be configured using the respective field in
|
||||||
/// [`Shape::with_minimum_distance`].
|
/// [`ValidationConfig`].
|
||||||
|
///
|
||||||
|
/// [`ValidationConfig`]: crate::validation::ValidationConfig
|
||||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
|
||||||
pub struct GlobalVertex {
|
pub struct GlobalVertex {
|
||||||
position: Point<3>,
|
position: Point<3>,
|
||||||
|
@ -13,17 +13,6 @@
|
|||||||
//!
|
//!
|
||||||
//! Please note that not all of these validation categories are fully
|
//! Please note that not all of these validation categories are fully
|
||||||
//! implemented, as of this writing.
|
//! implemented, as of this writing.
|
||||||
//!
|
|
||||||
//! # Implementation Note
|
|
||||||
//!
|
|
||||||
//! There is an ongoing effort to abolish [`Shape`] and replace it with a much
|
|
||||||
//! simpler data structure:
|
|
||||||
//! <https://github.com/hannobraun/Fornjot/issues/697>
|
|
||||||
//!
|
|
||||||
//! Once completed, this would make structural validation moot, and reduce the
|
|
||||||
//! scope of uniqueness validation.
|
|
||||||
//!
|
|
||||||
//! [`Shape`]: crate::shape::Shape
|
|
||||||
|
|
||||||
mod coherence;
|
mod coherence;
|
||||||
mod uniqueness;
|
mod uniqueness;
|
||||||
@ -39,7 +28,7 @@ use fj_math::Scalar;
|
|||||||
|
|
||||||
use crate::iter::ObjectIters;
|
use crate::iter::ObjectIters;
|
||||||
|
|
||||||
/// Validate the given [`Shape`]
|
/// Validate the given object
|
||||||
pub fn validate<T>(
|
pub fn validate<T>(
|
||||||
object: T,
|
object: T,
|
||||||
config: &ValidationConfig,
|
config: &ValidationConfig,
|
||||||
|
Loading…
Reference in New Issue
Block a user