# Path: Interface/cadinitsetting.py
# RESTART_COMMAND_OPTION = True


from PyQt5 import QtCore, QtGui
from Kernel.initsetting import SNAP_POINT_ARRAY
from Interface.cadinitsetting import RESTART_COMMAND_OPTION
from Kernel.GeoEntity.point import Point
from Kernel.GeoUtil.geolib import Vector   
from Kernel.GeoUtil.intersection import *
from Kernel.pycadevent import *
from Kernel.exception import *
from Interface.Preview.factory import *
import math, string
            print("Exceprion  ICommand.addMauseEvent ")
            self.updateInput("msg")
            self.updateInput(self.kernelCommand.activeMessage) 
            self.scene.clearSelection()
            return

        self.__point.append(point)
        self.__entity.append(entity)
        self.__distance.append(distance)      
        self.__angle.append(angle)
        self.__snap.append(snap)
        self.__forceSnap.append(force)
        self.updatePreview()   
        self.__index += 1
        try:
            self.kernelCommand.next()
        except StopIteration:
            self.applyCommand()
            return
        self.updateInput(self.kernelCommand.activeMessage) 
        if self.automaticApply and self.kernelCommand.automaticApply:
            if(self.__index >= self.kernelCommand.lenght - 1): #Apply the command
                self.applyCommand()
        
    def applyCommand(self):    
        """
            apply the command 
        """
        try:
            self.kernelCommand.applyCommand()    

# Path: Interface/cadinitsetting.py
# RESTART_COMMAND_OPTION = True


# Path: Interface/Command/icommand.py
from PyQt5 import QtCore, QtGui
from Kernel.initsetting import SNAP_POINT_ARRAY
from Interface.cadinitsetting import RESTART_COMMAND_OPTION
from Kernel.GeoEntity.point import Point
from Kernel.GeoUtil.geolib import Vector   
from Kernel.GeoUtil.intersection import *
from Kernel.pycadevent import *
from Kernel.exception import *
from Interface.Preview.factory import *
import math, string

            print("Exceprion  ICommand.addMauseEvent ")
            self.updateInput("msg")
            self.updateInput(self.kernelCommand.activeMessage) 
            self.scene.clearSelection()
            return

        self.__point.append(point)
        self.__entity.append(entity)
        self.__distance.append(distance)      
        self.__angle.append(angle)
        self.__snap.append(snap)
        self.__forceSnap.append(force)
        self.updatePreview()   
        self.__index += 1
        try:
            self.kernelCommand.next()
        except StopIteration:
            self.applyCommand()
            return
        self.updateInput(self.kernelCommand.activeMessage) 
        if self.automaticApply and self.kernelCommand.automaticApply:
            if(self.__index >= self.kernelCommand.lenght - 1): #Apply the command
                self.applyCommand()
        
    def applyCommand(self):    
        """
            apply the command 
        """
        try:
            self.kernelCommand.applyCommand()    

            if RESTART_COMMAND_OPTION: