fritzing / fritzing-app

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

PCB view for custom part showing in Inspector and New Parts Editor but not present when part added to sketch #2442

Open davidperrenoud opened 10 years ago

davidperrenoud commented 10 years ago

From terryle...@gmail.com on March 03, 2013 01:34:01

What steps will reproduce the problem? 1. Create a new part BC84, using the new parts editor to add various SVGs for the views including PCB view all SVGs being cloned from other parts and edited using Inkscape.

  1. My Parts part BC84 shows PCB correctly in the inspector.
  2. But when the BC84 part is added to a sketch, the PCB layout disappers in the inspector. In PCB view, the silk screen and copper layers are not visible either. Also in PCB view, there is an offset between what seems to be a device bounding box and the connection points that the rats nest lines connect to.

Attach your sketch file and/or custom part files to the bug report. DONE What is the expected output? What do you see instead? See above, there is some corruption in the PCB SVG that prevents it from working properly

What version of Fritzing are you using? Versoin 0.7.12

On what operating system? Windows Vista Please provide any additional information below. NA

Attachment: DC Valve Assy V1b.fzz BC84_BB.svg BC84_ii.svg BC84_pcb.svg BC84_schem.svg

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

davidperrenoud commented 10 years ago

From irasc...@gmail.com on March 03, 2013 01:29:05

The DC Valve Assy V1b.fzz contains a custom part G6K-2P-Y1 which seems to be working fine, but there is no BC84 custom part in the file. Please either export the BC84 part, or drop it in a sketch and save the sketch--uploading either file to this bug report. Thanks.

davidperrenoud commented 10 years ago

From terryle...@gmail.com on March 03, 2013 06:27:25

OK thank you! As requested, I've attached the BC84 part export and an updated sketch that places two of these parts.

Attachment: BC84.fzpz DC Valve Assy V1b.fzz

davidperrenoud commented 10 years ago

From irasc...@gmail.com on March 03, 2013 08:17:18

The BC84 part works fine when placed on the copper top layer. The graphics do indeed disappear when it is placed on the copper bottom layer. It looks to me like the flip function isn't working correctly--flipping the graphics outside the clipping region.

Status: Accepted
Owner: irasc...@gmail.com

davidperrenoud commented 10 years ago

From irasc...@gmail.com on March 03, 2013 10:44:43

It is indeed a bug in the flip code.

There is a workaround, which is to edit the pcb svg file, probably easiest with a text or xml editor.

Where the file currently has:

...

change it by moving the transform attribute:

...

Similarly move the transform attribute for the copper1 element so that you wind up with:

...
davidperrenoud commented 10 years ago

From terryle...@gmail.com on March 03, 2013 11:25:39

Yes, that works! Thank you very much for your assistance.

Now, when you mention "flip code", is there a feature in PCB view to flip the PCB, so I can place parts on the bottom?

davidperrenoud commented 10 years ago

From irasc...@gmail.com on March 03, 2013 11:31:45

There is a button in the tool bar at the bottom of the window which chooses the active layer: top layer, bottom layer, or both. The button is a toggle. Click until you select the bottom layer. Then drop your SMD part. Fritzing does not currently support THT parts on the bottom.

davidperrenoud commented 10 years ago

From terryle...@gmail.com on March 03, 2013 11:56:40

OK, tried that with the QFN-24 part that has the Copper1 Copper0 option and while the PCB view does highlight/dehighlight the copper pads depending on the PCB view layer toggle, the part is always in a top layer orientation, which is immediately a problem, because the bottom layer has to be a mirror image to line the pads up with the copper surface.

In the core SVG for the QFN-24 part, I see there is only the one Copper0, so I don't know where/how the inspector determines that there is an option for Copper0 and Copper1. Moreover, it seems to me that, if Copper 1 is selected, there is a major problem as the device pads are going to point in the air to line up with the traces when the device is on the bottom, or if the device is placed to contact the pads with the traces, the pins will be mirror image reversed to the traces.

davidperrenoud commented 10 years ago

From terryle...@gmail.com on March 03, 2013 12:26:15

I am very sorry, I see that bottom and top layer placement does work properly for the QFN-24 part. It seems simply that I cannot duplicate that functionality with the current parts editor.

It would still be great to have a flip option in PCB view to be able to see the bottom surface of the PCB too put text etc.

davidperrenoud commented 10 years ago

From irasc...@gmail.com on March 03, 2013 12:30:59

I have a hard time following orientation issues without looking at images, so I have attached an image of the QFN-24 placed on the top, another on the bottom, then both layers set to active. The one on the bottom is mirrored vertically wrt the one on the top.

Am I missing your point?

Attachment: qfn.png

davidperrenoud commented 10 years ago

From irasc...@gmail.com on March 03, 2013 16:38:13

I may still be missing the point, but here is the same mirroring using the bc84 part (after applying the fix in comment 4). There is no copper0/copper1 selector, but you can use the active layer to control whether the part is placed on the bottom or the top--the bc84 to the right is on top, the bc84 to the left is on the bottom.

The view from the underside is on the to-do list. Silkscreen on the bottom won't be supported until that is implemented.

Attachment: bc84.png

davidperrenoud commented 10 years ago

From irasc...@gmail.com on March 03, 2013 16:39:52

PS. If you create a part with only copper1 layer specified, then the code assumes it is an SMD part, and Frizing will allow you to place it either on the top or the bottom.

davidperrenoud commented 10 years ago

From terryle...@gmail.com on March 03, 2013 16:55:34

Yes perfect!

I can't thank you enough for your thoughtful and valuable comments on this issue. Fritzing is a very impressive application with unbelievable support.