This module contains predicates operating on vertices (0D elements) and polylines (1D elements). It is also intended to be a collection of examples for predicate definition in Python.
User-defined predicates inherit one of the following base classes, depending on the object type (0D or 1D) to operate on and the arity (unary or binary):
Class hierarchy: freestyle.types.UnaryPredicate1D > ContourUP1D
Returns true if the Interface1D is a contour. An Interface1D is a contour if it is borded by a different shape on each of its sides.
Parameters: | inter (freestyle.types.Interface1D) – An Interface1D object. |
---|---|
Returns: | True if the Interface1D is a contour, false otherwise. |
Return type: | bool |
Class hierarchy: freestyle.types.UnaryPredicate1D > DensityLowerThanUP1D
Builds a DensityLowerThanUP1D object.
Parameters: |
|
---|
Returns true if the density evaluated for the Interface1D is less than a user-defined density value.
Parameters: | inter (freestyle.types.Interface1D) – An Interface1D object. |
---|---|
Returns: | True if the density is lower than a threshold. |
Return type: | bool |
Class hierarchy: freestyle.types.UnaryPredicate1D > freestyle.types.EqualToChainingTimeStampUP1D
Builds a EqualToChainingTimeStampUP1D object.
Parameters: | ts (int) – A time stamp value. |
---|
Returns true if the Interface1D’s time stamp is equal to a certain user-defined value.
Parameters: | inter (freestyle.types.Interface1D) – An Interface1D object. |
---|---|
Returns: | True if the time stamp is equal to a user-defined value. |
Return type: | bool |
Class hierarchy: freestyle.types.UnaryPredicate1D > EqualToTimeStampUP1D
Builds a EqualToTimeStampUP1D object.
Parameters: | ts (int) – A time stamp value. |
---|
Returns true if the Interface1D’s time stamp is equal to a certain user-defined value.
Parameters: | inter (freestyle.types.Interface1D) – An Interface1D object. |
---|---|
Returns: | True if the time stamp is equal to a user-defined value. |
Return type: | bool |
Class hierarchy: freestyle.types.UnaryPredicate1D > ExternalContourUP1D
Returns true if the Interface1D is an external contour. An Interface1D is an external contour if it is borded by no shape on one of its sides.
Parameters: | inter (freestyle.types.Interface1D) – An Interface1D object. |
---|---|
Returns: | True if the Interface1D is an external contour, false otherwise. |
Return type: | bool |
Class hierarchy: freestyle.types.BinaryPredicate1D > FalseBP1D
Always returns false.
Parameters: |
|
---|---|
Returns: | False. |
Return type: | bool |
Class hierarchy: freestyle.types.UnaryPredicate0D > FalseUP0D
Always returns false.
Parameters: | it (freestyle.types.Interface0DIterator) – An Interface0DIterator object. |
---|---|
Returns: | False. |
Return type: | bool |
Class hierarchy: freestyle.types.UnaryPredicate1D > FalseUP1D
Always returns false.
Parameters: | inter (freestyle.types.Interface1D) – An Interface1D object. |
---|---|
Returns: | False. |
Return type: | bool |
Class hierarchy: freestyle.types.BinaryPredicate1D > Length2DBP1D
Returns true if the 2D length of inter1 is less than the 2D length of inter2.
Parameters: |
|
---|---|
Returns: | True or false. |
Return type: | bool |
Class hierarchy: freestyle.types.UnaryPredicate1D > QuantitativeInvisibilityUP1D
Builds a QuantitativeInvisibilityUP1D object.
Parameters: | qi (int) – The Quantitative Invisibility you want the Interface1D to have. |
---|
Returns true if the Quantitative Invisibility evaluated at an Interface1D, using the freestyle.functions.QuantitativeInvisibilityF1D functor, equals a certain user-defined value.
Parameters: | inter (freestyle.types.Interface1D) – An Interface1D object. |
---|---|
Returns: | True if Quantitative Invisibility equals a user-defined value. |
Return type: | bool |
Class hierarchy: freestyle.types.BinaryPredicate1D > SameShapeIdBP1D
Returns true if inter1 and inter2 belong to the same shape.
Parameters: |
|
---|---|
Returns: | True or false. |
Return type: | bool |
Class hierarchy: freestyle.types.UnaryPredicate1D > ShapeUP1D
Builds a ShapeUP1D object.
Parameters: |
|
---|
Returns true if the shape to which the Interface1D belongs to has the same freestyle.types.Id as the one specified by the user.
Parameters: | inter (freestyle.types.Interface1D) – An Interface1D object. |
---|---|
Returns: | True if Interface1D belongs to the shape of the user-specified Id. |
Return type: | bool |
Class hierarchy: freestyle.types.BinaryPredicate1D > TrueBP1D
Always returns true.
Parameters: |
|
---|---|
Returns: | True. |
Return type: | bool |
Class hierarchy: freestyle.types.UnaryPredicate0D > TrueUP0D
Always returns true.
Parameters: | it (freestyle.types.Interface0DIterator) – An Interface0DIterator object. |
---|---|
Returns: | True. |
Return type: | bool |
Class hierarchy: freestyle.types.UnaryPredicate1D > TrueUP1D
Always returns true.
Parameters: | inter (freestyle.types.Interface1D) – An Interface1D object. |
---|---|
Returns: | True. |
Return type: | bool |
Class hierarchy: freestyle.types.BinaryPredicate1D > ViewMapGradientNormBP1D
Builds a ViewMapGradientNormBP1D object.
Parameters: |
|
---|
Returns true if the evaluation of the Gradient norm Function is higher for inter1 than for inter2.
Parameters: |
|
---|---|
Returns: | True or false. |
Return type: | bool |
Class hierarchy: freestyle.types.UnaryPredicate1D > WithinImageBoundaryUP1D
Builds an WithinImageBoundaryUP1D object.
Parameters: |
|
---|
Returns true if the Interface1D intersects with image boundary.
Check whether an Interface0DIterator references a TVertex and is the one that is hidden (inferred from the context).