宋元浩

PCB photo_comes with generation script

 
Overview

image.png

image.png

There are major updates and construction is slowly underway. . .

There is currently a problem with bmp support. It is recommended to use png format.

Front row tips

1. It has been compiled into an executable file and can be used directly by double-clicking it.

Windows and Linux compiled programs (By pyinstaller) Baidu network disk: https://pan.baidu.com/s/13-7_hlm7JqN-HB11WSxHig extraction code: LCNB

2. Try to process the pictures in PS, which will save a lot of work later.

3. The source code is on github: https://github.com/KnightSin/PIC2LCEDA

4. If you think it’s good, please give it a like and leave. Thank you! _(:з)∠)_

Modify records

(July 20, 2020 21:29) Changed the representation of copper sheets and changed the representation of output files

(23:00 on August 1, 2020) Change the generation of PCB to the generation of package. After saving, it can be directly placed into the PCB, eliminating the trouble of copying and possible computer freezes; fixed a bug: when generating the underlying image will invert the image

(August 2, 2020, 20:04) Added PCB files for frame information, added txt files for recording parameters, added backups before/after image processing, and placed the above parts in a new folder Internal; modified the presentation of some texts

(August 4, 2020 09:23) The parameter "Line Width" has been added, which can adjust the image fineness according to needs. Increasing the line width can reduce lag; the input method of the file path has been modified, and now you can directly Drag the file into the program to complete the file path input

(21:00 on December 1, 2020) User Kearney improved the path problem under linux and windows, and used pyinstaller to package windows and Linux installation-free versions; added user Kearneyi to the project members and merged his project on Github

Comparison picture - full of details!

image.png

process

1. Use PS to process the image into a file in .bmp format (or non-CYKM .jpg format)

main content:

Cutout, filter, binarization

image.png

2. Double-click to run the program

image.png

Fill in the parameters one by one

Image path: the full path of the original file. You can use an absolute path or a relative path (no Chinese characters). You can directly drag the file to complete the path input.

X maximum size/Y maximum size: The expected image size will not exceed the rectangular range with X and Y as the length and width.

Line width: the fineness of the image. Increasing the line width can reduce lag.

Level: The layer where the image information is located, the top silk screen layer or the top solder mask layer is recommended

Image threshold: the critical value for distinguishing black and white images

Image inversion: Invert the image from black to white to black

Horizontal flip, vertical flip: slightly

Create copper skin: Create a copper skin as large as the image on the top or bottom layer

3. Import into LCEDA

image.png

Open LCEDA, follow the process of "File->Open->EDA", open the LCEDA file import interface, and import the file just generated

image.png

Delete unnecessary elements, such as solid filling on the top surface/solid filling on the bottom surface, and save it to the package library. The saving may be slow, but it should not be a big problem. Just wait a while.

image.png

Create a new or open the generated PCB and place the picture. Note: Do not drag the picture directly. You should use the method of modifying the coordinates to change the position of the picture. Otherwise, you may be stuck and unable to take care of yourself.

(The effect of 3D preview is better than 2D preview)

image.png

Image preprocessing solution

1. Style 1 is suitable for pictures with clear color blocks.

image.png

(1) Color pictures -> Grayscale pictures

image.png

(2) Grayscale picture->Bitmap

image.png

image.png

2. Style 2 is suitable for realistic pictures

image.png

(1) Color pictures -> Grayscale pictures

It has been introduced in Style 1 and will not be repeated here.

image.png

(2)Contour

image.png

Use the shortcut key Ctrl+J to copy the layer, switch to a new layer, (Toolbar) Filter->Stylize->Find Edges

image.png

(Toolbar) Image->Adjustment->Threshold, set an appropriate threshold

image.png

Adjust the opacity of the new layer, 30% is recommended

image.png

Use the Ctrl+Shift+lt+E shortcut to create a new layer that will contain all visible layers

(3) Adjust the threshold and convert it into a bitmap

(Toolbar) Image->Adjustment->Threshold, set an appropriate threshold

image.png

(Toolbar)Image->Mode->Bitmap

image.png

Save it as a .bmp file

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2024-11-22 13:33:21

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号