Skip to main content

silhouettes

Function silhouettes 

Source
pub fn silhouettes(
    model: &Model,
    shape: &Shape,
    direction: Vector,
    tol: Tolerances,
) -> OgeomResult<Vec<Silhouette>>
Expand description

The exact silhouettes of a shape, seen along direction.

A silhouette is the locus where the surface normal is perpendicular to the view: for a sphere the great circle whose plane the direction is normal to, for a cylinder the two rulings furthest to either side, for a cone the two rulings through its apex where the same holds. Planes have none (a plane either faces the eye or does not), and a face whose surface has no closed-form silhouette has it marched and fitted, within a hundred times the confusion distance of the true silhouette along its whole length.

Each curve comes back trimmed to the stretch that lies within its own face, decided by sampling the face’s trim, so a silhouette on a face that was cut away is absent rather than drawn through thin air.

§Errors

OgeomError::Construction if the direction has no length. A marched silhouette whose walk fails, or that no fit holds to its chord, contributes no curve.