Sample Code Revit Batch Processor 1.1.11 documentation

Contents:

This Page

duHast.Data.Objects.Collectors.Properties.Geometry package

Submodules

duHast.Data.Objects.Collectors.Properties.Geometry.geometry_base module

Geometry data storage class.

class duHast.Data.Objects.Collectors.Properties.Geometry.geometry_base.DataGeometryBase(data_type, j=None, **kwargs)

Bases: DataBase

Class constructor

Parameters:

j (dict, optional) – json formatted dictionary of this class, defaults to {}

duHast.Data.Objects.Collectors.Properties.Geometry.geometry_bounding_box_2 module

Geometry data bounding_box storage class.

class duHast.Data.Objects.Collectors.Properties.Geometry.geometry_bounding_box_2.DataGeometryBoundingBox2(j=None, *args, **kwargs)

Bases: BoundingBox2, DataGeometryBase

Class constructor for a 2D bounding box.

Parameters:

j (dict, optional) – json formatted dictionary of this class, defaults to {}

data_type = 'bounding box 2'

duHast.Data.Objects.Collectors.Properties.Geometry.geometry_polygon_2 module

Polygon geometry data storage class.

A polygon consists, as a minimum, of an outer loop, but may also have any number of inner loops. Those inner loops describe holes in the surface the outer loop decribes.

Loops are made up of a number of 2D points.

class duHast.Data.Objects.Collectors.Properties.Geometry.geometry_polygon_2.DataGeometryPolygon2(j=None)

Bases: DataGeometryBase

Class constructor for a 2d polygon.

Parameters:

j (dict, optional) – json formatted dictionary of this class, defaults to {}

data_type = 'polygon'
add_point_to_outer_loop(point)

Adds a point to the outer loop.

Parameters:

point (Point2) – Point2 instance to add to the outer loop

Raises:

TypeError – if the point is not an instance of Point2

add_inner_loop(loop)

Adds a new inner loop to the inner loops list.

Parameters:

loop (list[Point2]) – List of Point2 instances representing an inner loop

Raises:
  • ValueError – if the loop does not contain at least 3 points

  • TypeError – if any element in the loop is not an instance of Point2

duHast.Data.Objects.Collectors.Properties.Geometry.geometry_topo_cell module

Geometry data storage class.

class duHast.Data.Objects.Collectors.Properties.Geometry.geometry_topo_cell.DataTopologyCell(j=None)

Bases: DataGeometryBase

Class constructor

Parameters:

j (dict, optional) – json formatted dictionary of this class, defaults to {}

data_type = 'topology cell'

Module contents