Commit 8834afa4 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

Geometry: Allow to copy point with floating point string format '*,*'.

Showing with 8 additions and 3 deletions
+8 -3
...@@ -212,12 +212,17 @@ class ProfileXYZ(Profile, SQLSubModel): ...@@ -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(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment