Skip to content

Help on adding datatypes as an option to qgeometries #982

@maxhant

Description

@maxhant

I want to have the option to choose which GDS datatype each geometry will belong to. For that, I have tried editing the render as follows:

    def _qgeometry_to_gds(
        self, qgeometry_element: pd.Series
    ) -> Union['gdspy.polygon', 'gdspy.FlexPath', None]:
        """
         Docs
        """

        # pylint: disable=too-many-locals

        corners = self.options.corners
        tolerance = self.parse_value(self.options.tolerance)
        precision = self.parse_value(self.options.precision)
        max_points = int(self.parse_value(self.options.max_points))

        geom = qgeometry_element.geometry  # type: shapely.geometry.base.BaseGeometry

        if isinstance(geom, shapely.geometry.Polygon):
            exterior_poly = gdspy.Polygon(
                list(geom.exterior.coords),
                layer=qgeometry_element.layer,
                datatype=qgeometry_element.sublayer,
            )

However, it does not work and I don't really understand why. It has an impact which is that all geometries are now on datatype 0. Can someone point me to the right direction?

What is the feature being requested?

Being able to expose the same layer with different intensities. Having them on separate layers does not work, else the cheesing will ignore the feature on higher layers. I have been discussing this on Slack.

What are use cases for this feature?

Having a more advanced fab.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions