Table Of Contents

Previous topic

4.3. bdlevel Package

Next topic

4.4.1.1. Mark Data Class Diagram

This Page

4.4. bdmark Package

4.4.1. bdmark Package

__init__.py Initialization file for BDMark package.

BDMark Resources for creating marks in Buildes

moduleauthor:Kene Meniru <Kene.Meniru@illom.org>

4.4.2. markdata Module

Mark Data

Provides ability to hold data necesary to describe marks. Marks are objects that assist in thinking about design.

moduleauthor:Kene Meniru <Kene.Meniru@illom.org>
class bdmark.markdata.ArcMarkData

Bases: bdmark.markdata.MarkData

Provides data for arcd mark objects.

class bdmark.markdata.CircleMarkData

Bases: bdmark.markdata.MarkData

Provides data for circle mark objects.

class bdmark.markdata.LineMarkData

Bases: bdmark.markdata.MarkData

Provides data for line mark objects.

class bdmark.markdata.MarkData

Bases: buildesdata.BuildesData

Provides common data for mark objects.

class bdmark.markdata.PointMarkData

Bases: bdmark.markdata.MarkData

Provides data for point mark objects.

4.4.3. markmanager Module

Mark Manager

Mark managers coordinate the creation and manipulation of mark objects.

moduleauthor:Kene Meniru <Kene.Meniru@illom.org>
class bdmark.markmanager.ArcMark(app)

Bases: bdmark.markmanager.Mark

Provides objects for creating ArcMarkData objects.

make_data(name, chord_length, angle, arc_height, arc_side)

Creates a new arcMarkData object.

Creates the right data object then initializes the attributes with calculated and default values. It returns data object after making it.

Parameters:
  • name (String) – Name of ArcMarkData object.
  • chord_length (Float) – Length of chord for ArcMarkData object.
  • angle (Float) – Angle for ArcMarkData object.
Returns:

Arc Mark Data object.

Return type:

ArcMarkData

make_message(data=None)
Create an introductory message for mark.
make_profile(data)

Makes the points that define the profile for arc mark data.

Parameter:data (ArcMarkData) – Arc mark object
make_shape(data)

Make PythonOCC shape for arc mark data object.

Parameter:data (ArcMarkData) – Arc mark data object
prep_data(data)

Calculates the defining parts of the arc mark data object.

../_images/arcmarkPrep.png

Preparing a ArcMark Object

To prepare the arcmark the arc_height (EF) is first adjusted based on user input. If its length is zero a semicircular arc is produced. This information is used to calculate the radius which in turn is used to calculate the angle of the first marker (AC).

The decision is then made on the type of arc to be produced. The arc_height determines if the arc produced is more or less than 180 degrees (AFB). In either case the subtended angle (ACB) is calculated and then the angle of the first point on the arc is updated by taking into consideration the rotation angle (CD) requested by the user.

Finally, based on the subtended angle value and the previously defined default_angle_gap, the number of required markers for this mark object is determined.

Parameter:data (BuildesData) – Data object to be made.
summary_parts(obj)

Summarize parts message.

Parameter:obj
class bdmark.markmanager.CircleMark(app)

Bases: bdmark.markmanager.Mark

Provides objects for creating and manipulating CircleMarkData objects.

get_direction(data)

Establish orientation for circle data object.

circular objects do not have an orientation

Parameter:data
Returns:
Return type:
make_data(name, length)

Creates a new CircleMarkData object.

Parameters:
  • name (String) – Name of CircleMarkData object.
  • radius (Float) – Radius for CircleMarkData object.
  • angle (Float) – Angle for CircleMarkData object.
Returns:

CircleMark Data object.

Return type:

CircleMarkData

make_message(data=None)
Create an introductory message for mark.
make_profile(data)

Makes markers that define the profile for circle mark data object.

Parameter:data (CircleMarkData) – Circle mark object
make_shape(data)

Make PythonOCC shape object for circle mark data object.

Parameter:data
prep_data(data)

Calculates the defining parts of the circle mark data object.

Parameter:data (CircleMarkData) – Circle mark data object reference
class bdmark.markmanager.LineMark(app)

Bases: bdmark.markmanager.Mark

Provides objects for creating LineMarkData objects.

make_data(name, length, angle)

Creates a new LineMarkData object.

Parameters:
  • name (String) – Name of LineMarkData object.
  • length (Float) – Length for LineMarkData object.
  • angle (Float) – Angle for LineMarkData object.
Returns:

LineMark Data object.

Return type:

LineMarkData

make_message(data=None)
Create an introductory message for mark.
make_profile(data)

Makes markers that define the profile for line data object.

Parameter:data (LineMarkData) – Line mark object
make_shape(data)

Make PythonOCC shape object for line mark data object.

aSegment1 = GC_MakeSegment(aPnt1, aPnt2) # Profile : Define the Topology aEdge1 = BRepBuilderAPI_MakeEdge(aSegment1.Value()) aWire = BRepBuilderAPI_MakeWire(aEdge1.Edge(), aEdge2.Edge(),

aEdge3.Edge())
Parameter:data (LineMarkData) – LineMarkData object
prep_data(data)

Calculates the defining parts of the line mark data object.

To prepare the line mark, the number of markers needed to be distributed along the edge of the mark at the prescribed default_length_gap is needed. If the length is more than default_length_gap then there will be more than the three markers located at the start, end and middle points. Otherwise these are the only markers provided.

Parameter:data (BuildesData) – Object to be made
summary_parts(obj)

Summarize parts message.

Parameter:obj
class bdmark.markmanager.Mark(app=None)

Bases: buildesmanager.BuildesManager

Provides common objects for creating and manipulating marks.

get_direction(data)

Establish orientation for line data object.

Parameter:data
get_global_angle_gap()
Get global angle gap float
get_global_length_gap()
Get global length gap setting
get_global_marker_shape()
Get global marker shape
get_global_marker_size()
Get global marker size float
global_angle_gap
Get global angle gap float
global_length_gap
Get global length gap setting
global_marker_shape
Get global marker shape
global_marker_size
Get global marker size float
make_common_data(data)

Set all common attributes for all mark data objects.

Parameter:data (MarkData) – Mark object being created
make_marker_shapes(data, wire)

Combines the different parts of the mark object.

Parameter:wire (BRepBuilderAPI_MakeWire) – MarkData wire
Returns:Fused group of wire rings
Return type:BRepAlgoAPI_Fuse
make_message(data=None)
Make summary message about mark object for display in ui.
make_point_id(letter, number=None)

Make id for a point in mark.

Returns:Base name of mark point.
Return type:String
set_global_angle_gap(value)
Set global angle gap float
set_global_length_gap(value)
Set global length gap float
set_global_marker_shape(value)
Set global marker shape
set_global_marker_size(value)
Set global marker size float
summary_outlook(obj)

Summarized outlook message.

Parameter:obj (BuildesData) – Object for which to create summary message.
Returns:Formatted text for predetermined cells in the spreadsheet
Return type:SpreadSheet
summary_relations(obj)

Summarized relations message.

Parameter:obj (BuildesData) – Object for which to create summary message.
class bdmark.markmanager.PointMark(app)

Bases: bdmark.markmanager.Mark

Provides objects for creating and manipulating PointMarkData objects.

make_data(name)

Creates a new PointMarkData object.

Parameter:name (String) – Name of PointMarkData object.
Returns:PointMark Data object.
Return type:PointMarkData
make_message(data=None)
Create an introductory message for mark.
make_profile(data)

Makes markers that define the profile for point mark data object.

Parameter:data
make_shape(data)

Make PythonOCC shape object for point mark data object.

Parameter:data
prep_data(data)
Returns:
Return type:
summary_parts(obj)

Summarize parts message.

Parameter:obj