Updated Freestyle API modules according to the new hierarchical package structure.

Additional bug fixes were also done along with the code updates:
* Fix for the use of old Interface1D.pointsBegin() and .pointsEnd() method names
in the definition of pyDensityAnisotropyF1D and pyViewMapGradientNormF1D.
* Fix for wrong data types (int instead of bool) for:
- pyChainSilhouetteGenericIterator constructor and its .orientation property in
modules/freestyle/chainingiterators.py.
- SpatialNoiseShader constructor in styles/external_contour_sketchy.py.
- ChainSilhouetteIterator constructor in styles/multiple_parameterization.py.
This commit is contained in:
Tamito Kajiyama 2013-11-24 22:18:38 +00:00
parent 6498b96ce7
commit 54e9016770
44 changed files with 714 additions and 217 deletions

@ -26,6 +26,11 @@ from _freestyle import (
from freestyle.types import (
AdjacencyIterator,
ChainingIterator,
Nature,
TVertex,
)
from freestyle.predicates import (
ExternalContourUP1D,
)
from freestyle.utils import ContextFunctions as CF
import bpy
@ -283,7 +288,7 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator):
self._length = 0
def traverse(self, iter):
winner = None
winnerOrientation = 0
winnerOrientation = False
#print(self.current_edge.id.first, self.current_edge.id.second)
it = AdjacencyIterator(iter)
tvertex = self.next_vertex
@ -294,9 +299,9 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator):
if ve.id == mateVE.id:
winner = ve
if not it.is_incoming:
winnerOrientation = 1
winnerOrientation = True
else:
winnerOrientation = 0
winnerOrientation = False
break
it.increment()
else:
@ -311,9 +316,9 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator):
count = count+1
winner = ve
if not it.is_incoming:
winnerOrientation = 1
winnerOrientation = True
else:
winnerOrientation = 0
winnerOrientation = False
it.increment()
if count != 1:
winner = None
@ -328,7 +333,7 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator):
# Did we compute the prospective chain length already ?
if self._length == 0:
#if not, let's do it
_it = pyChainSilhouetteGenericIterator(0,0)
_it = pyChainSilhouetteGenericIterator(False, False)
_it.begin = winner
_it.current_edge = winner
_it.orientation = winnerOrientation
@ -354,7 +359,7 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator):
# let's do the comparison:
# nw let's compute the length of this connex non selected part:
connexl = 0
_cit = pyChainSilhouetteGenericIterator(0,0)
_cit = pyChainSilhouetteGenericIterator(False, False)
_cit.begin = winner
_cit.current_edge = winner
_cit.orientation = winnerOrientation
@ -380,7 +385,7 @@ class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator):
pass
def traverse(self, iter):
winner = None
winnerOrientation = 0
winnerOrientation = False
#print(self.current_edge.id.first, self.current_edge.id.second)
it = AdjacencyIterator(iter)
tvertex = self.next_vertex
@ -391,9 +396,9 @@ class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator):
if ve.id == mateVE.id:
winner = ve
if not it.is_incoming:
winnerOrientation = 1
winnerOrientation = True
else:
winnerOrientation = 0
winnerOrientation = False
break
it.increment()
else:
@ -408,9 +413,9 @@ class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator):
count = count+1
winner = ve
if not it.is_incoming:
winnerOrientation = 1
winnerOrientation = True
else:
winnerOrientation = 0
winnerOrientation = False
it.increment()
if count != 1:
winner = None
@ -421,7 +426,7 @@ class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator):
#print("---", winner.id.first, winner.id.second)
# nw let's compute the length of this connex non selected part:
connexl = 0
_cit = pyChainSilhouetteGenericIterator(0,0)
_cit = pyChainSilhouetteGenericIterator(False, False)
_cit.begin = winner
_cit.current_edge = winner
_cit.orientation = winnerOrientation
@ -453,7 +458,7 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
self._length = 0
def traverse(self, iter):
winner = None
winnerOrientation = 0
winnerOrientation = False
#print(self.current_edge.id.first, self.current_edge.id.second)
it = AdjacencyIterator(iter)
tvertex = self.next_vertex
@ -464,9 +469,9 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
if ve.id == mateVE.id:
winner = ve
if not it.is_incoming:
winnerOrientation = 1
winnerOrientation = True
else:
winnerOrientation = 0
winnerOrientation = False
break
it.increment()
else:
@ -481,9 +486,9 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
count = count+1
winner = ve
if not it.is_incoming:
winnerOrientation = 1
winnerOrientation = True
else:
winnerOrientation = 0
winnerOrientation = False
it.increment()
if count != 1:
winner = None
@ -498,7 +503,7 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
# Did we compute the prospective chain length already ?
if self._length == 0:
#if not, let's do it
_it = pyChainSilhouetteGenericIterator(0,0)
_it = pyChainSilhouetteGenericIterator(False, False)
_it.begin = winner
_it.current_edge = winner
_it.orientation = winnerOrientation
@ -524,7 +529,7 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
# let's do the comparison:
# nw let's compute the length of this connex non selected part:
connexl = 0
_cit = pyChainSilhouetteGenericIterator(0,0)
_cit = pyChainSilhouetteGenericIterator(False, False)
_cit.begin = winner
_cit.current_edge = winner
_cit.orientation = winnerOrientation
@ -556,7 +561,7 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
self._length = 0
def traverse(self, iter):
winner = None
winnerOrientation = 0
winnerOrientation = False
#print(self.current_edge.id.first, self.current_edge.id.second)
it = AdjacencyIterator(iter)
tvertex = self.next_vertex
@ -567,9 +572,9 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
if ve.id == mateVE.id:
winner = ve
if not it.is_incoming:
winnerOrientation = 1
winnerOrientation = True
else:
winnerOrientation = 0
winnerOrientation = False
break
it.increment()
else:
@ -584,9 +589,9 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
count = count+1
winner = ve
if not it.is_incoming:
winnerOrientation = 1
winnerOrientation = True
else:
winnerOrientation = 0
winnerOrientation = False
it.increment()
if count != 1:
winner = None
@ -601,7 +606,7 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
# Did we compute the prospective chain length already ?
if self._length == 0:
#if not, let's do it
_it = pyChainSilhouetteGenericIterator(0,0)
_it = pyChainSilhouetteGenericIterator(False, False)
_it.begin = winner
_it.current_edge = winner
_it.orientation = winnerOrientation
@ -627,7 +632,7 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
# let's do the comparison:
# nw let's compute the length of this connex non selected part:
connexl = 0
_cit = pyChainSilhouetteGenericIterator(0,0)
_cit = pyChainSilhouetteGenericIterator(False, False)
_cit.begin = winner
_cit.current_edge = winner
_cit.orientation = winnerOrientation

