diff --git a/src/specklepy/objects/GIS/__init__.py b/src/specklepy/objects/GIS/__init__.py index 0385de2..5845b0e 100644 --- a/src/specklepy/objects/GIS/__init__.py +++ b/src/specklepy/objects/GIS/__init__.py @@ -16,6 +16,7 @@ from specklepy.objects.GIS.geometry import ( GisRasterElement, PolygonGeometry, PolygonGeometry3d, + GisMultipatchGeometry, ) from specklepy.objects.GIS.layers import RasterLayer, VectorLayer @@ -25,6 +26,7 @@ __all__ = [ "GisPolygonGeometry", "PolygonGeometry", "PolygonGeometry3d", + "GisMultipatchGeometry", "GisPolygonElement", "GisLineElement", "GisPointElement", diff --git a/src/specklepy/objects/GIS/geometry.py b/src/specklepy/objects/GIS/geometry.py index a3d4769..c1d8dae 100644 --- a/src/specklepy/objects/GIS/geometry.py +++ b/src/specklepy/objects/GIS/geometry.py @@ -22,9 +22,11 @@ class PolygonGeometry(Base, speckle_type="Objects.GIS.PolygonGeometry"): def __init__( self, + units: str, boundary: Polyline, voids: Optional[List[Polyline]] = None, ) -> None: + super().__init__(units=units) self.boundary = boundary self.voids = voids or [] @@ -40,10 +42,30 @@ class PolygonGeometry3d( def __init__( self, + units: str, boundary: Polyline, voids: Optional[List[Polyline]] = None, ) -> None: - super().__init__(boundary=boundary, voids=voids) + super().__init__(units=units, boundary=boundary, voids=voids) + + +class GisMultipatchGeometry( + Base, + speckle_type="Objects.GIS.GisMultipatchGeometry", +): + """GIS Polygon3d Geometry""" + + def __init__( + self, + units: str, + faces: List[int], + vertices: List[float], + colors: Optional[List[int]], + ) -> None: + super().__init__(units=units) + self.faces = faces + self.vertices = vertices + self.colors = colors or [] @deprecated(version="2.20", reason="Replaced with GisPolygonFeature")