Skip to content

Use preferred coordinate type for Path except when explicitly provided#185

Open
gpeairs wants to merge 4 commits intomainfrom
gp/fix-93
Open

Use preferred coordinate type for Path except when explicitly provided#185
gpeairs wants to merge 4 commits intomainfrom
gp/fix-93

Conversation

@gpeairs
Copy link
Copy Markdown
Member

@gpeairs gpeairs commented Mar 24, 2026

Close #93. This is a behavior change for Paths where units were implicitly provided as the coordinate type of p0. For example, Path(0mm, 0mm) is now always the same as Path(). To set the unit type explicitly, use Path(mm, ...).

This makes it slightly less convenient to explicitly specify coordinate type units, and may introduce unnecessary conversions where p0 was used to ensure path units agreed with other geometry units. However, it avoids the much more common case of inadvertently specifying units in order to set p0, similarly causing unnecessary conversions down the line.

This adds a new constructor for Path (unit + point, e.g. Path(nm, Point(1,2)mm)) so will require a minor version bump.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread test/test_entity.jl Outdated
@gpeairs
Copy link
Copy Markdown
Member Author

gpeairs commented Apr 18, 2026

Holding this until #147 is merged, changing coordinate types is a risk for Booleans on mixed collections without the interface relaxation there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unitful Paths should always use preferred units

1 participant