Import: DXF, correctly transfer Draft.Line points to make them editable

This commit is contained in:
Furgo
2025-07-10 14:16:51 +02:00
parent 8054042a9a
commit 9ce3a35bc8

View File

@@ -4518,6 +4518,13 @@ class DxfDraftPostProcessor:
# property.
new_obj.Shape = part_obj.Shape
Draft.Wire(new_obj) # Attach the Python proxy. It will find Shape, Placement.
# Manually transfer the parametric data from the Part::Line primitive
# to the new Draft.Wire's 'Points' property.
start_point = FreeCAD.Vector(part_obj.X1.Value, part_obj.Y1.Value, part_obj.Z1.Value)
end_point = FreeCAD.Vector(part_obj.X2.Value, part_obj.Y2.Value, part_obj.Z2.Value)
new_obj.Points = [start_point, end_point]
obj_type_str = "Line"
elif part_obj.isDerivedFrom("Part::Circle"):