GDS2WebGL icon indicating copy to clipboard operation
GDS2WebGL copied to clipboard

gds can not parse to Webgl succeessfully

Open eeeeeeeason opened this issue 3 years ago • 3 comments

thanks alot!!! i follow the docs and run command as follow, the gds is built by GDSPY https://github.com/heitzmann/gdspy

python .\gds2webgl.py -i .\spinQ_2qubit_initial_version.gds -o file.html
python .\gds2webgl.py -i .\spinQ_2qubit_initial_version.gds -o data.js  

but gds parse a cell into html, which cell 's points_str is 'AQ==' and triangles_str is 'AA=='
saddly ,nothing is in canvas.

it is different from the demo , i guess something lost after parsing

How can I make it work? Please help me, or please give my some advise.

MYSOURCE: link: https://static-cdn.spinq.cn/static/spinQ_2qubit_initial_version.gds

file.html and data.js https://static-cdn.spinq.cn/parsedhtml/data.js https://static-cdn.spinq.cn/parsedhtml/file.html

GDSPY OUTPUT JPG image

HTML OUTPUT FROM GDS2WEBGL image

eeeeeeeason avatar Jul 08 '22 06:07 eeeeeeeason

after changging the layer index i find it can draw something . but still imprecise need your help! thanks alot! image

eeeeeeeason avatar Jul 11 '22 11:07 eeeeeeeason

Hi! that looks indeed very interesting. The reason it breaks is probably that the pre-processing is optimized for rectilinear polygons. I did not anticipate more complex structures like these. It would be interesting to have support for more GDS primitives. However, I'm busy the next weeks. I may be able to look into this next month.

s-holst avatar Jul 11 '22 13:07 s-holst

hi, could you give me some suggestion to implement this function? or i think this problem is kind of triangle error, image mistake every time i draw some angle . could you explain how to understand this,so that i can do something. pentagon in gds viewer image pentagon in gds2webgl image

code could not understand image image

eeeeeeeason avatar Jul 12 '22 05:07 eeeeeeeason