The constructors from Polygon to DPolygon and from DPolygon to Polygon are provided, but not between an array of them, which is the root cause.
Therefore, the two cases below work if you want to keep pya.DPolygon in class MyPolygon.
I think f2650C.p…
Here is a PyPI version...
#--------------------------------------------------------------------------------------# Assumptions:# 1) You have the Python3 environment.# 2) You have installed the KLayout Python Module.# (https://www.klayo…
* When I created the empty layout, I set dbu=0.001 [um].
This is equivalent to using the class Layout's setter:
(Image)
* I first defined the four integer coordinates Point in the macro.
(Image)
* Then, I created two DPath (not Path) instance…
I think it's not a bug.
Maybe you saved it to a GDS file.
The round end of a Path can be saved and drawn if and only if:
(1) the output format is GDS
(2) (if not zero) bgn_ext = end_ext = width/2
See the experiments below.
#------------------…
Cont.
The [-b|--noborder]: no image border option was inappropriately named and had a bug.
Apologies for the inconvenience. The correct version is now:
Modified
-------------------------------------------------------------------------------------…
Cont.
As I observed above, your bitmap resolution (DPI) is too small.
So, I remade your Python script (see the attached ZIP file).
The wrapper batch (RunKlayoutDxf2Png.bat) script is no longer required.
I tested it on Linux Mint 20.3, Windows 11, a…
Cont.
With more observations, I understood as follows:
1. the output image size is 1080 x 1080 [pix]
2. the top cell's bounding box is 2041.2 [um] square
3. if the above bounding box is split into 5x5 regions, each covers 408.24 [um] square region
…
Hi @Flyingmyd,
* Do you pass the DXF file as input_file to def convert_gds_to_png(input_file, output_file, dbox_xmin, dbox_ymin, dbox_xmax, dbox_ymax, width, height): ? Or externally converted GDS2 file?
* conversion_log.txt seems to have the actua…
Thank you for sharing the DXF file.
Before going into the details of the code, I checked the DXF file itself.
See the six images below.
(Image)
(Image)
(Image)
Observations and Questions:
1. Some Polylines are not converted to Polygons but t…
Hi,
As @EugeneZelenko explained above, the Qt framework (subset) is a part of the KLayout main GUI program.
(Image)
If you want to use Qt with the KLayout standalone Python module, PyQt5 is a choice.
You can find a simple example in this post.
Can you attach the abc.dxf file by zipping it to abc.dxf.zip?
Also, please provide more details on using the save_image_with_options() function, including the clip window geometry.
Cont.
I have slightly improved Type-B to Type-B2.
Now the results are exported to an Excel file, as shown below.
(Image)
To use F2631B2.py, you need to python3 -m pip install pandas openpyxl.
Kazzz-S
P.S.
In a Windows environment, I recommend …
Cont.
I haven't tried your original batch file, but I often ask ChatGPT for help when encountering problems.
The following is for your reference.
Kazzz-S
Chat with ChatGPT o1-preview:
Question
A batch file for Windows. Correct errors if any.@FO…
Hi jiunnweiyeh,
I'm not very much sure if my idea satisfies your requirements.
However, my idea is to provide your photo engineers with a simple GUI tool using KLayout Python Module (https://www.klayout.org/klayout-pypi/).
Assumptions and prerequi…
I played with ChatGPT-4o.
from klayout import layinputgds = "ringo.gds"#inputlyp = "ringo.lyp"inputlyp = "invKazzzS.lyp"outputpng = "f2625-ringo.png"layoutview = lay.LayoutView()cvIdx = layoutview.loa…
Cont.
Assuming that my above understanding is OK, I wrote code3.py for this problem.
Some changes from your code include:
* I use the pandas module instead of csv.
* I take the three file names from the command line; not from environment variable…
(Image)
A code block should have been looked like this.
(Image)
Please attach the tidy code.
BTW, can you provide a dummy data set for "INPUT_GDS1", "INPUT_GDS2", and "ET_CSV"?
If my understanding is correct, you
…
Hi Kumaran,
First, please
make sure to surround your code block with triple-back quotes (```) like this for readability.
I modified your original code in two ways:
* code1.py --> to run the klayout main GUI executable in batch mode (as you …
Hello @DavidRLindley and @EugeneZelenko,
Thanks for your inspiring post. And the comments regarding LayoutView.each_layer.
Since it looked helpful if I had it, I implemented the feature in a simple command line tool.
I hope my understanding was OK.…
Hi,
I have confirmed that https://github.com/KLayout/klayout/issues/1874 has already fixed this problem.
The forthcoming maintenance release (0.29.8) will incorporate the modifications.
Hello,
I could reproduce the problem on Linux.
KLayout: 0.29.7 (r2d4f5d822)OS: Linux Mint 20.3g++: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0Qt: 5.15.7 (source build)Ruby: 3.1.3p185 (source build)Python: 3.12.6+ (heads/3.12:c6f3f83d888) (source build)
…
Hello folks,
I have a question (suggestion) related to these posts.
My Environment
OS: Linux Mint 20.3Python: 3.12.6+ (built from the source with "--enable-shared")KLayout: 0.29.7 (built from the source)
I invoke the klayout executable…
With two instances of cell A
(Image)
### Cell <A> in <F2592-2A.gds> contains <16> rectangles with L/D=5/0 ###### In Relative Coordinates ### (0,0;108,108) (200,0;308,108) (400,0;508,108) (600,0;708,108) (800,0;908,108) (10…
Hi,
About this?
Test Data
(Image)
(Image)
Code and Results
import klayout.db as kdbdef Find_BondingPad_Positions( indesign: str, layer: int, datatype: int ): #----------------------------------------------------------- # [1] Open the input …
Hi,
I think you have almost done it. :smile:
I have modified your code, as shown below.
import klayout.db as kdbdef list_all_cell_instances(layout, cell_name): # [1] Confirm the presence of "cell_name" target_cell = layout.cell(ce…