mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
geometry: Profile: Start to adapt profile window.
This commit is contained in:
1 parent
a055c80dce
commit
a9c57a9512
6 files changed
+130
-225
No files matched your search
@@ -6,7 +6,7 @@ class Profile(object):
|
||||
def __init__(self, num: int = 0,
|
||||
kp:float = 0.0, name:str = "",
|
||||
code1: int = 0, code2: int = 0,
|
||||
_type:str = ""):
|
||||
_type:str = "", reach = None):
|
||||
super(Profile, self).__init__()
|
||||
|
||||
self._num = int(num)
|
||||
@@ -14,11 +14,16 @@ class Profile(object):
|
||||
self._code2 = int(code2)
|
||||
self._kp = float(kp)
|
||||
self._name = str(name)
|
||||
self._reach = reach
|
||||
|
||||
self._points: List[Point] = []
|
||||
|
||||
self._profile_type = _type
|
||||
|
||||
@property
|
||||
def reach(self):
|
||||
return self._reach
|
||||
|
||||
@property
|
||||
def num(self):
|
||||
"""
|
||||
|
||||
@@ -12,7 +12,8 @@ class ProfileXYZ(Profile):
|
||||
def __init__(self, num: int = 0,
|
||||
code1: int = 0, code2: int = 0,
|
||||
nb_point: int = 0,
|
||||
kp: float = 0., name: str = ""):
|
||||
kp: float = 0., name: str = "",
|
||||
reach = None):
|
||||
"""ProfileXYZ constructor
|
||||
|
||||
Args:
|
||||
@@ -31,6 +32,7 @@ class ProfileXYZ(Profile):
|
||||
kp = kp,
|
||||
code1 = code1, code2 = code2,
|
||||
_type = "XYZ",
|
||||
reach = reach,
|
||||
)
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
@@ -81,7 +81,7 @@ class Reach:
|
||||
Returns:
|
||||
Nothing.
|
||||
"""
|
||||
profile = ProfileXYZ()
|
||||
profile = ProfileXYZ(reach=self)
|
||||
|
||||
self._profiles.insert(index, profile)
|
||||
self._update_profile_numbers()
|
||||
@@ -306,7 +306,7 @@ class Reach:
|
||||
|
||||
if list_profile and list_header:
|
||||
for ind, profile in enumerate(list_profile):
|
||||
prof = ProfileXYZ(*list_header[ind])
|
||||
prof = ProfileXYZ(*list_header[ind], reach=self)
|
||||
prof.import_points(profile)
|
||||
self._profiles.append(prof)
|
||||
self._update_profile_numbers()
|
||||
|
||||
Reference in new issue
Block a user