Skip to content

Commit 3ce5067

Browse files
Merge pull request #2050 from KLayout/dev-polygon-graph
Dev polygon graph
2 parents 6ae3737 + 9917978 commit 3ce5067

89 files changed

Lines changed: 9988 additions & 2602 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

scripts/make_stubs.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ $python $inst/stubgen.py tl >$pyi_srcdir/tlcore.pyi
5757
echo "Generating stubs for db .."
5858
$python $inst/stubgen.py db tl,lay,rdb >$pyi_srcdir/dbcore.pyi
5959

60+
echo "Generating stubs for pex .."
61+
$python $inst/stubgen.py pex tl,db >$pyi_srcdir/pexcore.pyi
62+
6063
echo "Generating stubs for rdb .."
6164
$python $inst/stubgen.py rdb tl,db >$pyi_srcdir/rdbcore.pyi
6265

setup.py

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,25 @@ def version(self):
592592
)
593593
config.add_extension(_db)
594594

595+
# ------------------------------------------------------------------
596+
# _pex dependency library
597+
598+
_pex_path = os.path.join("src", "pex", "pex")
599+
_pex_sources = set(glob.glob(os.path.join(_pex_path, "*.cc")))
600+
601+
_pex = Library(
602+
config.root + "._pex",
603+
define_macros=config.macros() + [("MAKE_PEX_LIBRARY", 1)],
604+
include_dirs=[_tl_path, _gsi_path, _db_path, _pex_path],
605+
extra_objects=[config.path_of("_tl", _tl_path), config.path_of("_gsi", _gsi_path), config.path_of("_db", _db_path)],
606+
language="c++",
607+
libraries=config.libraries('_pex'),
608+
extra_link_args=config.link_args("_pex"),
609+
extra_compile_args=config.compile_args("_pex"),
610+
sources=list(_pex_sources),
611+
)
612+
config.add_extension(_pex)
613+
595614
# ------------------------------------------------------------------
596615
# _lib dependency library
597616

@@ -869,6 +888,28 @@ def version(self):
869888
sources=list(db_sources),
870889
)
871890

891+
# ------------------------------------------------------------------
892+
# pex extension library
893+
894+
pex_path = os.path.join("src", "pymod", "pex")
895+
pex_sources = set(glob.glob(os.path.join(pex_path, "*.cc")))
896+
897+
pex = Extension(
898+
config.root + ".pexcore",
899+
define_macros=config.macros(),
900+
include_dirs=[_db_path, _tl_path, _gsi_path, _pya_path, _pex_path],
901+
extra_objects=[
902+
config.path_of("_db", _db_path),
903+
config.path_of("_pex", _pex_path),
904+
config.path_of("_tl", _tl_path),
905+
config.path_of("_gsi", _gsi_path),
906+
config.path_of("_pya", _pya_path),
907+
],
908+
extra_link_args=config.link_args("pexcore"),
909+
extra_compile_args=config.compile_args("pexcore"),
910+
sources=list(pex_sources),
911+
)
912+
872913
# ------------------------------------------------------------------
873914
# lib extension library
874915

@@ -1010,8 +1051,8 @@ def version(self):
10101051
package_data={config.root: ["src/pymod/distutils_src/klayout/*.pyi"]},
10111052
data_files=[(config.root, ["src/pymod/distutils_src/klayout/py.typed"])],
10121053
include_package_data=True,
1013-
ext_modules=[_tl, _gsi, _pya, _rba, _db, _lib, _rdb, _lym, _laybasic, _layview, _ant, _edt, _img]
1054+
ext_modules=[_tl, _gsi, _pya, _rba, _db, _pex, _lib, _rdb, _lym, _laybasic, _layview, _ant, _edt, _img]
10141055
+ db_plugins
1015-
+ [tl, db, lib, rdb, lay, pya],
1056+
+ [tl, db, pex, lib, rdb, lay, pya],
10161057
cmdclass={'build_ext': klayout_build_ext}
10171058
)

src/buddies/src/bd/bd.pro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ HEADERS = \
3232

3333
RESOURCES = \
3434

