mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-10 12:58:28 +00:00
Merge pull request #2435 from hannobraun/approx
Make minor improvements in approximation code
This commit is contained in:
commit
f9cb056b8c
@ -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(),
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user