예제 #1
0
 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
예제 #2
0
 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()
예제 #3
0
 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
예제 #4
0
 def __init__(self, lambda1, nbIter):
     StrokeShader.__init__(self)
     self._lambda = lambda1
     self._nbIter = nbIter
     self._normalInfo = Normal2DF0D()
     self._curvatureInfo = Curvature2DAngleF0D()
예제 #5
0
	def __call__(self, inter):
		func = Curvature2DAngleF0D()
		c = func(inter)
		return (3.1415 - c)
예제 #6
0
 def __call__(self, inter):
     func = Curvature2DAngleF0D()
     a = func(inter)
     return (a > self._a)