35-
INCLUDEPATH += $$TL_INC $$GSI_INC $$VERSION_INC $$DB_INC $$LIB_INC $$RDB_INC $$LYM_INC
36-
DEPENDPATH += $$TL_INC $$GSI_INC $$VERSION_INC $$DB_INC $$LIB_INC $$RDB_INC $$LYM_INC
37-
LIBS += -L$$DESTDIR -lklayout_tl -lklayout_db -lklayout_gsi -lklayout_lib -lklayout_rdb -lklayout_lym
35+
INCLUDEPATH += $$TL_INC $$GSI_INC $$VERSION_INC $$DB_INC $$LIB_INC $$RDB_INC $$PEX_INC $$LYM_INC
36+
DEPENDPATH += $$TL_INC $$GSI_INC $$VERSION_INC $$DB_INC $$LIB_INC $$RDB_INC $$PEX_INC $$LYM_INC
37+
LIBS += -L$$DESTDIR -lklayout_tl -lklayout_db -lklayout_gsi -lklayout_lib -lklayout_rdb -lklayout_pex -lklayout_lym
3838

3939
INCLUDEPATH += $$RBA_INC
4040
DEPENDPATH += $$RBA_INC

src/buddies/src/bd/strmrun.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "gsiExpression.h"
3636
#include "libForceLink.h"
3737
#include "rdbForceLink.h"
38+
#include "pexForceLink.h"
3839
#include "lymMacro.h"
3940
#include "lymMacroCollection.h"
4041

src/buddies/src/buddy_app.pri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ SOURCES = $$PWD/bd/main.cc
1919

2020
INCLUDEPATH += $$BD_INC $$TL_INC $$GSI_INC
2121
DEPENDPATH += $$BD_INC $$TL_INC $$GSI_INC
22-
LIBS += -L$$DESTDIR -lklayout_bd -lklayout_db -lklayout_tl -lklayout_gsi -lklayout_lib -lklayout_rdb -lklayout_lym
22+
LIBS += -L$$DESTDIR -lklayout_bd -lklayout_db -lklayout_pex -lklayout_tl -lklayout_gsi -lklayout_lib -lklayout_rdb -lklayout_lym
2323

2424
INCLUDEPATH += $$RBA_INC
2525
DEPENDPATH += $$RBA_INC

src/db/db/db.pro

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ SOURCES = \
7070
dbNetlistSpiceReaderExpressionParser.cc \
7171
dbObject.cc \
7272
dbObjectWithProperties.cc \
73+
dbPLC.cc \
74+
dbPLCConvexDecomposition.cc \
75+
dbPLCTriangulation.cc \
7376
dbPath.cc \
7477
dbPCellDeclaration.cc \
7578
dbPCellHeader.cc \
@@ -105,8 +108,6 @@ SOURCES = \
105108
dbTextWriter.cc \
106109
dbTilingProcessor.cc \
107110
dbTrans.cc \
108-
dbTriangle.cc \
109-
dbTriangles.cc \
110111
dbUserObject.cc \
111112
dbUtils.cc \
112113
dbVector.cc \
@@ -308,6 +309,9 @@ HEADERS = \
308309
dbObject.h \
309310
dbObjectTag.h \
310311
dbObjectWithProperties.h \
312+
dbPLC.h \
313+
dbPLCConvexDecomposition.h \
314+
dbPLCTriangulation.h \
311315
dbPath.h \
312316
dbPCellDeclaration.h \
313317
dbPCellHeader.h \
@@ -343,8 +347,6 @@ HEADERS = \
343347
dbTextWriter.h \
344348
dbTilingProcessor.h \
345349
dbTrans.h \
346-
dbTriangle.h \
347-
dbTriangles.h \
348350
dbTypes.h \
349351
dbUserObject.h \
350352
dbUtils.h \

src/db/db/dbMutableRegion.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ MutableRegion::insert (const db::SimplePolygon &polygon)
8383
{
8484
if (polygon.vertices () > 0) {
8585
db::Polygon poly;
86-
poly.assign_hull (polygon.begin_hull (), polygon.end_hull ());
86+
poly.assign_hull (polygon.hull ());
8787
do_insert (poly, 0);
8888
}
8989
}
@@ -93,7 +93,7 @@ MutableRegion::insert (const db::SimplePolygonWithProperties &polygon)
9393
{
9494
if (polygon.vertices () > 0) {
9595
db::Polygon poly;
96-
poly.assign_hull (polygon.begin_hull (), polygon.end_hull ());
96+
poly.assign_hull (polygon.hull ());
9797
do_insert (poly, polygon.properties_id ());
9898
}
9999
}

0 commit comments

Comments
 (0)