@ -73,6 +73,7 @@ from _freestyle import (
# modules for implementing functions
from freestyle.types import (
CurvePoint,
IntegrationType,
UnaryFunction0DDouble,
UnaryFunction0DMaterial,
@ -80,6 +81,7 @@ from freestyle.types import (
UnaryFunction1DDouble,
)
from freestyle.utils import ContextFunctions as CF
from freestyle.utils import integrate
import math
import mathutils
@ -183,7 +185,7 @@ class pyDensityAnisotropyF1D(UnaryFunction1DDouble):
self._integration = integrationType
self._sampling = sampling
def __call__(self, inter):
v = integrate(self._func, inter.pointsBegin(self._sampling), inter.pointsEnd(self._sampling), self._integration)
v = integrate(self._func, inter.points_begin(self._sampling), inter.points_end(self._sampling), self._integration)
return v
class pyViewMapGradientNormF1D(UnaryFunction1DDouble):
@ -193,5 +195,5 @@ class pyViewMapGradientNormF1D(UnaryFunction1DDouble):
self._integration = integrationType
self._sampling = sampling
def __call__(self, inter):
v = integrate(self._func, inter.pointsBegin(self._sampling), inter.pointsEnd(self._sampling), self._integration)
v = integrate(self._func, inter.points_begin(self._sampling), inter.points_end(self._sampling), self._integration)
return v

@ -39,12 +39,27 @@ from _freestyle import (
# modules for implementing predicates
from freestyle.types import (
IntegrationType,
BinaryPredicate1D,
IntegrationType,
Nature,
TVertex,
UnaryPredicate0D,
UnaryPredicate1D,
)
from freestyle.functions import (
Curvature2DAngleF0D,
CurveNatureF1D,
DensityF1D,
GetCompleteViewMapDensityF1D,
GetCurvilinearAbscissaF0D,
GetDirectionalViewMapDensityF1D,
GetOccludersF1D,
GetProjectedZF1D,
GetShapeF1D,
GetSteerableViewMapDensityF1D,
GetZF1D,
QuantitativeInvisibilityF0D,
ZDiscontinuityF1D,
pyCurvilinearLengthF0D,
pyDensityAnisotropyF1D,
pyViewMapGradientNormF1D,

@ -48,8 +48,26 @@ from _freestyle import (
)
# modules for implementing shaders
from freestyle.types import StrokeShader
from freestyle.predicates import pyVertexNatureUP0D
from freestyle.types import (
Interface0DIterator,
Nature,
Noise,
StrokeAttribute,
StrokeShader,
StrokeVertexIterator,
)
from freestyle.functions import (
Curvature2DAngleF0D,
DensityF0D,
GetProjectedZF0D,
MaterialF0D,
Normal2DF0D,
Orientation2DF1D,
ZDiscontinuityF0D,
)
from freestyle.predicates import (
pyVertexNatureUP0D,
)
from freestyle.utils import ContextFunctions as CF
import math
import mathutils

@ -21,25 +21,71 @@
# Date : 26/07/2010
# Purpose : Interactive manipulation of stylization parameters
import freestyle
from freestyle import Operators
from freestyle.types import (
BinaryPredicate1D,
Interface0DIterator,
Nature,
Noise,
StrokeAttribute,
UnaryPredicate0D,
UnaryPredicate1D,
TVertex,
)
from freestyle.chainingiterators import (
ChainPredicateIterator,
ChainSilhouetteIterator,
pySketchyChainSilhouetteIterator,
pySketchyChainingIterator,
)
from freestyle.functions import (
Curvature2DAngleF0D,
CurveMaterialF0D,
Normal2DF0D,
QuantitativeInvisibilityF1D,
VertexOrientation2DF0D,
)
from freestyle.predicates import (
AndUP1D,
ContourUP1D,
ExternalContourUP1D,
FalseBP1D,
FalseUP1D,
NotUP1D,
OrUP1D,
QuantitativeInvisibilityUP1D,
TrueBP1D,
TrueUP1D,
WithinImageBoundaryUP1D,
pyNatureUP1D,
)
from freestyle.shaders import (
BackboneStretcherShader,
BezierCurveShader,
ConstantColorShader,
GuidingLinesShader,
PolygonalizationShader,
SamplingShader,
SpatialNoiseShader,
StrokeShader,
TipRemoverShader,
pyBluePrintCirclesShader,
pyBluePrintEllipsesShader,
pyBluePrintSquaresShader,
)
from freestyle.utils import (
ContextFunctions,
getCurrentScene,
)
from _freestyle import (
blendRamp,
evaluateColorRamp,
evaluateCurveMappingF,
)
import math
import mathutils
import time
from _freestyle import blendRamp, evaluateColorRamp, evaluateCurveMappingF
from ChainingIterators import pySketchyChainSilhouetteIterator, pySketchyChainingIterator
from freestyle import BackboneStretcherShader, BezierCurveShader, BinaryPredicate1D, ChainPredicateIterator, \
ChainSilhouetteIterator, ConstantColorShader, ContourUP1D, Curvature2DAngleF0D, ExternalContourUP1D, \
FalseBP1D, FalseUP1D, GuidingLinesShader, Interface0DIterator, Nature, Noise, Normal2DF0D, Operators, \
PolygonalizationShader, QuantitativeInvisibilityF1D, QuantitativeInvisibilityUP1D, SamplingShader, \
SpatialNoiseShader, StrokeAttribute, StrokeShader, TipRemoverShader, TrueBP1D, TrueUP1D, UnaryPredicate0D, \
UnaryPredicate1D, VertexOrientation2DF0D, WithinImageBoundaryUP1D, ContextFunctions, TVertex
from Functions0D import CurveMaterialF0D
from PredicatesU1D import pyNatureUP1D
from logical_operators import AndUP1D, NotUP1D, OrUP1D
from shaders import pyBluePrintCirclesShader, pyBluePrintEllipsesShader, pyBluePrintSquaresShader
class ColorRampModifier(StrokeShader):
def __init__(self, blend, influence, ramp):
@ -49,12 +95,12 @@ class ColorRampModifier(StrokeShader):
self.__ramp = ramp
def evaluate(self, t):
col = freestyle.evaluateColorRamp(self.__ramp, t)
col = evaluateColorRamp(self.__ramp, t)
col = col.xyz # omit alpha
return col
def blend_ramp(self, a, b):
return freestyle.blendRamp(self.__blend, a, self.__influence, b)
return blendRamp(self.__blend, a, self.__influence, b)
class ScalarBlendModifier(StrokeShader):
@ -106,7 +152,7 @@ class CurveMappingModifier(ScalarBlendModifier):
return t
def CURVE(self, t):
return freestyle.evaluateCurveMappingF(self.__curve, 0, t)
return evaluateCurveMappingF(self.__curve, 0, t)
def evaluate(self, t):
return self.__mapping(t)
@ -114,7 +160,7 @@ class CurveMappingModifier(ScalarBlendModifier):
class ThicknessModifierMixIn:
def __init__(self):
scene = freestyle.getCurrentScene()
scene = getCurrentScene()
self.__persp_camera = (scene.camera.data.type == 'PERSP')
def set_thickness(self, sv, outer, inner):
@ -312,7 +358,7 @@ class ThicknessDistanceFromCameraShader(ThicknessBlenderMixIn, CurveMappingModif
# Distance from Object modifiers
def iter_distance_from_object(stroke, object, range_min, range_max):
scene = freestyle.getCurrentScene()
scene = getCurrentScene()
mv = scene.camera.matrix_world.copy() # model-view matrix
mv.invert()
loc = mv * object.location # loc in the camera coordinate
@ -1114,7 +1160,7 @@ class StrokeCleaner(StrokeShader):
# main function for parameter processing
def process(layer_name, lineset_name):
scene = freestyle.getCurrentScene()
scene = getCurrentScene()
layer = scene.render.layers[layer_name]
lineset = layer.freestyle_settings.linesets[lineset_name]
linestyle = lineset.linestyle

@ -21,10 +21,24 @@
# Date : 12/08/2004
# Purpose : Smoothes lines using an anisotropic diffusion scheme
from freestyle import ChainPredicateIterator, ConstantThicknessShader, ExternalContourUP1D, IncreasingColorShader, \
Operators, QuantitativeInvisibilityUP1D, SamplingShader, Stroke, StrokeTextureShader, TrueBP1D, TrueUP1D
from logical_operators import AndUP1D, NotUP1D
from shaders import pyDiffusion2Shader
from freestyle import Operators
from freestyle.types import Stroke
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
ExternalContourUP1D,
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueBP1D,
TrueUP1D,
)
from freestyle.shaders import (
ConstantThicknessShader,
IncreasingColorShader,
SamplingShader,
StrokeTextureShader,
pyDiffusion2Shader,
)
# pyDiffusion2Shader parameters
offset = 0.25

@ -23,10 +23,21 @@
# subjects them to the causal density so as to avoid
# cluttering
from freestyle import ChainPredicateIterator, ConstantColorShader, ConstantThicknessShader, IntegrationType, \
Operators, QuantitativeInvisibilityUP1D, TrueBP1D
from PredicatesU1D import pyDensityUP1D, pyHighViewMapDensityUP1D
from logical_operators import AndUP1D, NotUP1D
from freestyle import Operators
from freestyle.types import IntegrationType
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueBP1D,
pyDensityUP1D,
pyHighViewMapDensityUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
)
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyHighViewMapDensityUP1D(0.3, IntegrationType.LAST))
Operators.select(upred)

@ -21,10 +21,20 @@
# Date : 04/08/2005
# Purpose : Draws lines having a high a priori density
from freestyle import ChainPredicateIterator, ConstantColorShader, ConstantThicknessShader, Operators, \
QuantitativeInvisibilityUP1D, TrueBP1D, TrueUP1D
from PredicatesU1D import pyHighViewMapDensityUP1D
from logical_operators import AndUP1D, NotUP1D
from freestyle import Operators
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueBP1D,
TrueUP1D,
pyHighViewMapDensityUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
)
Operators.select(AndUP1D(QuantitativeInvisibilityUP1D(0), pyHighViewMapDensityUP1D(0.1,5)))
bpred = TrueBP1D()

@ -21,9 +21,18 @@
# Date : 04/08/2005
# Purpose : Stretches the geometry of visible lines
from freestyle import BackboneStretcherShader, ChainSilhouetteIterator, ConstantColorShader, \
Operators, QuantitativeInvisibilityUP1D, TextureAssignerShader, TrueUP1D
from logical_operators import NotUP1D
from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
BackboneStretcherShader,
ConstantColorShader,
TextureAssignerShader,
)
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))

