diff --git a/tabulon_dxf/src/lib.rs b/tabulon_dxf/src/lib.rs index 7516361..751ba6b 100644 --- a/tabulon_dxf/src/lib.rs +++ b/tabulon_dxf/src/lib.rs @@ -673,6 +673,8 @@ pub fn load_file_default_layers(path: impl AsRef) -> DxfResult (line_weight, color) }; + let base_point = point_from_dxf_point(&b.base_point); + let mut cur_style = resolve_style( handle_for_layer_name[b.entities[0].common.layer.as_str()], b.entities[0].common.lineweight_enum_value, @@ -709,7 +711,8 @@ pub fn load_file_default_layers(path: impl AsRef) -> DxfResult ins.x_scale_factor, ins.y_scale_factor, ); - let location = point_from_dxf_point(&ins.location); + let location = + point_from_dxf_point(&ins.location) - base_point.to_vec2(); if !lines.is_empty() { // Always push a chunk before an insert if not empty.