← Back to team overview

kicad-developers team mailing list archive

Re: Fixing libcommon

 

On 03/18/17 10:18, Maciej Suminski wrote:
In order to remove the hardcoded values from WORKSHEET_VIEWITEM, I
started moving code that used to be compiled multiple times to separate
units. This is also a basic way to solve the internal units conversion
problem.

There are still a few more files that are compiled multiple times. I
plan to fix them as well, but first I want to send the first patches to
see if we all agree on the proposed solution.

Alternatively, there could be an abstract class to provide conversion
methods. If it is preferred, then we need to decide how to access its
instance (singleton, attach to KiFace, static object?)

Ultimately we can have a real common library for all apps (libkicommon?)
that could be compiled as a shared library. Such approach should reduce
*.kiface files size and linking time.

Any thoughts?

I'm new to the dev list and haven't looked at the issue you're dealing with yet. However, I'm looking at an issue that may be related and we may want to consider as you make your changes.

I want to accomplish two goals:

1. Allow the user to set the origin from which the location of all
   objects is measured. Right now this is the upper left corner of
   whatever Paper size and orientation is selected in the Page
   Settings. The user should be able to set the origin to a more
   convenient location, such as a reference point on a PCB.
2. Allow the user to set the positive X and Y directions from that
   reference point. This would allow a user to display Y-axis
   coordinates increasing from bottom to top, or decreasing as it is now.

I want to accomplish these goals in a consistent manner across all editors (Schematic, Footprint, and Layout) without causing major revision to the internal representations.

Could this be integrated into the work your doing to handle internal unit conversions?

-Reece


Follow ups

References