@ -21,11 +21,24 @@
# Date : 04/08/2005
# Purpose : Produces a blueprint using circular contour strokes
from freestyle import ChainPredicateIterator, ConstantThicknessShader, ContourUP1D, IncreasingColorShader, \
Operators, QuantitativeInvisibilityUP1D, SameShapeIdBP1D, TextureAssignerShader, TrueUP1D
from PredicatesU1D import pyHigherLengthUP1D
from logical_operators import AndUP1D, NotUP1D
from shaders import pyBluePrintCirclesShader, pyPerlinNoise1DShader
from freestyle import Operators
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
ContourUP1D,
NotUP1D,
QuantitativeInvisibilityUP1D,
SameShapeIdBP1D,
TrueUP1D,
pyHigherLengthUP1D,
)
from freestyle.shaders import (
ConstantThicknessShader,
IncreasingColorShader,
TextureAssignerShader,
pyBluePrintCirclesShader,
pyPerlinNoise1DShader,
)
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D())
bpred = SameShapeIdBP1D()

@ -21,11 +21,24 @@
# Date : 04/08/2005
# Purpose : Produces a blueprint using elliptic contour strokes
from freestyle import ChainPredicateIterator, ConstantThicknessShader, ContourUP1D, IncreasingColorShader, \
Operators, QuantitativeInvisibilityUP1D, SameShapeIdBP1D, TextureAssignerShader, TrueUP1D
from PredicatesU1D import pyHigherLengthUP1D
from logical_operators import AndUP1D, NotUP1D
from shaders import pyBluePrintEllipsesShader, pyPerlinNoise1DShader
from freestyle import Operators
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
ContourUP1D,
NotUP1D,
QuantitativeInvisibilityUP1D,
SameShapeIdBP1D,
TrueUP1D,
pyHigherLengthUP1D,
)
from freestyle.shaders import (
ConstantThicknessShader,
IncreasingColorShader,
TextureAssignerShader,
pyBluePrintEllipsesShader,
pyPerlinNoise1DShader,
)
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D())
bpred = SameShapeIdBP1D()

@ -21,11 +21,24 @@
# Date : 04/08/2005
# Purpose : Produces a blueprint using square contour strokes
from freestyle import ChainPredicateIterator, ConstantThicknessShader, ContourUP1D, IncreasingColorShader, \
Operators, QuantitativeInvisibilityUP1D, SameShapeIdBP1D, TextureAssignerShader, TrueUP1D
from PredicatesU1D import pyHigherLengthUP1D
from logical_operators import AndUP1D, NotUP1D
from shaders import pyBluePrintSquaresShader, pyPerlinNoise1DShader
from freestyle import Operators
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
ContourUP1D,
NotUP1D,
QuantitativeInvisibilityUP1D,
SameShapeIdBP1D,
TrueUP1D,
pyHigherLengthUP1D,
)
from freestyle.shaders import (
ConstantThicknessShader,
IncreasingColorShader,
TextureAssignerShader,
pyBluePrintSquaresShader,
pyPerlinNoise1DShader,
)
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D())
bpred = SameShapeIdBP1D()

@ -23,10 +23,18 @@
# infered from each object's material in a cartoon-like
# fashion.
from freestyle import BezierCurveShader, ChainSilhouetteIterator, ConstantThicknessShader, Operators, \
QuantitativeInvisibilityUP1D, TrueUP1D
from logical_operators import NotUP1D
from shaders import pyMaterialColorShader
from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
BezierCurveShader,
ConstantThicknessShader,
pyMaterialColorShader,
)
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))

