Example #1
0
 def distancePointLine(self, point: Point, line: Line):
     helpPlane = Plane.normalForm(
         Vector3D(point.getX(), point.getY(), point.getZ()),
         line.getDirectionVector())
     pointSchnitt = Solvers.solveForPointPlane(line, helpPlane)
     schnittPoint = Point(pointSchnitt.getX(), pointSchnitt.getY(),
                          pointSchnitt.getZ())
     distance = Solvers.distancePointPoint(schnittPoint, point)
     return distance
import tkinter as tk
from tkinter import Canvas, ttk
from tkinter.constants import RIDGE
from listclass import ObjectLists
from vector3Dclass import Vector3D
from pointclass import Point
from lineclass import Line
from planeclass import Plane
from nameAssignclass import NameAssign
from colorAssignclass import ColorAssign

x = Vector3D(3, 4, 5)
y = Plane.normalForm(Vector3D(1, 1, 1), Vector3D(2, 2, 2))
z = Plane.parameterForm(Vector3D(3, 4, 5), Vector3D(2, 2, 2),
                        Vector3D(2, 2, 2))


class MainGUI(tk.Frame):
    width = 1200
    height = 700
    size = str(width) + "x" + str(height)

    def __init__(self):
        self.root = tk.Tk()
        self.root.title("Vektorplotter")
        self.root.geometry(self.size)
        #self.root.resizable(0, 0)

        self.makeMainframe()
        self.makeListFrame()
        self.makeMenuFrame()