Skip to main content

agreeing_orientation

Function agreeing_orientation 

Source
pub fn agreeing_orientation(
    model: &Model,
    faces: &[Shape],
) -> OgeomResult<Option<Agreement>>
Expand description

Which of faces to turn so that every edge two of them share is walked once each way, or None where no turning does (a band with a half twist).

Each face keeps its material on the left of its rings, so two faces sharing an edge agree where they walk it opposite ways, and a face that walks it the way its neighbour does is turned against it. The faces are oriented breadth first over their shared edges from a seed, and each run of them keeps the orientation most of its faces already have (its first face’s on a tie). An edge with one face or more than two, a degenerate edge and a seam walked both ways by its one face constrain nothing. Nothing is measured: the answer is the topology’s.

§Errors

OgeomError::Dangling if a face is not in model.