This module contains chaining iterators used for the chaining operation to construct long strokes by concatenating feature edges according to selected chaining rules. The module is also intended to be a collection of examples for defining chaining iterators in Python.
Class hierarchy: freestyle.types.Iterator > freestyle.types.ViewEdgeIterator > freestyle.types.ChainingIterator > ChainPredicateIterator
A “generic” user-controlled ViewEdge iterator. This iterator is in particular built from a unary predicate and a binary predicate. First, the unary predicate is evaluated for all potential next ViewEdges in order to only keep the ones respecting a certain constraint. Then, the binary predicate is evaluated on the current ViewEdge together with each ViewEdge of the previous selection. The first ViewEdge respecting both the unary predicate and the binary predicate is kept as the next one. If none of the potential next ViewEdge respects these two predicates, None is returned.
Builds a ChainPredicateIterator from a starting ViewEdge and its orientation.
Parameters: |
|
---|
Builds a ChainPredicateIterator from a unary predicate, a binary predicate, a starting ViewEdge and its orientation.
Parameters: |
|
---|
Copy constructor.
Parameters: | brother (ChainPredicateIterator) – A ChainPredicateIterator object. |
---|
Class hierarchy: freestyle.types.Iterator > freestyle.types.ViewEdgeIterator > freestyle.types.ChainingIterator > ChainSilhouetteIterator
A ViewEdge Iterator used to follow ViewEdges the most naturally. For example, it will follow visible ViewEdges of same nature. As soon, as the nature or the visibility changes, the iteration stops (by setting the pointed ViewEdge to 0). In the case of an iteration over a set of ViewEdge that are both Silhouette and Crease, there will be a precedence of the silhouette over the crease criterion.
Builds a ChainSilhouetteIterator from the first ViewEdge used for iteration and its orientation.
Parameters: |
|
---|
Copy constructor.
Parameters: | brother (ChainSilhouetteIterator) – A ChainSilhouetteIterator object. |
---|
Natural chaining iterator that follows the edges of the same nature following the topology of objects, with decreasing priority for silhouettes, then borders, then suggestive contours, then all other edge types. A ViewEdge is only chained once.
Natural chaining iterator that follows the edges of the same nature following the topology of objects, with decreasing priority for silhouettes, then borders, then suggestive contours, then all other edge types.
Builds a pyChainSilhouetteGenericIterator object.
Parameters: |
|
---|
Chains by external contour
Natural chaining iterator with a sketchy multiple touch. It chains the same ViewEdge multiple times to achieve a sketchy effect.
Builds a pySketchyChainSilhouetteIterator object.
Parameters: |
|
---|
Chaining iterator designed for sketchy style. It chaines the same ViewEdge several times in order to produce multiple strokes per ViewEdge.
Chaining iterator that fills small occlusions
Builds a pyFillOcclusionsRelativeChainingIterator object.
Parameters: | percent (float) – The maximul length of the occluded part, expressed in a percentage of the total chain length. |
---|
Chaining iterator that fills small occlusions
Builds a pyFillOcclusionsAbsoluteChainingIterator object.
Parameters: | length (int) – The maximum length of the occluded part in pixels. |
---|
Chaining iterator that fills small occlusions regardless of the selection.
Builds a pyFillOcclusionsAbsoluteAndRelativeChainingIterator object.
Parameters: |
|
---|
Chaining iterator that fills small occlusions regardless of the selection.
Builds a pyFillQi0AbsoluteAndRelativeChainingIterator object.
Parameters: |
|
---|
Natural chaining iterator that follows the edges of the same nature following the topology of objects, with decreasing priority for silhouettes, then borders, then suggestive contours, then all other edge types. It won’t chain the same ViewEdge twice.
Builds a pyNoIdChainSilhouetteIterator object.
Parameters: | stayInSelection (bool) – True if it is allowed to go out of the selection |
---|