Replies: 4 comments 11 replies
-
Also added a little python script for generating a jpg from pdf: # needs packages pdf2image, pillow
# import modules
import os
from pdf2image import convert_from_path
from PIL import Image
# open pdf
images = convert_from_path('./CM4_MATX_PCB.pdf')
# convert to jpg
for img in images:
img.save('./CM4_MATX_PCB_tmp.jpg', 'JPEG')
# open jpg
img = Image.open(r"./CM4_MATX_PCB_tmp.jpg")
# set cropping (px)
left = 200
top = 100
right = 2300
bottom = 2200
# crop image
img_cropped = img.crop((left, top, right, bottom))
# save image
img_cropped.save("./CM4_MATX_PCB.jpg")
# remove *tmp.jpg
os.remove("./CM4_MATX_PCB_tmp.jpg") |
Beta Was this translation helpful? Give feedback.
-
Looks good. I'll try and get to testing putting this into the repo in the next couple of days. I'm more looking towards the automated PCB and schematic files than anything at the moment, since we aren't in a state to pass ERC/DRC checks anyway. |
Beta Was this translation helpful? Give feedback.
-
Python function for exporting a VRML file: ExportVRML_File() |
Beta Was this translation helpful? Give feedback.
-
IT LIVES |
Beta Was this translation helpful? Give feedback.
-
This thread is for showing all of my automation attempts.
I just dived into KiBot and KiAuto for generating PDF, Gerber and STEP files.
So i installed current releases of both repos and put the following
cm4_matx.kibot.yaml
file into the projects root folder.By running
kibot -b ./KiCad/CM4_MATX.kicad_pcb
from the root folder it creates the foldersgerber
,pdf
andstep
and populates these with the generated files. It also generates a BoM file namedCM4_MATX.csv
at the projects root.It can also be used as Github Action on push or merge (needs Docker).
Beta Was this translation helpful? Give feedback.
All reactions