@ -21,9 +21,20 @@
# Date : 04/08/2005
# Purpose : Draws each object's visible contour
from freestyle import ChainPredicateIterator, ConstantThicknessShader, ContourUP1D, IncreasingColorShader, \
Operators, QuantitativeInvisibilityUP1D, SameShapeIdBP1D, TrueUP1D
from logical_operators import AndUP1D, NotUP1D
from freestyle import Operators
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
ContourUP1D,
NotUP1D,
QuantitativeInvisibilityUP1D,
SameShapeIdBP1D,
TrueUP1D,
)
from freestyle.shaders import (
ConstantThicknessShader,
IncreasingColorShader,
)
Operators.select(AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D()))
bpred = SameShapeIdBP1D()

@ -22,10 +22,19 @@
# Purpose : The stroke points are colored in gray levels and depending
# on the 2d curvature value
from freestyle import ChainSilhouetteIterator, ConstantThicknessShader, Operators, \
QuantitativeInvisibilityUP1D, Stroke, StrokeTextureShader, TrueUP1D
from logical_operators import NotUP1D
from shaders import py2DCurvatureColorShader
from freestyle import Operators
from freestyle.types import Stroke
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
ConstantThicknessShader,
StrokeTextureShader,
py2DCurvatureColorShader,
)
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))

@ -21,9 +21,20 @@
# Date : 04/08/2005
# Purpose : Draws the external contour of the scene
from freestyle import ChainPredicateIterator, ConstantColorShader, ConstantThicknessShader, \
ExternalContourUP1D, Operators, QuantitativeInvisibilityUP1D, TrueBP1D, TrueUP1D
from logical_operators import AndUP1D, NotUP1D
from freestyle import Operators
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
ExternalContourUP1D,
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueBP1D,
TrueUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
)
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D())
Operators.select(upred)

@ -23,18 +23,30 @@
# chaining iterator (in particular each ViewEdge can be drawn
# several times
from ChainingIterators import pySketchyChainingIterator
from freestyle import ExternalContourUP1D, IncreasingColorShader, IncreasingThicknessShader, \
Operators, QuantitativeInvisibilityUP1D, SamplingShader, SmoothingShader, SpatialNoiseShader, \
TextureAssignerShader, TrueUP1D
from logical_operators import AndUP1D, NotUP1D
from freestyle import Operators
from freestyle.chainingiterators import pySketchyChainingIterator
from freestyle.predicates import (
AndUP1D,
ExternalContourUP1D,
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
IncreasingColorShader,
IncreasingThicknessShader,
SamplingShader,
SmoothingShader,
SpatialNoiseShader,
TextureAssignerShader,
)
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D())
Operators.select(upred)
Operators.bidirectional_chain(pySketchyChainingIterator(), NotUP1D(upred))
shaders_list = [
SamplingShader(4),
SpatialNoiseShader(10, 150, 2, 1, 1),
SpatialNoiseShader(10, 150, 2, True, True),
IncreasingThicknessShader(4, 10),
SmoothingShader(400, 0.1, 0, 0.2, 0, 0, 0, 1),
IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1),

@ -21,10 +21,22 @@
# Date : 04/08/2005
# Purpose : Draws a smooth external contour
from freestyle import ChainPredicateIterator, ExternalContourUP1D, IncreasingColorShader, \
IncreasingThicknessShader, Operators, QuantitativeInvisibilityUP1D, SamplingShader, \
SmoothingShader, TrueBP1D, TrueUP1D
from logical_operators import AndUP1D, NotUP1D
from freestyle import Operators
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
ExternalContourUP1D,
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueBP1D,
TrueUP1D,
)
from freestyle.shaders import (
IncreasingColorShader,
IncreasingThicknessShader,
SamplingShader,
SmoothingShader,
)
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D())
Operators.select(upred)

@ -24,11 +24,23 @@
# object and trims them in order to produce
# a haloing effect around the target shape
from freestyle import ChainSilhouetteIterator, Id, IncreasingColorShader, IncreasingThicknessShader, \
Operators, QuantitativeInvisibilityUP1D, SamplingShader, TipRemoverShader, TrueUP1D
from PredicatesU1D import pyIsOccludedByUP1D
from logical_operators import AndUP1D, NotUP1D
from shaders import pyTVertexRemoverShader
from freestyle import Operators
from freestyle.types import Id
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
AndUP1D,
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
pyIsOccludedByUP1D,
)
from freestyle.shaders import (
IncreasingColorShader,
IncreasingThicknessShader,
SamplingShader,
TipRemoverShader,
pyTVertexRemoverShader,
)
# id corresponds to the id of the target object
# (accessed by SHIFT+click)

