bancika / diy-layout-creator

multi platform circuit layout and schematic drawing tool
http://diy-fever.com
GNU General Public License v3.0
859 stars 99 forks source link

Bug in board code #556

Closed EL34xyz closed 3 years ago

EL34xyz commented 3 years ago

The new board code seems to have some sort of bug

Setting the explicit board length seems to change the length on the DIYLC screen But then looking at the .xml file in a text editor, the length does not save

Look at my screen shot The board is set to 11.5 inches long but the .xml file shows it as 12.97 inches long

DIYLC

bancika commented 3 years ago

Yes, I think that's intentional. Length and width are saved as you can see below and those will be honored when rendering the component. The second control point is ignored in that case.

On Tue, Jun 30, 2020 at 1:43 PM EL34xyz notifications@github.com wrote:

The new board code seems to have some sort of bug

Setting the explicit board length seems to change the length on the DIYLC screen But then looking at the .xml file in a text editor, the length does not save

Look at my screen shot The board is set to 11.5 inches long but the .xml file shows it as 12.97 inches long

[image: DIYLC] https://user-images.githubusercontent.com/16766383/86122121-3df41d00-baa5-11ea-9ec0-e0bb52f076da.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bancika/diy-layout-creator/issues/556, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXONCLK5PT5DM4BF227VL3RZHFURANCNFSM4OMEV2RA .

-- Branislav Stojkovic www.diy-fever.com

EL34xyz commented 3 years ago

It's causing problems when my on line program analyzes a customers custom board. He wants a 11.5 inch long board but the program is showing him a 12.97 inch long board

EL34xyz commented 3 years ago

Here, I set the board length to 13 inches but it does not save the top control points

It only saves the draw coords

<diylc.boards.BlankBoard>
  <name>Board1</name>
  <alpha>127</alpha>
  <value></value>
  <controlPoints>
    <point x="0.0" y="0.0"/>
    <point x="11.5" y="3.125"/>
  </controlPoints>
  <firstPoint x="0.0" y="0.0"/>
  <secondPoint x="11.5" y="3.125"/>
  <boardColor hex="cccccc"/>
  <borderColor hex="ada47d"/>
  <coordinateColor hex="b6b6b6"/>
  <drawCoordinates>true</drawCoordinates>
  <coordinateOrigin>Top_Left</coordinateOrigin>
  <length value="13.0" unit="in"/>
  <width value="3.125" unit="in"/>
  <mode>Explicit</mode>
  <type>SQUARE</type>
</diylc.boards.BlankBoard>
bancika commented 3 years ago

Yes, that's because of this piece

Explicit

the second control point has no meaning to the app. It's there only if you go back to the other mode.

On Tue, Jun 30, 2020 at 1:59 PM EL34xyz notifications@github.com wrote:

Here's I set the board length to 13 inches but it does not save the top control points

It only save the draw coords

Board1 127 true Top_Left Explicit SQUARE — You are receiving this because you commented. Reply to this email directly, view it on GitHub , or unsubscribe .

-- Branislav Stojkovic www.diy-fever.com

EL34xyz commented 3 years ago

I don't understand The board is only one length, not two Why wouldn't both coords be set the same?

EL34xyz commented 3 years ago

So I just tested both explicit and opposing I set the length to 14 inches in explicit Now I switch to opposing and it changed my board length

I don't want some other board length after I have already set the length I want

bancika commented 3 years ago

It depends how you look at things :)

On Tue, Jun 30, 2020 at 2:35 PM EL34xyz notifications@github.com wrote:

So I just tested both explicit and opposing I set the length to 14 inches in explicit Now I switch to opposing and it changed my board length

I don't want some other board length after I have already set the length I want

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bancika/diy-layout-creator/issues/556#issuecomment-651762754, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXONCIJUJWOJGCMVZ3UXDLRZHLYTANCNFSM4OMEV2RA .

-- Branislav Stojkovic www.diy-fever.com

EL34xyz commented 3 years ago

You are kidding right? Why even have the opposing points selection if it does not have the same coords at explicit?

bancika commented 3 years ago

Not really. You have a board that is sized using two points. You switch it to explicit mode and then only one point and dimensions matter. You go back to two points, but a valid question is what the "going back" is. going back to the original size or going back to two points while maintaining the explicit dimensions set while the board was in that mode. One can argue that either of those approaches is valid.

On Tue, Jun 30, 2020 at 2:46 PM EL34xyz notifications@github.com wrote:

You are kidding right? Why even have the opposing points selection if it does not have the same coords at explicit?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bancika/diy-layout-creator/issues/556#issuecomment-651768105, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXONCIMXDXTI5S5ZD5ZB2TRZHND3ANCNFSM4OMEV2RA .

-- Branislav Stojkovic www.diy-fever.com

EL34xyz commented 3 years ago

