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
|
return profile
|
||||||
|
|
||||||
def point_from_data(self, header, data):
|
def point_from_data(self, header, data):
|
||||||
|
def float_format(s: str):
|
||||||
|
return float(
|
||||||
|
s.replace(",", ".")
|
||||||
|
)
|
||||||
|
|
||||||
point = None
|
point = None
|
||||||
try:
|
try:
|
||||||
if len(header) == 0:
|
if len(header) == 0:
|
||||||
x = float(data[0])
|
x = float_format(data[0])
|
||||||
y = float(data[1])
|
y = float_format(data[1])
|
||||||
z = float(data[2])
|
z = float_format(data[2])
|
||||||
name = data[3] if len(data) == 4 else ""
|
name = data[3] if len(data) == 4 else ""
|
||||||
|
|
||||||
point = PointXYZ(
|
point = PointXYZ(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue