def __call__(self, inter): func = Curvature2DAngleF0D() c = func(inter) b1 = (c > 0.1) #s = self.getCurvilinearAbscissa(inter) u = inter.u #print(u) b = ((u >= self._m) and (u <= self._M)) return b and b1
def shade(self, stroke): it = stroke.stroke_vertices_begin() func = Curvature2DAngleF0D() while not it.is_end: c = func(Interface0DIterator(it)) if c < 0: print("negative 2D curvature") color = 10.0 * c / 3.1415 it.object.attribute.color = (color, color, color) it.increment()
def __call__(self, inter): count = 0 func = Curvature2DAngleF0D() it = inter.vertices_begin() while not it.is_end: if func(it) > self._a: count = count + 1 if count > self._n: return 1 it.increment() return 0
def __init__(self, lambda1, nbIter): StrokeShader.__init__(self) self._lambda = lambda1 self._nbIter = nbIter self._normalInfo = Normal2DF0D() self._curvatureInfo = Curvature2DAngleF0D()
def __call__(self, inter): func = Curvature2DAngleF0D() c = func(inter) return (3.1415 - c)
def __call__(self, inter): func = Curvature2DAngleF0D() a = func(inter) return (a > self._a)