Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2018-01-10 Thread Kevin Cozens
On 2018-01-10 09:05 AM, Jörg Hermann wrote: Wayne disapproves the introduction of a version number. While I see the benefit - data format is always crystal clear, it makes parsers more complex all the time. From a maintenance pov I agree with Wayne, not introducing a version number. With

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2018-01-10 Thread Oliver Walters
Jorg, this has already been fixed and merged :) On Thu, Jan 11, 2018 at 1:05 AM, Jörg Hermann wrote: > The summary of this thread to me is: > > 1) Everybody is in favour of uniform, consistent measurement units, mm > that is. > 2) Everybody sees a long term benefit. > 3)

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2018-01-10 Thread Jörg Hermann
The summary of this thread to me is: 1) Everybody is in favour of uniform, consistent measurement units, mm that is. 2) Everybody sees a long term benefit. 3) Everybody agrees V5 is disruptive due to library changes. 4) There seems to be consensus that only few users will be bitten by the 3D

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-29 Thread Oliver Walters
JP, Wayne, Any update on how we want to handle this? On Mon, Nov 27, 2017 at 9:48 PM, Oliver Walters < oliver.henry.walt...@gmail.com> wrote: > jp, > > Sorry I forgot to reapply that patch on top. > > Updated patch set is attached. > > Thanks, > > On Mon, Nov 27, 2017 at 6:48 PM, jp charras

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-28 Thread Wayne Stambaugh
On 11/28/2017 10:40 AM, Kevin Cozens wrote: > On 2017-11-27 02:48 AM, jp charras wrote: >> I am thinking the "offset" should be written in footprint (and board) >> files *only* if it is not 0,0,0 >> >> With this patch, all footprint files will be incompatible with stable >> version, due to a not

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-28 Thread Kevin Cozens
On 2017-11-27 02:48 AM, jp charras wrote: I am thinking the "offset" should be written in footprint (and board) files *only* if it is not 0,0,0 With this patch, all footprint files will be incompatible with stable version, due to a not used (most of time) parameter. Moreover footprint files

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-27 Thread Oliver Walters
jp, Sorry I forgot to reapply that patch on top. Updated patch set is attached. Thanks, On Mon, Nov 27, 2017 at 6:48 PM, jp charras wrote: > Le 26/11/2017 à 22:21, Oliver Walters a écrit : > > Wayne, > > > > Please find attached an updated patch set which also fixes 3D

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-26 Thread jp charras
Le 26/11/2017 à 22:21, Oliver Walters a écrit : > Wayne, > > Please find attached an updated patch set which also fixes 3D model units for > the STEP exporter tool. > > > > On Thu, Nov 23, 2017 at 1:59 AM, Wayne Stambaugh > wrote: > >

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-26 Thread Oliver Walters
Wayne, Please find attached an updated patch set which also fixes 3D model units for the STEP exporter tool. On Thu, Nov 23, 2017 at 1:59 AM, Wayne Stambaugh wrote: > Consistency. Currently we have two separate units in kicad board and > footprint files. This change

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-23 Thread Oliver Walters
JP, Wayne, I have implemented JP's suggestion to write "at" if offset is zero (default) as patch 0002 attached. Wayne, you can choose to apply 0002 if you like this idea. On Thu, Nov 23, 2017 at 9:35 PM, jp charras wrote: > Le 23/11/2017 à 11:25, Oliver Walters a écrit

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-23 Thread easyw
I think the master branch already has enough new features to make its output incompatible with v4. 'Offset' approach seems the easiest and cleanest solution IMHO. the 'offset' thing is creating a stopper for kicad 4 release as well as i.e. rounded rectangle pad does... kicad 4 just would stop

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-23 Thread jp charras
Le 23/11/2017 à 11:25, Oliver Walters a écrit : > Orson, Wayne, > > I would agree. Please find attached a patch that implements "offset" Hi Oliver, Because all our footprints in libraries have the "offset" set to O,O,O, (the default value) if could be worth to export the offset only if it is

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-23 Thread Oliver Walters
Orson, Wayne, I would agree. Please find attached a patch that implements "offset" On Thu, Nov 23, 2017 at 7:05 PM, Maciej Sumiński wrote: > I think the master branch already has enough new features to make its > output incompatible with v4. 'Offset' approach seems the

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-23 Thread Maciej Sumiński
I think the master branch already has enough new features to make its output incompatible with v4. 'Offset' approach seems the easiest and cleanest solution IMHO. Cheers, Orson On 11/22/2017 11:16 PM, Oliver Walters wrote: > I understand this will break "forwards compatibility" if opening a v5

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-22 Thread easyw
I understand this will break "forwards compatibility" if opening a v5 file from v4. and this break will be also 'silent' Sometimes such changes are unavoidable.point of views ... as I already pointed out I don't remember how many times, this changing is started for a wrong assumption: that 3D

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-22 Thread Oliver Walters
I understand this will break "forwards compatibility" if opening a v5 file from v4. Sometimes such changes are unavoidable. On Thu, Nov 23, 2017 at 8:44 AM, easyw wrote: > This option is in fact a smooth transition for footprints... > but it will break the readability of new

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-22 Thread easyw
This option is in fact a smooth transition for footprints... but it will break the readability of new boards by previous release of kicad... no way back to previous releases, even to be just read... Which is better then? Library stuff are quite delicate to be touched IMO... On 11/22/2017 10:23

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-22 Thread Oliver Walters
Wayne I still have an issue with silently breaking files. Using an "offset" parameter (but reading "at" for compatibility) does not break anyone's models and there is absolutely no confusion about which is mm and which is inches. Incidentally I think "offset" is a better name, it implies relative

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-22 Thread Marcos Chaparro
On Wed, Nov 22, 2017 at 11:59 AM, Wayne Stambaugh wrote: > Yes, it is a change that will break some users 3D models > but I think the long term benefit outweighs the short term annoyance. It will break most of my boards. I won't complain because I appreciate the effort

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-22 Thread easyw
Hi Jose, I have several footprints that use manufacturer's models, where offsets and rotations are necessary. I really fail to see the point of breaking people's designs and libraries needlessly. this is probably quite common when a user needs some connector models for his/her production,

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-22 Thread Wayne Stambaugh
Consistency. Currently we have two separate units in kicad board and footprint files. This change unifies that issue. I know it's annoying but it is a decision that I made to make the file formatting more consistent. Yes, it is a change that will break some users 3D models but I think the long

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-22 Thread José Ignacio
I have several footprints that use manufacturer's models, where offsets and rotations are necessary. I really fail to see the point of breaking people's designs and libraries needlessly. On Nov 22, 2017 7:07 AM, "Wayne Stambaugh" wrote: > What is wrong with just reading

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-22 Thread Wayne Stambaugh
What is wrong with just reading the footprint in mm rather than converting from decimils from now on? It's only going to be a one time issue when a user adds a footprint that has not been converted to mm to a board. On 11/22/2017 06:16 AM, Oliver Walters wrote: > Wayne, > > > I believe he has

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-22 Thread Wayne Stambaugh
On 11/22/2017 04:25 AM, easyw wrote: > Hi Wayne, >> I'm not sure I understand what the issue is.  Once an offset is changed >> to mm when either a footprint in a board or a library is parsed, why >> would it not be saved as mm.  If it isn't, then this is a bug.  Once the >> footprint offset is

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-22 Thread easyw
I believe he has a point. The footprint files do not have version information so if you load and save a footprint multiple times, the "offset" (if non zero) will continuously be multiplied by 2.54x This is not true if the footprint importer will be patched to read the data as mm from now on...

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-22 Thread Oliver Walters
Wayne, I believe he has a point. The footprint files do not have version information so if you load and save a footprint multiple times, the "offset" (if non zero) will continuously be multiplied by 2.54x I think there are two ways forward: 1. Revert my patch and live with the file format unit

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-22 Thread easyw
Hi Wayne, I'm not sure I understand what the issue is. Once an offset is changed to mm when either a footprint in a board or a library is parsed, why would it not be saved as mm. If it isn't, then this is a bug. Once the footprint offset is converted to mm, there should be no expectation that

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-21 Thread José Ignacio
What if you open the same file again, how can it tell it's in mm or inches? On Tue, Nov 21, 2017 at 7:19 PM, Wayne Stambaugh wrote: > I'm not sure I understand what the issue is. Once an offset is changed > to mm when either a footprint in a board or a library is parsed,

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-21 Thread Wayne Stambaugh
I'm not sure I understand what the issue is. Once an offset is changed to mm when either a footprint in a board or a library is parsed, why would it not be saved as mm. If it isn't, then this is a bug. Once the footprint offset is converted to mm, there should be no expectation that it will be

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-21 Thread easyw
I think you just need to patch the footprint editor importer to fix this... I think this fork for footprint format will add more 'rumors' in libraries for something that just worked fine ... (only not to be adding a note in the docs that footprint offset were in deci-mils) Anyway Alea iacta

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-21 Thread Oliver Walters
Wayne, Not sure how you want to handle this but I feel that making a clean break and using "offset" for mm solves all the issues associated with embedded footprints without version info, as Maurice says above. Let me know if want me to implement. On Wed, Nov 22, 2017 at 8:24 AM, easyw

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-20 Thread Wayne Stambaugh
Oliver, I merged these patches into the development branch. Thanks, Wayne On 11/20/2017 04:35 PM, Oliver Walters wrote: > Wayne, > > Patch files attached. > > Once again the --ignore-whitespace flag will need to be used, I believe > it is because a line in kicad-plugin.h (46, corresponding

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-20 Thread Oliver Walters
Wayne, Patch files attached. Once again the --ignore-whitespace flag will need to be used, I believe it is because a line in kicad-plugin.h (46, corresponding to 20170920) has a DOS newline instead of a UNIX newline. Thanks, On Tue, Nov 21, 2017 at 4:27 AM, Wayne Stambaugh

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-20 Thread Wayne Stambaugh
Oliver, Please send me the latest patch(es) when you get a chance so I can get this merged. I cannot find it (them) in my inbox. I must have deleted the email by accident. Cheers, Wayne On 11/18/2017 8:39 PM, Oliver Walters wrote: > Wayne, > > Any further issues to address here? :) > > On

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-18 Thread Oliver Walters
Wayne, Any further issues to address here? :) On 14 Nov 2017 20:55, "Oliver Walters" wrote: > Wayne, > > Please find attached updated patch set. If an old version is detected, > inches are converted to mm. > > On Tue, Nov 14, 2017 at 9:33 AM, Nick Østergaard

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-15 Thread easyw
Hi Orson, I think you write this assuming the v5 file format will have m_requiredVersion set to 5. If I recall correctly, we have decided to use dates for file versioning and this method will be kept for v5 and later versions, so we should be safe here. if this the new Version policy I

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-15 Thread Maciej Suminski
Hi Maurice, On 15/11/2017 1:21 PM, easyw wrote: Just a clarification request: Kicad Stable has version assigned to 4 Previous stable had version assigned to 3 I imagine that next stable would have version assigned to 5... Am I right in supposing the next numbering release? If I'm fine, with

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-15 Thread easyw
Just a clarification request: Kicad Stable has version assigned to 4 Previous stable had version assigned to 3 I imagine that next stable would have version assigned to 5... Am I right in supposing the next numbering release? If I'm fine, with the proposed patch the new stable release, if

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-14 Thread Oliver Walters
Wayne, Please find attached updated patch set. If an old version is detected, inches are converted to mm. On Tue, Nov 14, 2017 at 9:33 AM, Nick Østergaard wrote: > Just to mention it, I think this quirk needs to be put in the release > notes for 5.0.0 if that would be the

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-13 Thread Nick Østergaard
Just to mention it, I think this quirk needs to be put in the release notes for 5.0.0 if that would be the case, or at least documented as a note in the docs. 2017-11-13 18:10 GMT+01.00, Wayne Stambaugh : > On 11/12/2017 6:12 AM, Oliver Walters wrote: >> Wayne, >> >> Another

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-13 Thread Wayne Stambaugh
On 11/12/2017 6:12 AM, Oliver Walters wrote: > Wayne, > > Another potential spanner in the works - the footprint files do not > store the file version information. (should they?) I would rather not. Otherwise there would be a footprint version in every footprint embedded in the schematic and

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-12 Thread Oliver Walters
Wayne, Another potential spanner in the works - the footprint files do not store the file version information. (should they?) Thus, footprint files cannot be parsed differently based on their file version. Changing "at" between mm and inches will work for the pcb but not for the individual

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-11 Thread Wayne Stambaugh
I misunderstood the intention of this patch. I though it had nothing to do with the units change patch. I will revert it. Please send me the file format change patch when you get a chance and I merge them both at the same time. Sorry about the mix up. On 11/11/2017 03:34 PM, Oliver Walters

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-11 Thread Oliver Walters
Wayne, I had not yet made any changes to the file parser. Have you done this according to your new file-version approach? Or do you want me to submit a further patch implementing that? On 12 Nov 2017 07:16, "Wayne Stambaugh" wrote: > Oliver, > > I committed your patch to

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-11 Thread Wayne Stambaugh
Oliver, I committed your patch to the KiCad development branch. Thanks, Wayne On 11/08/2017 05:05 AM, Oliver Walters wrote: > Attached is a patch that fixes the problems I found in my 3D model array > investigation. As discussion on that is stalled for now, this patch > simply fixes the model

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-11 Thread easyw
Unless a user used custom models or some of the older library models, the offset will be 0,0,0 so I suspect the issues will be minimal and will quickly diminish over time. the issue will be on users that are using manufacturer's models for 3D step connectors and having assembly of boards (i.e.

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-11 Thread Wayne Stambaugh
On 11/11/2017 01:36 PM, easyw wrote: > Hi Wayne, > I agree that probably the simplest and clearest solution it would be > just to switch the reading depending on which version of pcbnew is the > file. > > In-fact it could be possible also to preserve the existing offset > without the need to

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-11 Thread easyw
Hi Wayne, I agree that probably the simplest and clearest solution it would be just to switch the reading depending on which version of pcbnew is the file. In-fact it could be possible also to preserve the existing offset without the need to manually adjust the board. If the pcbnew app would

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-11 Thread Wayne Stambaugh
Hold on a second before you prepare a patch. This would introduce a new semantic to the coordinate entries in the file format which could be open to abuse in the future. I don't want to open up the possibility of using different units within the file format itself and adding units token will

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-11 Thread Oliver Walters
JP, Yes I will update with a patch. On 11 Nov 2017 19:45, "jp charras" wrote: > Le 09/11/2017 à 21:48, Oliver Walters a écrit : > > JP, > > > > I think that 3) is the better option, because it preservers PCB file > compatibility (as long as the > > offset is zero). Any

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-11 Thread jp charras
Le 09/11/2017 à 21:48, Oliver Walters a écrit : > JP, > > I think that 3) is the better option, because it preservers PCB file > compatibility (as long as the > offset is zero). Any time the PCB is saved, the (at (xyz 0 0 0)) gets written. > > You are also correct that none of the official

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-10 Thread Kevin Cozens
On 2017-11-10 04:42 PM, Kristoffer Ödmark wrote: Storing every value except one in mm is just confusing. The proposed solution will not break  *any* existing library. The file format is already not consistent with old versions of kicad. Please do not be afraid of moving towards something

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-10 Thread Kevin Cozens
On 2017-11-10 04:42 PM, Kristoffer Ödmark wrote: Storing every value except one in mm is just confusing. The proposed solution will not break  *any* existing library. The file format is already not consistent with old versions of kicad. Please do not be afraid of moving towards something

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-10 Thread Kristoffer Ödmark
The short time i have been reading the ML I have seen this issue a few times, I have been fooled myself and I know that a patch was issued and later retracted. Storing every value except one in mm is just confusing. The proposed solution will not break *any* existing library. The file format is

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-10 Thread Cirilo Bernardo
I would also prefer the option to simply store 3D units in inches; we just need to document this. Truncation will not be a problem for 3D models; if the models move by 0,01mm no one will care (or if someone does care then they need to go back to engineering school). I think this is a case where

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-09 Thread easyw
Oliver, historically that was in inches for the 3D viewer... Mario didn't change the file format to avoid breaking any previous releases I think, but managed to calculate correctly offset and displaying in the 3D viewer and exporter... I don't know if aligning these parameters to mm inside

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-09 Thread Oliver Walters
Maurice, The error is that the offset is stored (file format) in inches but it should be mm. Now that I know that the issue is in the file, I'm happy that the internals to KiCad were working well, it just didn't make sense for the assumption that units were in mm On 10 Nov 2017 08:39, "easyw"

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-09 Thread Oliver Walters
JP, I think that 3) is the better option, because it preservers PCB file compatibility (as long as the offset is zero). Any time the PCB is saved, the (at (xyz 0 0 0)) gets written. You are also correct that none of the official library footprints have a defined offset. This is why i have never

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-09 Thread Oliver Walters
I like 2) or 3) - I think that a major release is a good time to fix such a bug. Would you like me to add a patch implementing one of these options JP? On 9 Nov 2017 23:33, "Kristoffer Ödmark" wrote: > Currently the footprints arent compatible anyway i guess, they

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-09 Thread Kristoffer Ödmark
Currently the footprints arent compatible anyway i guess, they support more than 4.07 footprints do. So option 2 is my preferred solution. On 11/09/2017 12:51 PM, jp charras wrote: Le 09/11/2017 à 11:12, Kristoffer Ödmark a écrit : My 2 cents is that the headaches of storing values in mixed

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-09 Thread jp charras
Le 09/11/2017 à 11:12, Kristoffer Ödmark a écrit : > My 2 cents is that the headaches of storing values in mixed units, without > indication of which unit > they are stored as is a huge drawback for readability of the saved files and > for maintainability. > > Also I think the proposed new tag

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-09 Thread Kristoffer Ödmark
My 2 cents is that the headaches of storing values in mixed units, without indication of which unit they are stored as is a huge drawback for readability of the saved files and for maintainability. Also I think the proposed new tag offset is a good idea, since the libraries can be gradually

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-09 Thread Mário Luzeiro
> - It appears that the internal units for 3D model offset (mm) were being > multiplied by 25.4 incorrectly In case (as discussed on this email thread) there are no changes in the file format, it would be good just to left a comment in the sourcecode about this issue, so future coders will not

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-09 Thread Nick Østergaard
In my opinion we should not be afraid to bump that version on master when we already have done it since the branch was branched last time. If this was a fix on a stable branch it would be of a greater concern, but should probably just be noted in the release notes and everything should be honky

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-08 Thread Wayne Stambaugh
This requires a file version bump and code that tests for prior versions before converting the units on read. At that point, the file will no longer be compatible with prior version of KiCad. I'm not opposed to this but I'm not sure it's worth the headaches it will cause. On 11/08/2017 03:33

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-08 Thread Oliver Walters
What about a controversial idea: Read "at" dimensions as inches, but new files write "offset" in mm. This preserves read compatibility but fixes the units issue going forward. On 9 Nov 2017 03:15, "jp charras" wrote: > Le 08/11/2017 à 11:05, Oliver Walters a écrit : > >

Re: [Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-08 Thread jp charras
Le 08/11/2017 à 11:05, Oliver Walters a écrit : > Attached is a patch that fixes the problems I found in my 3D model array > investigation. As > discussion on that is stalled for now, this patch simply fixes the model > offset issues. > > 1. Display offset units in 3D preview window > > -

[Kicad-developers] [PATCH] Fix for 3D model offset

2017-11-08 Thread Oliver Walters
Attached is a patch that fixes the problems I found in my 3D model array investigation. As discussion on that is stalled for now, this patch simply fixes the model offset issues. 1. Display offset units in 3D preview window - Offset units are displayed (either inches or mm) 2. Fix offset in 3D