Merge pull request #2435 from hannobraun/approx

Make minor improvements in approximation code
This commit is contained in:
Hanno Braun 2024-07-30 20:15:15 +02:00 committed by GitHub
commit f9cb056b8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 15 deletions

View File

@ -72,19 +72,6 @@ pub fn approx_face(
) -> FaceApprox {
let tolerance = tolerance.into();
// Curved faces whose curvature is not fully defined by their edges
// are not supported yet. For that reason, we can fully ignore `face`'s
// `surface` field and just pass the edges to `Self::for_edges`.
//
// An example of a curved face that is supported, is the cylinder. Its
// curvature is fully defined be the edges (circles) that border it. The
// circle approximations are sufficient to triangulate the surface.
//
// An example of a curved face that is currently not supported, and thus
// doesn't need to be handled here, is a sphere. A spherical face would
// would need to provide its own approximation, as the edges that bound
// it have nothing to do with its curvature.
let exterior = approx_cycle(
face.region().exterior().deref(),
face.surface(),

View File

@ -4,7 +4,7 @@
use fj_math::Scalar;
/// A tolerance value
/// # A tolerance value
///
/// A tolerance value is used during approximation. It defines the maximum
/// allowed deviation of the approximation from the actual shape.
@ -12,7 +12,7 @@ use fj_math::Scalar;
/// The `Tolerance` type enforces that the tolerance value is always larger than
/// zero, which is an attribute that the approximation code relies on.
///
/// # Failing [`From`]/[`Into`] implementation
/// ## Failing [`From`]/[`Into`] implementation
///
/// The [`From`]/[`Into`] implementations of tolerance are fallible, which goes
/// against the explicit mandate of those traits, as stated in their