fritzing / fritzing-app

Fritzing desktop application
http://fritzing.org
Other
4.04k stars 833 forks source link

Improve custom board shape import #1977

Open davidperrenoud opened 10 years ago

davidperrenoud commented 10 years ago

From andre.knoerig@gmail.com on May 16, 2012 08:56:20

Make it more tolerant:

There are probably some more cases that we could catch, but these are the more common issues.

Original issue: http://code.google.com/p/fritzing/issues/detail?id=1977

davidperrenoud commented 10 years ago

From irasc...@gmail.com on June 06, 2012 12:36:06

  1. could manage this by checking the image svg for this special case, and correcting the xml so that the layer id is placed in a element which encloses the element. There is a lot of code that depends on the layer IDs being in a group element and not on a leaf element.
  2. now detecting board shape using the element with the largest bounding rectangle
  3. you would have to determine the true bounding box of all the internal elements and compare that with the viewBox. If the difference were more than a few percent, change the viewBox and SVG width and height attributes, then add a transform so that all the elements are shifted to the top left.
failiz commented 2 years ago

From the old forum:

Copper Top Layer Views: 1026

Latest post time: 2012-10-31 22:27:01 UTC

Author: 5441

Body:

Hi there!

Probably I miss some Fritzing basics.

I am trying to trace a double side PCB. When I enable Copper Top Layer, the editor fills the entire space with yellow color - there is no way to distinguish where top layer traces are. When I switch the layer off, I can see the traces, but all pads, vias etc visually dissapear from the top layer. That makes manual tracing a kind of grope in the dark.

In YouTube tutorials there is no such strange effect.

Thank you.

Time: 2012-05-16 13:25:53 UTC

Edited at:

Author: 7

Body:

Hi zxfr, This might be caused by your custom board SVG. Make sure it really only has a "board" and a "silkscreen" layer. And for validation, check if you have the same issues if you're using the standard rectangle pcb. If that does not help, please send us the file to info (at) fritzing (dot) org, then we will have a look.

Time: 2012-05-16 14:15:55 UTC

Edited at:

Author: 5441

Body:

Thank you for the prompt reply! Yes, you are right - it is something wrong with the custom board SVG. With the standard rectangular PCB it works as it should.

I've just sent you the SVG. As for me it is ok - only board and silkscreen layers there (well, they are nested to the main one)

Time: 2012-05-16 14:39:19 UTC

Edited at:

Author: 7

Body:

The problem is that your ids are in the path element and not in a surrounding group element. Instead of this:

it should be:

I'll see if we can support the path ids in the future, but for now it should work with the gs.

Time: 2012-05-16 14:50:17 UTC

Edited at:

Author: 5441

Body:

Thank you! That did the trick!

Time: 2012-05-16 21:56:04 UTC

Edited at:

Author: 7531

Body:

I noticed you have to right click groups to set #copper traces in InkScape..this made a horrendeus 'copper traces not found' error otherwise.

failiz commented 2 years ago

In addition to this, Fritzing should have a way to draw the board shape (contour).