py4design.analysisrulepalette module¶
-
class
py4design.analysisrulepalette.
BaseAnalysisRule
¶ Bases:
object
The base class for developing new analysis rule for analysing topologies in massing model. For more information please refer to Chen, Kian Wee, Patrick Janssen, and Leslie Norford. 2017. Automatic Generation of Semantic 3D City Models from Conceptual Massing Models. In Future Trajectories of Computation in Design, Proceedings of the 17th International Conference on Computer Aided Architectural Design Futures, pp 84 to 100. Istanbul, Turkey.
-
for_topo_type
¶ The topological type the rule apply to: there are 7 topologies, vertex, edge, wire, face, shell, solid, compsolid, compound.
-
dict_key
¶ The key to the value that will be added to the ShapeAttributes class instance, the value must be a True or False (bool).
-
execute
(occshape_dict_list)¶ The definition of the analysis rule and the method executes the analysis rule
-
-
class
py4design.analysisrulepalette.
IsShellClosed
¶ Bases:
py4design.analysisrulepalette.BaseAnalysisRule
An implementation of the BaseAnalysisRule class for checking if the shell in the massing models are closed.
-
for_topo_type
¶ The rule applies to the shell topology.
-
dict_key
¶ The attribute name of rule result: “is_shell_closed”.
-
execute
(occshape_attribs_obj_list)¶ This function executes the rule to check if all the shells in the massing model are closed. Shells that are not closed will have an attribute “is_shell_closed”: False, shells that are closed will have an attribute “is_shell_closed”: True.
Parameters: occshape_attribs_obj_list : list of ShapeAttributes objects
The geometeries of the massing model to be checked.
Returns: checked occshape_attribs_obj_list : list of ShapeAttributes objects
List of checked geometries with the appended attributes.
-
-
class
py4design.analysisrulepalette.
IsShellInBoundary
¶ Bases:
py4design.analysisrulepalette.BaseAnalysisRule
An implementation of the BaseAnalysisRule class for checking if the shell is in the boundary of another shell.
-
for_topo_type
¶ The rule applies to the shell topology.
-
dict_key
¶ The attribute name of rule result: “is_shell_in_boundary”.
-
execute
(occshape_attribs_obj_list)¶ This function executes the rule to check if all the shells in the massing model are in the boundary of another shell. Shells that are in the boundary of another shell will have an attribute “is_shell_in_boundary”: True, shells that are not will have an attribute “is_shell_in_boundary”: False.
Parameters: occshape_attribs_obj_list : list of ShapeAttributes objects
The geometeries of the massing model to be checked.
Returns: checked occshape_attribs_obj_list : list of ShapeAttributes objects
List of checked geometries with the appended attributes.
-
-
class
py4design.analysisrulepalette.
ShellBoundaryContains
¶ Bases:
py4design.analysisrulepalette.BaseAnalysisRule
An implementation of the BaseAnalysisRule class for checking if the shell contains another shell.
-
for_topo_type
¶ The rule applies to the shell topology.
-
dict_key
¶ The attribute name of rule result: “shell_boundary_contains”.
-
execute
(occshape_attribs_obj_list)¶ This function executes the rule to check if all the shells in the massing model contain another shell. Shells that contain another shell will have an attribute “shell_boundary_contains”: True, shells that does not contain another shell will have an attribute “shell_boundary_contains”: False.
Parameters: occshape_attribs_obj_list : list of ShapeAttributes objects
The geometeries of the massing model to be checked.
Returns: checked occshape_attribs_obj_list : list of ShapeAttributes objects
List of checked geometries with the appended attributes.
-
-
class
py4design.analysisrulepalette.
IsEdgeInBoundary
¶ Bases:
py4design.analysisrulepalette.BaseAnalysisRule
An implementation of the BaseAnalysisRule class for checking if the edge is in the boundary of a shell.
-
for_topo_type
¶ The rule applies to the edge topology.
-
dict_key
¶ The attribute name of rule result: “is_edge_in_boundary”.
-
execute
(occshape_attribs_obj_list)¶ This function executes the rule to check if all the edges in the massing model are in the boundary of another shell. Edges that are in the boundary of another shell will have an attribute “is_edge_in_boundary”: True, edges that are not will have an attribute “is_edge_in_boundary”: False.
Parameters: occshape_attribs_obj_list : list of ShapeAttributes objects
The geometeries of the massing model to be checked.
Returns: checked occshape_attribs_obj_list : list of ShapeAttributes objects
List of checked geometries with the appended attributes.
-