__init__.py Initialization file for bdspace package
BDSpace Provides resources for managing spaces in Buildes
moduleauthor: | Kene Meniru <Kene.Meniru@illom.org> |
---|
Space data object
Provides tools for specifying and managing space data in buildes.
moduleauthor: | Kene Meniru <Kene.Meniru@illom.org> |
---|
Bases: buildesdata.BuildesData
Manages data about building spaces.
Adds temporary sequential corners to the space data object
Parameters: |
|
---|
Updates share information to connect an edge with its share.
Structure of _shares is: {share_name: shared_name}. A share is a side that is deriving its definition from another existing side. A shared side is an existing side whose definition is being used by another.
Parameters: |
|
---|
Change the snap_id associated with named share to new_id
When connections are made with shares, the snappoint label must be either of the two share axis end points.
Parameters: |
|
---|
Returns the ids and names of two connected sides.
Each named side is connected to two others located at both ends. This routine finds the snap at each named connection as well as the snap and name for each other side.
Parameter: | name (String) – Name of side to get the connecting sides. |
---|---|
Returns: | Snaps and names of sides at both ends of named side. |
Return type: | [String, String, String, String, String, String] |
Provides access to the recognized corners.
So long as there is no unpaired corner or there are two or more sides captured so far, this routine turns the contents of corners into a list which is returned to the caller.
Returns: | All items recorded in corners |
---|---|
Return type: | List |
Returns a list of corners that are not closed i.e. not paired.
corners = { p1: [(name1, snap_id)] p2: [(name1, snap_id), (name2, snap_id)] }
Returns: | List of corners that are not closed. |
---|---|
Return type: | [] | [String, ...] |
Gets the coords in sequence from edge1 and edge2.
Returns: | Compiles and returns coords in sequence. |
---|---|
Return type: | List |
Determine if edge with name has a share-relationship.
Parameter: | name (String) – Name of edge to check for share relationship |
---|---|
Returns: | Other object with which there is a share-relationship |
Return type: | String |
Answers whether the sides have been sequenced.
When the sides of a space is sequenced, the first side of the first recogniz corner should be the last of the last recognized corner.
Returns: | Whether sequencing of sides in the boundary is complete |
---|---|
Return type: | Boolean |
Update the sides that make up the corners of the space.
Parameters: |
|
---|
Update number of found corners for object.
Corners should equal the number of total sides for the space.
Space
Provides space object for the buildes program.
moduleauthor: | Kene Meniru <Kene.Meniru@illom.org> |
---|
Bases: buildesmanager.BuildesManager
Provides tools for making building spaces
Designate existence of axis snap letter in the arguments
Parameters: |
|
---|
Parameters: |
|
---|---|
Returns: | Corner coordinates and side names with snaps |
Return type: | List |
Calculate or update corner information for space.
The sides of a space provides connections that describe the corners of the space. When the side is also a share, there is additional work to be done before the corner is successfully recorgnized. This routine initializes this process.
This routine determines the type of side that needs updating and calls the appropriate manager to do the work.
When a new side or a new share is placed in the design, this routine deciphers the other sides (belonging to the same space) that are connected to it. It sends the connection point(s) and the name(s) of the other connected side(s) to the space data for storage.
Parameter: | side (BuildesData) – Reference to parent object. |
---|
Find L or R edge corner coordinates made by two sides
This routine depends on a few things and the focus is to organize the content of arg. If snap is empty then reps must be zero which means that this is the first run for this routine. Otherwise snap provides a way to organize vecs obtained using arg into edge1 and edge2. During the first run, the first name in arg is assigned to edge1 and the second to edge2. Lastly snap is used to mark edge1. In subsequent runs, snap is used to determine which name is on which edge.
[(NAME1, SNAP1), (NAME2, SNAP2)]
Parameters: |
|
---|
Establish orientation for space object.
Parameter: | data (BuildesData) – Space data object |
---|
Find vecs when two sides make a corner via two axis.
Parameters: |
|
---|
Get the next valid corner and the principal object involved.
Need to look through a list of objects and their snaps to determine which pair is consecutive to the last one and to modify the list so that the next pair can be deciphered. The sequence is based on which pair connects to the previous one. Any one object is involved twice only. If this is the first run, the first pair is selected and the second object is made the principal object. The selected pair is then deleted from the list. In consecutive runs any pair that involves the principal object is always selected and the positions of the pair modified so that the principal always comes first.
Parameters: |
|
---|---|
Returns: | A modified list, a corner and the principal object |
Return type: | List |
Find vecs when two sides make a corner via one axis.
Parameters: |
|
---|
Determine if two sides are connected.
First determines if the two sides touch at all. If so then it tries to determine where they are connecting. If there is a connection the return provides the snappoint or edge for other side (oside) and the snappoint or edge on side (side).
Parameters: |
|
---|---|
Returns: | Whether oside is connected to side. |
Rtype: | False | [String, String] |
Set common attributes for all space data objects.
Parameter: | data (SpaceData) – Space object being created |
---|
Creates a new SpaceData object.
Parameters: |
|
---|---|
Returns: | New space object. |
Return type: | SpaceData |
Make summary message about mark object for display in ui.
Parameter: | data (BuildesData) – Data object that has the message to be composed. |
---|
Makes the boundary objects for the space.
This routine depends on recognizing a previously identified side and edge. It traces connections with subsequent new sides and corresponding edges for a single space. The goal is to arrive at the original starting side and point on selected edge. This selected edge is referred to as edge1 while the other is edge2.
Parameter: | data (SpaceData) – Space data object |
---|
Make PythonOCC shape object for space data object.
Parameter: | data (SpaceData) – Space data object |
---|
Establishes a name relationship for sides in spaces.
There are two sides that are sharing parts of their location and size. We need to find the space for each side in order to store the names of each side.
Parameters: |
|
---|
Calculates the defining parts of the space data object.
Parameter: | data (BuildesData) – Object to be made |
---|
Summarized parts message.
Parameter: | obj (BuildesData) – Object for which to create summary message. |
---|
Summarized relations message.
Parameter: | obj (BuildesData) – Object for which to create summary message. |
---|
SpaceSideData Object
Manages data for space boundary objects.
moduleauthor: | Kene Meniru <Kene.Meniru@illom.org> |
---|
Bases: buildesdata.BuildesData
Manages data for the sides of spaces.
Determine if a corner has been cleaned.
Sides have corners that are designated by a letter and a number. The letter designates the edge the corner is on while the number designates the end the corner is on. The cleaning process happens on corners however once a corner has been cleaned, it is not possible to clean that or the other corner on the same wall end. For this reason this routine uses the corner number to determine cleaning.
Parameter: | corner (String) – Designation for a corner. |
---|---|
Returns: | A boolean flag on whether specified end has been cleaned. |
Return type: | Boolean |
Saves a calculated endpoint for side.
Parameter: | point (Vector) – Coordinates for one endpoint of this object |
---|---|
Returns: | Returns the two vector points at both ends of side axis |
Return type: | False | [Vector, Vector] |
Designates that a corner has been cleaned.
Parameter: | corner (String) – Designation for a cleaned edge. |
---|
Add or replace a coordinate in coords.
In addition to adding or replacing coordinates this routine is specialized here to adjust corners through the wall cleaning process.
If the clean flag is set to true, it means that an attempt is being made to clean corner at new_name. Corners should not be cleaned more than once. So with the clean flag set to true, so long as the corner has not been cleaned before it will be cleaned but will then be flagged as cleaned. Without the clean flag set to true, the adjustment will still be performed if the corner has not been cleaned before however it will not be marked as cleaned. So if the clean flag is not true, the adjustment will be ignored if the corner has already been cleaned. See SpaceSideData.cleaned() for additional information.
Parameters: |
|
---|
SpaceSide Tool
Provides information for defining space edge objects.
moduleauthor: | Kene Meniru <Kene.Meniru@illom.org> |
---|
Bases: buildesmanager.BuildesManager
Provides tools for making the edges of spaces.
Establish orientation for line data object.
Parameter: | data (SpaceLineSideData) – Object that needs it orientation deciphered |
---|
Make a arc edge between provided points
Parameters: |
|
---|---|
Returns: | A PythonOCC edge between provided points |
Return type: | BRepBuilderAPI_MakeWire |
Set common attributes for all edge data objects.
Parameter: | data – |
---|
Make a solid edge from a closed contour definition.
Parameters: |
|
---|---|
Returns: | A solid edge object. |
Return type: | BRepPrimAPI_MakePrism |
Make a line edge between provided points.
Parameters: |
|
---|---|
Returns: | An PythonOCC edge between provided points. |
Return type: | BRepBuilderAPI_MakeWire |
Compile information about sides.
Parameter: | data (SideData) – Data side object |
---|
Summarized identification message.
Parameter: | obj (BuildesData) – Object for which to create summary message. |
---|---|
Returns: | Formatted text for predetermined cells in the spreadsheet |
Return type: | SpreadSheet |
Summarized parts message.
Parameter: | obj (BuildesData) – Object for which to create summary message. |
---|
Summarized relations message.
Parameter: | obj (BuildesData) – Object for which to create summary message. |
---|
SpaceLineSideData
Manages data for space line side objects.
moduleauthor: | Kene Meniru <Kene.Meniru@illom.org> |
---|
Bases: bdspace.spacelinesidedata.SpaceLineSideData
Manages data for space line close sides.
Bases: bdspace.spacelinesidedata.SpaceLineSideData
Manages data for space line open sides.
Bases: bdspace.spacelinesidedata.SpaceLineSideData
Manages data for space line share sides.
Bases: bdspace.spacesidedata.SpaceSideData
Manages data for space line sides.
Temporarily saves a calculated endpoint for side.
This is necessary for making shares. The coords class attribute is temporarily used to store the points obtained through the share mechanism. Only two points are required that designate the start and end points of the share. When the second point is received both points are returned to the caller and removed from coords.
Parameter: | point (Vector) – Coordinates for one endpoint of this object |
---|---|
Returns: | Returns the two vector points at both ends of side axis |
Return type: | False | [Vector, Vector] |
SpaceLineSide manager
Provides information for defining space line side objects.
moduleauthor: | Kene Meniru <Kene.Meniru@illom.org> |
---|
Bases: bdspace.spacelinesidemanager.SpaceLineSide
Provides tools for making space line close sides.
Created a new space closeSide data object.
Parameters: |
|
---|
Make PythonOCC shape for line close side object.
Parameter: | data – |
---|
Bases: bdspace.spacelinesidemanager.SpaceLineSide
Provides tools for making space line open sides.
Created a new space openSide data object.
Parameters: |
|
---|
Make PythonOCC shape for line open side object.
Parameter: | data – |
---|
Bases: bdspace.spacelinesidemanager.SpaceLineSide
Provides tools for making space line share sides.
Create a new space side shared object.
Parameters: |
|
---|---|
Returns: | New side with the shared properties |
Return type: | SpaceLineShareData |
Make PythonOCC shape for line close side object.
Parameter: | data – |
---|
Bases: bdspace.spacesidemanager.SpaceSide
Provides tools for making space line sides.
Establish orientation for line data object.
Parameter: | data (SpaceLineSideData) – Object that needs it orientation deciphered |
---|
Determines endpoints of shares in preparation for installation.
When there is a single share, then the corner point is on the axis connection between the shared and the other side. When there are two shares, the corner point is on the axis connection between the two shared objects.
When a connection point is determine the point is saved for the side with the share. If both objects have shares, then the corner point is on the axis of both shares and therefore saved for both sides. When a share receives two points, it is installed.
Parameters: |
|
---|
Install and trim a share.
The share object is first re-made to establish its actual size and location. Then it makes sure that the the share and the existing share is not parallel before sending it to be trimmed.
Parameters: |
|
---|
Make common tasks and attributes for line space edge data objects.
Parameter: | data (SpaceLineSideData) – Object that needs common attributes |
---|
Create an introductory message for line close object.
Parameter: | data (LineCloseData) – Data side/wall object |
---|
Make snappoints that define the profile for line side object.
Additional notes to be added here later on when things are moving smoothly.
Parameter: | data (SpaceLineSideData) – Object that need its profile made |
---|
Make PythonOCC shape for line side object.
Parameter: | data – |
---|
Prepares the parts of the line side.
Calculate dimensions for sideboards, etc. Basically anything that may change after a wall has been placed.
Parameter: | data – |
---|
Calculate intersection between a line share and another side1.
Parameters: |
|
---|---|
Returns: | Coords at which both objects connect. |
Return type: | Vector |
Summarized parts information.
Parameter: | obj – |
---|
SpaceArcSideData
Manages data for space arc side objects.
moduleauthor: | Kene Meniru <Kene.Meniru@illom.org> |
---|
Bases: bdspace.spacearcsidedata.SpaceArcSideData
Manages data for space arc close sides.
Bases: bdspace.spacearcsidedata.SpaceArcSideData
Manages data for space arc open sides.
Bases: bdspace.spacearcsidedata.SpaceArcSideData
Manages data for space arc open sides.
Bases: bdspace.spacesidedata.SpaceSideData
Manages data for space arc sides.
SpaceArcSide manager
Provides information for defining space arc side objects.
moduleauthor: | Kene Meniru <Kene.Meniru@illom.org> |
---|
Bases: bdspace.spacearcsidemanager.SpaceArcSide
Provides tools for making space arc close sides.
Created a new space side data object.
Provide image of the arc side here
Parameters: |
|
---|---|
Returns: | New object |
Return type: | SpaceArcClose |
Make PythonOCC shape for arc close side object
Parameter: | data – |
---|
Bases: bdspace.spacearcsidemanager.SpaceArcSide
Provides tools for making space arc open sides.
Created a new space side data object.
:param : :type : :returns: New object :rtype: SpaceArcOpen
Make PythonOCC shape for arc open side object
Parameter: | data – |
---|
Bases: bdspace.spacearcsidemanager.SpaceArcSide
Provides tools for making space arc share sides.
Created a new space side data object.
:param : :type : :returns: New object :rtype: SpaceArcShare
Make PythonOCC shape for arc share side object
Parameter: | data – |
---|
Bases: bdspace.spacesidemanager.SpaceSide
Provides tools for making space arc sides.
Determines endpoints of shares in preparation for installation.
Parameter: | data – |
---|
Install and trim arc share object
Parameter: | data – |
---|
Make common tasks and attributes for line space edge data objects.
Parameter: | data – |
---|
Create an introductory message for line close object.
Parameter: | data (LineCloseData) – Data side/wall object |
---|
Make the points that define the profile for arc side object.
Using the angles calculated in prepdata, obtain the actual coordinates for all points on the profile of the arc object
Parameter: | data – |
---|
Make PythonOCC shape for arc close side object
Parameter: | data – |
---|
Calculates the defining parts of the arc data object.
The angle_list provides values for all snap points of the arc object with the desired rotation from user applied. If the placement requires that the arc object be rotated by angle (J) as shown in the second diagram, The actual final position of the object is shown by the rotation of (A), (B), (C).
Parameter: | data (SpaceSideData) – Arc object to be configured. |
---|
Calculate intersection between a line share and another side1.
Parameter: | data – |
---|
Summarized parts information.
Parameter: | obj – |
---|
SpaceCircleSideData
Manages data for space circle side objects.
moduleauthor: | Kene Meniru <Kene.Meniru@illom.org> |
---|
Bases: bdspace.spacecirclesidedata.SpaceCircleSideData
Manages data for space circle close sides.
Bases: bdspace.spacecirclesidedata.SpaceCircleSideData
Manages data for space circle open sides.
Bases: bdspace.spacecirclesidedata.SpaceCircleSideData
Manages data for space circle share sides.
Bases: bdspace.spacesidedata.SpaceSideData
Manages data for space circle sides.
SpaceCircleSide manager
Provides information for defining space circle side objects.
moduleauthor: | Kene Meniru <Kene.Meniru@illom.org> |
---|
Bases: bdspace.spacecirclesidemanager.SpaceCircleSide
Provides tools for making space circle close sides.
Created a new space side data object.
Parameters: |
|
---|
Bases: bdspace.spacecirclesidemanager.SpaceCircleSide
Provides tools for making space circle open sides.
Created a new space side data object.
Parameters: |
|
---|
Bases: bdspace.spacecirclesidemanager.SpaceCircleSide
Provides tools for making space circle share sides.
Created a new space side data object.
Parameters: |
|
---|
Bases: bdspace.spacesidemanager.SpaceSide
Provides tools for making space circle sides.
Created a new space side data object.
Parameters: |
|
---|
SpaceTopData
Manages data for space top objects.
moduleauthor: | Kene Meniru <Kene.Meniru@illom.org> |
---|
Bases: bdspace.spacetopdata.SpaceTopData
Manages data for space top close objects.
Bases: bdspace.spacesidedata.SpaceSideData
Manages data for space top objects.
Bases: bdspace.spacetopdata.SpaceTopData
Manages data for space top open objects.
Bases: bdspace.spacetopdata.SpaceTopData
Manages data for space top share objects.
SpaceTop manager
Provides information for defining space top objects.
moduleauthor: | Kene Meniru <Kene.Meniru@illom.org> |
---|
Bases: bdspace.spacesidemanager.SpaceSide
Provides tools for making a space top object.
Bases: bdspace.spacetopmanager.SpaceTop
Provides tools for making a space top close object.
Created a new space side data object.
Parameters: |
|
---|
Bases: bdspace.spacetopmanager.SpaceTop
Provides tools for making a space top open object.
Created a new space side data object.
Parameters: |
|
---|
Bases: bdspace.spacetopmanager.SpaceTop
Provides tools for making a space top share object.
Created a new space side data object.
Parameters: |
|
---|
SpaceBaseData
Manages data for space base objects.
moduleauthor: | Kene Meniru <Kene.Meniru@illom.org> |
---|
Bases: bdspace.spacebasedata.SpaceBaseData
Manages data for space base open objects.
Bases: bdspace.spacesidedata.SpaceSideData
Manages data for space base objects.
Bases: bdspace.spacebasedata.SpaceBaseData
Manages data for space base open objects.
Bases: bdspace.spacebasedata.SpaceBaseData
Manages data for space base open objects.
SpaceBase manager
Provides information for defining space base objects.
moduleauthor: | Kene Meniru <Kene.Meniru@illom.org> |
---|
Bases: bdspace.spacesidemanager.SpaceSide
Provides tools for making a space base object.
Bases: bdspace.spacebasemanager.SpaceBase
Provides tools for making a space base close object.
Created a new space side data object.
Parameters: |
|
---|
Bases: bdspace.spacebasemanager.SpaceBase
Provides tools for making a space base open object.
Created a new space side data object.
Parameters: |
|
---|
Bases: bdspace.spacebasemanager.SpaceBase
Provides tools for making a space base share object.
Created a new space side data object.
Parameters: |
|
---|