kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #38373
[RFC 0/2] New coordinate framework
Hi,
I've been working on a possible new coordinate framework on a side branch.
This is still missing a lot of functions, but the general direction should
be visible already.
Ideas:
- Coordinates have units, so they are not scalar and cannot be used as
scalars
- All coordinates are in nanometers internally, so -DEESCHEMA and co can
go away afterwards
- The compiler should check whether we are using the correct units, at no
runtime cost
- Transition should be done with a compatibility layer that generates
warnings.
There is still a lot missing here, like UI lengths (pixels), zoom factors
(pixels/nm) and angles/rotation. Most of what is needed will turn up only
when I start actually replacing "wxPoint" with "point".
Questions? Comments?
Simon
Simon Richter (2):
New coordinate framework
Compatibility functions for new coordinate system
CMakeLists.txt | 4 ++
common/base_units.cpp | 13 +++++++
include/base_units.h | 10 +++++
include/length.h | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++
include/point.h | 76 ++++++++++++++++++++++++++++++++++++
5 files changed, 208 insertions(+)
create mode 100644 include/length.h
create mode 100644 include/point.h
--
2.11.0
Follow ups