Seriously Bane? That only makes sense in a world without logic

Who wants the program to change their board dimensions after they have already set them to a certain size using one of the methods?

EL34xyz commented 3 years ago

So I opened an old .diy file just now that does not have the new draw coords present The board is 9 inches long

DIYLC shows it as 13 inches long Where is that coming from?

All I did was open the file

Here's the board section in the file

    <diylc.boards.BlankBoard>
      <name>Hoffman Board</name>
      <alpha>127</alpha>
      <value></value>
      <controlPoints>
        <point x="1.0" y="1.3"/>
        <point x="9.0" y="4.3"/>
      </controlPoints>
      <firstPoint x="1.0" y="1.3"/>
      <secondPoint x="9.0" y="4.3"/>
      <boardColor hex="cccccc"/>
      <borderColor hex="ada47d"/>
      <coordinateColor hex="b6b6b6"/>
      <drawCoordinates>true</drawCoordinates>
      <coordinateOrigin>Top_Left</coordinateOrigin>
      <mode>TwoPoints</mode>
      <type>SQUARE</type>
    </diylc.boards.BlankBoard>

Board3

EL34xyz commented 3 years ago

Here's one of my Pro Jr DIYLC files The board was designed as is 10.06 inches long a long time ago in DIYLC Now click back and forth between opposing points and Explicit dimensions in the board edit selection box Which board do you think is the correct one?

pj1

pj2

bancika commented 3 years ago

does it load correctly the first time?

On Tue, Jun 30, 2020 at 4:52 PM EL34xyz notifications@github.com wrote:

Here's one of my Pro Jr DIYLC files The board was designed as is 10.06 inches long a long time ago in DIYLC Now click back and forth between opposing points and Explicit dimensions in the board edit selection box Which board do you think is the correct one?

[image: pj1] https://user-images.githubusercontent.com/16766383/86141228-cbdd0180-babf-11ea-8547-4f47251824ee.png

[image: pj2] https://user-images.githubusercontent.com/16766383/86141233-cda6c500-babf-11ea-9620-492197712d3e.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bancika/diy-layout-creator/issues/556#issuecomment-651845487, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXONCLRN7OMFXSIEPDMXHDRZH34RANCNFSM4OMEV2RA .

-- Branislav Stojkovic www.diy-fever.com

EL34xyz commented 3 years ago

That one did, but the 9 inch board up above did not It came up as 13 inches some how

But if I drag the board out longer in order to add more components, then explicit is not correct

Also, on an older file, if I switch to explicit, it wants me to enter the dimensions

It already knows the correct dimensions from the XML file Why do I have to figure out what the dimensions are from the ruler?

The original board is 12.14 inches long x 3.125 inches high I have to go open the xml file to figure out what the original dimensions were if I want to use explicit

Why can't the program just use the original dimensions for explicit if there never were any explicit dimensions?

bancika commented 3 years ago

I hear what you are saying. I did my best with the time I had to do it. It can always be improved.

On Tue, Jun 30, 2020 at 5:07 PM EL34xyz notifications@github.com wrote:

That one did, but the 9 inch board up above did not It came up as 13 inches some how

But if I drag the board out longer in order to add more components, then explicit is not correct

Also, if I switch to explicit, it wants me to enter the dimensions

It already knows the correct dimensions from the XML file Why do I have to figure out what the dimensions are from the ruler?

The original board is 12.14 inches long x 3.125 inches high I have to go open the xml file to figure out what the original dimensions were if I want to use explicit

Why can't the program just use the original dimensions for explicit if there never were any explicit dimensions?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bancika/diy-layout-creator/issues/556#issuecomment-651854507, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXONCMXSBATWJQWKU4FP3LRZH5TPANCNFSM4OMEV2RA .

-- Branislav Stojkovic www.diy-fever.com

EL34xyz commented 3 years ago

Thanks I was only made aware of this by a customer that could not get his custom board size set correctly I am surprised no other customers mentioned this until today But it is June and things have slowed down a bit here

bancika commented 3 years ago

Made a change that keeps explicit dimensions in sync with control point location. Will go out with 4.9.0

EL34xyz commented 3 years ago

Awesome, thanks!

And the opposite also? Whichever dimension you set sets the other one?

bancika commented 3 years ago

Only if the sequence matches the selected sizing mode. If you set sizing mode to "two points" and set the explicit length it won't do anything.

On Tue, Sep 15, 2020 at 6:24 PM EL34xyz notifications@github.com wrote:

Awesome, thanks!

And the opposite also? Whichever dimension you set sets the other one?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/bancika/diy-layout-creator/issues/556#issuecomment-692825910, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXONCKKLC7AGAZWZ22UY4TSF6IKFANCNFSM4OMEV2RA .

-- Branislav Stojkovic www.diy-fever.com