MichaelCache / gds_viewer

a simple gui viewer to show gdsii geomtery, based on qt, and gdstk
6 stars 1 forks source link

Draw Question #1

Open SouthChinaHuihuisauce opened 7 months ago

SouthChinaHuihuisauce commented 7 months ago

Hello dear author, I encountered an issue while opening the GDS file. It seems that the coordinates of the module definition were also drawn in. I would like to know where the code for this part is located and would like to make further modifications. gds_viewer

MichaelCache commented 7 months ago

Glad to see someone to using my code. I didn't get what the "It seems that the coordinates of the module definition were also drawn in" means. I just rendered polygons from gds file, even ignored path. I use opegl to render polygons, if you like draw coordinate in layout, opengl may not a good idea. For render polygons, just put polygon's data in QOpenGLBuffer, gl will render it automaticlly. By the way, ear clipping trianglation of polygon in my code is not good enough. I will refactor whole project and append more comment clear in later.

SouthChinaHuihuisauce commented 7 months ago

Glad to see someone to using my code. I didn't get what the "It seems that the coordinates of the module definition were also drawn in" means. I just rendered polygons from gds file, even ignored path. I use opegl to render polygons, if you like draw coordinate in layout, opengl may not a good idea. For render polygons, just put polygon's data in QOpenGLBuffer, gl will render it automaticlly. By the way, ear clipping trianglation of polygon in my code is not good enough. I will refactor whole project and append more comment clear in later.

Thank you for your reply. I am not very familiar with OpenGL and may need to learn it. Thank you again for your advice. I am also considering using GraphicsView, Item, and Scene. We can communicate more and learn together.