Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tabulon_dxf/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,8 @@ pub fn load_file_default_layers(path: impl AsRef<Path>) -> DxfResult<TDDrawing>
(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,
Expand Down Expand Up @@ -709,7 +711,8 @@ pub fn load_file_default_layers(path: impl AsRef<Path>) -> DxfResult<TDDrawing>
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.
Expand Down
Loading