# Path: qad_msg.py
# class QadMsgClass():
#    def __init__(self):
#    def translate(self, context, sourceText, disambiguation = None, encoding = QCoreApplication.UnicodeUTF8, n = -1):
# def qadShowPluginHelp(section = "", filename = "index", packageName = None):


from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
from qad_variables import *
from qad_arc import *
from qad_msg import QadMsg
import math
import sys
import qad_utils
            sign1 = sign1 - 2
            continue
         
         h = math.sqrt(max(0.0, 1.0 - c*c));

         sign2 = +1
         while sign2 >= -1:
            nx = vx * c - sign2 * h * vy;
            ny = vy * c + sign2 * h * vx;

            tangent = []
            tangent.append(QgsPoint(x1 + r1 * nx, y1 + r1 * ny))
            tangent.append(QgsPoint(x2 + sign1 * r2 * nx, y2 + sign1 * r2 * ny))
            tangents.append(tangent)
            sign2 = sign2 - 2
            
         sign1 = sign1 - 2
 
      return tangents    


   #============================================================================
   # asPolyline
   #============================================================================
   def asPolyline(self, tolerance2ApproxCurve = None, atLeastNSegment = None):
      """
      ritorna una lista di punti che definisce il cerchio
      """
      
      if tolerance2ApproxCurve is None:

# Path: qad_msg.py
# class QadMsgClass():
#    def __init__(self):
#    def translate(self, context, sourceText, disambiguation = None, encoding = QCoreApplication.UnicodeUTF8, n = -1):
# def qadShowPluginHelp(section = "", filename = "index", packageName = None):


# Path: qad_circle.py
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
from qad_variables import *
from qad_arc import *
from qad_msg import QadMsg
import math
import sys
import qad_utils

            sign1 = sign1 - 2
            continue
         
         h = math.sqrt(max(0.0, 1.0 - c*c));

         sign2 = +1
         while sign2 >= -1:
            nx = vx * c - sign2 * h * vy;
            ny = vy * c + sign2 * h * vx;

            tangent = []
            tangent.append(QgsPoint(x1 + r1 * nx, y1 + r1 * ny))
            tangent.append(QgsPoint(x2 + sign1 * r2 * nx, y2 + sign1 * r2 * ny))
            tangents.append(tangent)
            sign2 = sign2 - 2
            
         sign1 = sign1 - 2
 
      return tangents    


   #============================================================================
   # asPolyline
   #============================================================================
   def asPolyline(self, tolerance2ApproxCurve = None, atLeastNSegment = None):
      """
      ritorna una lista di punti che definisce il cerchio
      """
      
      if tolerance2ApproxCurve is None:

         tolerance = QadVariables.get(QadMsg.translate("Environment variables", "TOLERANCE2APPROXCURVE"))