mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
geometry: Factorize points definition.
This commit is contained in:
1 parent
2a00593332
commit
878c1403b6
3 files changed
+78
-44
No files matched your search
@@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
class Point(object):
|
||||
def __init__(self, name:str = ""):
|
||||
super(Point, self).__init__()
|
||||
|
||||
self._name = name
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self._name
|
||||
|
||||
@name.setter
|
||||
def name(self, name):
|
||||
self._name = name
|
||||
|
||||
def point_is_named(self):
|
||||
"""
|
||||
Returns:
|
||||
True if the point is named.
|
||||
"""
|
||||
return self._name.strip() == ""
|
||||
Reference in new issue
Block a user