[MOD] alignment is messed up
This commit is contained in:
@@ -5,12 +5,12 @@ from typing import List, Tuple
|
||||
from PySide6.QtWidgets import QGraphicsItemGroup
|
||||
from random import randint
|
||||
|
||||
from grid.ui.sphere_widget import SphereGraphicsItem, ArcGraphicsItem, LineGraphicsItem
|
||||
from grid.ui.items import SphereGraphicsItem, ArcGraphicsItem, LineGraphicsItem
|
||||
|
||||
class Pattern(QGraphicsItemGroup):
|
||||
"""Common pattern on the sphere grid
|
||||
"""
|
||||
|
||||
|
||||
PATTERN_WIDTH = 250
|
||||
SPACE_BETWEEN_SPHERE = 60
|
||||
|
||||
@@ -22,6 +22,7 @@ class Pattern(QGraphicsItemGroup):
|
||||
|
||||
# center
|
||||
self.addToGroup(SphereGraphicsItem(center_x, center_y))
|
||||
self.addToGroup(SphereGraphicsItem(0, 0))
|
||||
|
||||
# first cercle
|
||||
sphere_on_circle = 4
|
||||
@@ -43,8 +44,9 @@ class Pattern(QGraphicsItemGroup):
|
||||
points = self.generate_circle_points(center_x, center_y, self.SPACE_BETWEEN_SPHERE*2, sphere_on_circle)
|
||||
for x,y in points:
|
||||
self.addToGroup(SphereGraphicsItem(x, y))
|
||||
#for i in range(sphere_on_circle):
|
||||
# self.addToGroup(ArcGraphicsItem(center_x, center_y, self.SPACE_BETWEEN_SPHERE*2, int(i*360/sphere_on_circle/4)%360, int((i+1)*360/sphere_on_circle)%360, self))
|
||||
for i in range(sphere_on_circle):
|
||||
self.addToGroup(ArcGraphicsItem(center_x, center_y, self.SPACE_BETWEEN_SPHERE*2, int(i*360/sphere_on_circle/4)%360, int((i+1)*360/sphere_on_circle)%360, self))
|
||||
self.addToGroup(ArcGraphicsItem(center_x, center_y, self.SPACE_BETWEEN_SPHERE*2, 0, 90, self))
|
||||
|
||||
# third cercle
|
||||
sphere_on_circle = 8
|
||||
|
||||
Reference in New Issue
Block a user