-Changed multi layer render
- added ignore - prepraed sketchwidget
This commit is contained in:
@@ -383,6 +383,8 @@ class SketchWidget(QWidget):
|
||||
# Track Relationship
|
||||
# Points
|
||||
|
||||
# CONSTRAINTS
|
||||
|
||||
if event.button() == Qt.LeftButton and self.mouse_mode == "pt_pt":
|
||||
if self.hovered_point and not self.main_buffer[0]:
|
||||
self.main_buffer[0] = self.get_handle_from_ui_point(self.hovered_point)
|
||||
@@ -771,7 +773,7 @@ class SketchWidget(QWidget):
|
||||
return self.width() / self.height() * (1.0 / abs(self.zoom))
|
||||
|
||||
|
||||
class Point2D:
|
||||
class Point2D_ALT:
|
||||
"""Improved oop aaproach?"""
|
||||
def __init__(self):
|
||||
self.ui_point = None
|
||||
@@ -899,8 +901,33 @@ class Point2D:
|
||||
return QPoint(self.to_quadrant_coords(qt_pos))
|
||||
|
||||
|
||||
|
||||
class Point2D:
|
||||
ui_x: int = None
|
||||
ui_y: int = None
|
||||
handle = None
|
||||
|
||||
class Line2D:
|
||||
pass
|
||||
crd1: Point2D = None
|
||||
crd2: Point2D = None
|
||||
handle = None
|
||||
|
||||
class Sketch2d(SolverSystem):
|
||||
def __init__(self):
|
||||
self.wp = self.create_2d_base()
|
||||
self.points = []
|
||||
self.lines = []
|
||||
|
||||
def add_point(self, point: Point2D):
|
||||
point.handle = self.add_point_2d(point.ui_x, point.ui_y, self.wo)
|
||||
self.points.append(point)
|
||||
|
||||
def add_line(self, line: Line2D):
|
||||
line.handle = self.add_line_2d(line.crd1, line.crd2, self.wp)
|
||||
self.lines.append(line)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user