@ -21,9 +21,17 @@
# Date : 04/08/2005
# Purpose : The strokes are drawn through small occlusions
from ChainingIterators import pyFillOcclusionsAbsoluteChainingIterator
from freestyle import ConstantColorShader, ConstantThicknessShader, Operators, \
QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
from freestyle import Operators
from freestyle.chainingiterators import pyFillOcclusionsAbsoluteChainingIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
)
Operators.select(QuantitativeInvisibilityUP1D(0))
#Operators.bidirectional_chain(pyFillOcclusionsChainingIterator(0.1))

@ -22,9 +22,18 @@
# Purpose : Draws all lines whose Quantitative Invisibility
# is different from 0
from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
Operators, QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
from logical_operators import NotUP1D
from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
)
upred = NotUP1D(QuantitativeInvisibilityUP1D(0))
Operators.select(upred)

@ -21,15 +21,29 @@
# Date : 04/08/2005
# Purpose : Simulates a big brush fr oriental painting
from freestyle import BezierCurveShader, ChainSilhouetteIterator, ConstantColorShader, \
ConstantThicknessShader, IntegrationType, Operators, QuantitativeInvisibilityUP1D, \
SamplingShader, TextureAssignerShader, TipRemoverShader
from Functions0D import pyInverseCurvature2DAngleF0D
from PredicatesB1D import pyLengthBP1D
from PredicatesU0D import pyParameterUP0D
from PredicatesU1D import pyDensityUP1D, pyHigherLengthUP1D, pyHigherNumberOfTurnsUP1D
from logical_operators import NotUP1D
from shaders import pyNonLinearVaryingThicknessShader, pySamplingShader
from freestyle import Operators
from freestyle.types import IntegrationType
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.functions import pyInverseCurvature2DAngleF0D
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
pyDensityUP1D,
pyHigherLengthUP1D,
pyHigherNumberOfTurnsUP1D,
pyLengthBP1D,
pyParameterUP0D,
)
from freestyle.shaders import (
BezierCurveShader,
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
TextureAssignerShader,
TipRemoverShader,
pyNonLinearVaryingThicknessShader,
pySamplingShader,
)
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))

@ -28,11 +28,23 @@
# ******** The Directional a priori density maps must ******
# ******** have been computed prior to using this style module ******
from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, DensityF1D, \
IntegrationType, Operators, QuantitativeInvisibilityUP1D, SamplingShader, UnaryPredicate1D
from PredicatesB1D import pyLengthBP1D
from PredicatesU1D import pyHighDensityAnisotropyUP1D, pyHigherLengthUP1D
from logical_operators import NotUP1D
from freestyle import Operators
from freestyle.types import IntegrationType
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.functions import DensityF1D
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
UnaryPredicate1D,
pyHighDensityAnisotropyUP1D,
pyHigherLengthUP1D,
pyLengthBP1D,
)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
)
## custom density predicate
class pyDensityUP1D(UnaryPredicate1D):

@ -27,15 +27,25 @@
# the strokes using a second parameterization that only
# covers the visible portions.
from freestyle import ChainSilhouetteIterator, ConstantColorShader, IncreasingColorShader, \
IncreasingThicknessShader, Operators, QuantitativeInvisibilityUP1D, SamplingShader, \
TextureAssignerShader, TrueUP1D
from shaders import pyHLRShader
from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
IncreasingColorShader,
IncreasingThicknessShader,
SamplingShader,
TextureAssignerShader,
pyHLRShader,
)
Operators.select(QuantitativeInvisibilityUP1D(0))
## Chain following the same nature, but without the restriction
## of staying inside the selection (0).
Operators.bidirectional_chain(ChainSilhouetteIterator(0))
## of staying inside the selection (False).
Operators.bidirectional_chain(ChainSilhouetteIterator(False))
shaders_list = [
SamplingShader(20),
IncreasingThicknessShader(1.5, 30),

@ -25,10 +25,18 @@
# The suggestive contours must have been enabled in the
# options dialog to appear in the View Map.
from freestyle import ChainSilhouetteIterator, IncreasingColorShader, \
IncreasingThicknessShader, Nature, Operators, TrueUP1D
from PredicatesU1D import pyNatureUP1D
from logical_operators import NotUP1D
from freestyle import Operators
from freestyle.types import Nature
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
TrueUP1D,
pyNatureUP1D,
)
from freestyle.shaders import (
IncreasingColorShader,
IncreasingThicknessShader,
)
Operators.select(pyNatureUP1D(Nature.SILHOUETTE))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(pyNatureUP1D(Nature.SILHOUETTE)))

@ -22,10 +22,21 @@
# Purpose : Draws the lines that are "closer" than a threshold
# (between 0 and 1)
from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
IntegrationType, Operators, QuantitativeInvisibilityUP1D, TextureAssignerShader, TrueUP1D
from PredicatesU1D import pyZSmallerUP1D
from logical_operators import AndUP1D, NotUP1D
from freestyle import Operators
from freestyle.types import IntegrationType
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
AndUP1D,
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
pyZSmallerUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
TextureAssignerShader,
)
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyZSmallerUP1D(0.5, IntegrationType.MEAN))
Operators.select(upred)

@ -21,10 +21,21 @@
# Date : 04/08/2005
# Purpose : Draws only the lines that are occluded by a given object
from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
Id, Operators, QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
from PredicatesU1D import pyIsInOccludersListUP1D
from logical_operators import AndUP1D, NotUP1D
from freestyle import Operators
from freestyle.types import Id
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
AndUP1D,
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
pyIsInOccludersListUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
)
## the id of the occluder (use SHIFT+click on the ViewMap to
## retrieve ids)

@ -21,9 +21,19 @@
# Date : 04/08/2005
# Purpose : Make the strokes more "polygonal"
from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
Operators, PolygonalizationShader, QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
from logical_operators import NotUP1D
from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
PolygonalizationShader,
SamplingShader,
)
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))

@ -22,9 +22,18 @@
# Purpose : Draws the visible lines (chaining follows same nature lines)
# (most basic style module)
from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
Operators, QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
from logical_operators import NotUP1D
from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
)
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))

@ -22,10 +22,23 @@
# Purpose : Draws the visible lines (chaining follows same nature lines)
# that do not belong to the external contour of the scene
from freestyle import BackboneStretcherShader, ChainSilhouetteIterator, ExternalContourUP1D, \
IncreasingColorShader, IncreasingThicknessShader, Operators, QuantitativeInvisibilityUP1D, \
SamplingShader, SpatialNoiseShader, TextureAssignerShader, TrueUP1D
from logical_operators import AndUP1D, NotUP1D
from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
AndUP1D,
ExternalContourUP1D,
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
BackboneStretcherShader,
IncreasingColorShader,
IncreasingThicknessShader,
SamplingShader,
SpatialNoiseShader,
TextureAssignerShader,
)
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D())
Operators.select(upred)

@ -23,9 +23,18 @@
# *** Quantitative Invisibility must have been
# enabled in the options dialog to use this style module ****
from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
Operators, QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
from logical_operators import NotUP1D
from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
)
Operators.select(QuantitativeInvisibilityUP1D(1))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(1)))

@ -23,9 +23,18 @@
# *** Quantitative Invisibility must have been
# enabled in the options dialog to use this style module ****
from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
Operators, QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
from logical_operators import NotUP1D
from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
)
Operators.select(QuantitativeInvisibilityUP1D(2))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(2)))

@ -23,10 +23,22 @@
# predicates to specify respectively the starting and
# the stopping extremities for strokes
from freestyle import ChainSilhouetteIterator, ConstantColorShader, IncreasingThicknessShader, Nature, \
Operators, QuantitativeInvisibilityUP1D, SpatialNoiseShader, TextureAssignerShader, TrueUP1D
from PredicatesU0D import pyBackTVertexUP0D, pyVertexNatureUP0D
from logical_operators import NotUP1D
from freestyle import Operators
from freestyle.types import Nature
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
pyBackTVertexUP0D,
pyVertexNatureUP0D,
)
from freestyle.shaders import (
ConstantColorShader,
IncreasingThicknessShader,
SpatialNoiseShader,
TextureAssignerShader,
)
upred = QuantitativeInvisibilityUP1D(0)
Operators.select(upred)

@ -23,11 +23,21 @@
# parameterization that covers the complete lines (visible+invisible)
# whereas only the visible portions are actually drawn
from ChainingIterators import pySketchyChainSilhouetteIterator
from freestyle import IncreasingColorShader, IncreasingThicknessShader, Operators, \
QuantitativeInvisibilityUP1D, SamplingShader, SmoothingShader, SpatialNoiseShader, \
TextureAssignerShader, TrueUP1D
from shaders import pyHLRShader
from freestyle import Operators
from freestyle.chainingiterators import pySketchyChainSilhouetteIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
IncreasingColorShader,
IncreasingThicknessShader,
SamplingShader,
SmoothingShader,
SpatialNoiseShader,
TextureAssignerShader,
pyHLRShader,
)
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(pySketchyChainSilhouetteIterator(3, False))

@ -23,11 +23,21 @@
# independantly from the 3D topology of objects,
# and, second, so as to chain several times the same ViewEdge.
from ChainingIterators import pySketchyChainingIterator
from freestyle import IncreasingColorShader, IncreasingThicknessShader, Operators, \
QuantitativeInvisibilityUP1D, SamplingShader, SmoothingShader, SpatialNoiseShader, \
TextureAssignerShader, TrueUP1D
from shaders import pyBackboneStretcherNoCuspShader
from freestyle import Operators
from freestyle.chainingiterators import pySketchyChainingIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
IncreasingColorShader,
IncreasingThicknessShader,
SamplingShader,
SmoothingShader,
SpatialNoiseShader,
TextureAssignerShader,
pyBackboneStretcherNoCuspShader
)
Operators.select(QuantitativeInvisibilityUP1D(0))
## Chain 3 times each ViewEdge indpendantly from the

