mirror of https://gitlab.com/pamhyr/pamhyr2
Geometry: Allow to copy point with floating point string format '*,*'.
parent
0d88b954d8
commit
8834afa4f3
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue