PrimitiveInstanceCollection#

class pyedb.grpc.database.primitive.primitive_instance_collection.PrimitiveInstanceCollection(pedb, core=None)#

Bases: pyedb.grpc.database.primitive.primitive.Primitive

Wraps a PrimitiveInstanceCollection core object.

A PrimitiveInstanceCollection efficiently represents large quantities of geometry (typically resulting from GDS/GDSII imports) as numerous instantiations of the same geometry at different locations, instead of one individual primitive per instantiation.

Reading the instantiated geometry (instantiated_geometry, geometry, positions) is a read-only, non-mutating operation performed lazily on demand. Converting the collection into individual, persisted primitives (decompose()) is a mutating operation and must be triggered explicitly by the caller.

Overview#

decompose

Decompose into individual primitives.

delete

Delete the primitive instance collection from the layout.

geometry

Base geometry that the primitive instance collection instantiates.

positions

Positions the base geometry is instantiated at.

instantiated_geometry

Geometry instantiated at each location in the primitive instance collection.

Import detail#

from pyedb.grpc.database.primitive.primitive_instance_collection import PrimitiveInstanceCollection

Property detail#

property PrimitiveInstanceCollection.geometry: pyedb.grpc.database.geometry.polygon_data.PolygonData#

Base geometry that the primitive instance collection instantiates.

Returns:
PolygonData
property PrimitiveInstanceCollection.positions: list[pyedb.grpc.database.geometry.point_data.PointData]#

Positions the base geometry is instantiated at.

Returns:
list[PointData]
property PrimitiveInstanceCollection.instantiated_geometry: list[pyedb.grpc.database.geometry.polygon_data.PolygonData]#

Geometry instantiated at each location in the primitive instance collection.

This is a read-only property. Unlike decompose(), accessing it does not mutate the layout: no new primitives are created and the collection is left untouched. It is intended for lazily inspecting/measuring the individual instantiated shapes (points, area, bounding box, etc.) without paying the cost of materializing them into real, persisted primitives.

Returns:
list[PolygonData]

Method detail#

PrimitiveInstanceCollection.decompose()#

Decompose into individual primitives.

A primitive will be created for each geometry instantiation. This operation mutates the layout (it materializes and persists one primitive per instance) and can be expensive for large collections. It is not called automatically; call it explicitly when individual, persisted primitives are required.

PrimitiveInstanceCollection.delete()#

Delete the primitive instance collection from the layout.