mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Geometry: Allow to copy point with floating point string format '*,*'.
This commit is contained in:
1 parent
0d88b954d8
commit
8834afa4f3
1 file changed
+8
-3
@@ -212,12 +212,17 @@ class ProfileXYZ(Profile, SQLSubModel):
|
||||
return profile
|
||||
|
||||
def point_from_data(self, header, data):
|
||||
def float_format(s: str):
|
||||
return float(
|
||||
s.replace(",", ".")
|
||||
)
|
||||
|
||||
point = None
|
||||
try:
|
||||
if len(header) == 0:
|
||||
x = float(data[0])
|
||||
y = float(data[1])
|
||||
z = float(data[2])
|
||||
x = float_format(data[0])
|
||||
y = float_format(data[1])
|
||||
z = float_format(data[2])
|
||||
name = data[3] if len(data) == 4 else ""
|
||||
|
||||
point = PointXYZ(
|
||||
|
||||
Reference in new issue
Block a user