@ -23,10 +23,20 @@
# so as to chain several times the same ViewEdge.
# The topology of the objects is preserved
from ChainingIterators import pySketchyChainSilhouetteIterator
from freestyle import ConstantColorShader, IncreasingThicknessShader, Operators, \
QuantitativeInvisibilityUP1D, SamplingShader, SmoothingShader, SpatialNoiseShader, \
TextureAssignerShader, TrueUP1D
from freestyle import Operators
from freestyle.chainingiterators import pySketchyChainSilhouetteIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
IncreasingThicknessShader,
SamplingShader,
SmoothingShader,
SpatialNoiseShader,
TextureAssignerShader,
)
upred = QuantitativeInvisibilityUP1D(0)
Operators.select(upred)

@ -22,12 +22,21 @@
# Purpose : Draws the visible lines (chaining follows same nature lines)
# (most basic style module)
from freestyle import ChainSilhouetteIterator, ConstantThicknessShader, IncreasingColorShader, \
Operators, QuantitativeInvisibilityUP1D, TextureAssignerShader, TrueUP1D
from Functions0D import pyInverseCurvature2DAngleF0D
from PredicatesU0D import pyParameterUP0D
from PredicatesU1D import pyHigherLengthUP1D
from logical_operators import NotUP1D
from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.functions import pyInverseCurvature2DAngleF0D
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
pyHigherLengthUP1D,
pyParameterUP0D,
)
from freestyle.shaders import (
ConstantThicknessShader,
IncreasingColorShader,
TextureAssignerShader,
)
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))

@ -21,10 +21,20 @@
# Date : 04/08/2005
# Purpose : Draws strokes that starts and stops at Tvertices (visible or not)
from freestyle import ChainSilhouetteIterator, ConstantThicknessShader, IncreasingColorShader, \
Nature, Operators, QuantitativeInvisibilityUP1D, TextureAssignerShader, TrueUP1D
from PredicatesU0D import pyVertexNatureUP0D
from logical_operators import NotUP1D
from freestyle import Operators
from freestyle.types import Nature
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
pyVertexNatureUP0D,
)
from freestyle.shaders import (
ConstantThicknessShader,
IncreasingColorShader,
TextureAssignerShader,
)
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))

@ -21,10 +21,21 @@
# Date : 04/08/2005
# Purpose : Draws textured strokes (illustrate the StrokeTextureShader shader)
from freestyle import BezierCurveShader, ChainSilhouetteIterator, ConstantColorShader, \
ConstantThicknessShader, Operators, QuantitativeInvisibilityUP1D, SamplingShader, \
Stroke, StrokeTextureShader, TrueUP1D
from logical_operators import NotUP1D
from freestyle import Operators
from freestyle.types import Stroke
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
BezierCurveShader,
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
StrokeTextureShader,
)
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))

@ -23,10 +23,20 @@
# ***** The suggestive contours must be enabled
# in the options dialog *****
from freestyle import ChainSilhouetteIterator, ConstantColorShader, IncreasingThicknessShader, \
Nature, Operators, QuantitativeInvisibilityUP1D, TrueUP1D
from PredicatesU1D import pyNatureUP1D
from logical_operators import AndUP1D, NotUP1D
from freestyle import Operators
from freestyle.types import Nature
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
AndUP1D,
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
pyNatureUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
IncreasingThicknessShader,
)
upred = AndUP1D(pyNatureUP1D(Nature.SUGGESTIVE_CONTOUR), QuantitativeInvisibilityUP1D(0))
Operators.select(upred)

@ -21,10 +21,19 @@
# Date : 04/08/2005
# Purpose : Assigns to strokes a thickness that depends on the depth discontinuity
from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
Operators, QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
from logical_operators import NotUP1D
from shaders import pyDepthDiscontinuityThicknessShader
from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
pyDepthDiscontinuityThicknessShader,
)
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))

@ -21,9 +21,19 @@
# Date : 04/08/2005
# Purpose : Removes strokes extremities
from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
Operators, QuantitativeInvisibilityUP1D, SamplingShader, TipRemoverShader, TrueUP1D
from logical_operators import NotUP1D
from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
TipRemoverShader,
)
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))

@ -21,10 +21,19 @@
# Date : 04/08/2005
# Purpose : Removes TVertices
from freestyle import ChainSilhouetteIterator, ConstantColorShader, IncreasingThicknessShader, \
Operators, QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
from logical_operators import NotUP1D
from shaders import pyTVertexRemoverShader
from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
IncreasingThicknessShader,
SamplingShader,
pyTVertexRemoverShader,
)
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))

@ -20,10 +20,20 @@
# Authors : Fredo Durand, Stephane Grabli, Francois Sillion, Emmanuel Turquin
# Date : 08/04/2005
from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, IntegrationType, \
Operators, QuantitativeInvisibilityUP1D, SamplingShader, Stroke, StrokeTextureShader
from PredicatesB1D import pyZBP1D
from PredicatesU1D import pyDensityUP1D
from freestyle import Operators
from freestyle.types import IntegrationType, Stroke
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
pyDensityUP1D,
pyZBP1D,
)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
StrokeTextureShader,
)
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator())