bsBuildAttribute

Module: bsBuildAttribute

Interface for the declaration of exposure attributes. Any attributes can be declared. The declared attributes are available while generating the exposure data and also while exporting to the output file.

See: bsHatch.setAttributeInt(), bsHatch.setAttributeReal(), bsHatchBlock.setAttributeInt(), bsHatchBlock.setAttributeReal(), bsPolylineIterator.getAttributeInt(), bsPolylineIterator.getPointAttributeInt()

bsBuildAttribute.declareAttributeReal(sId)

Declares a floating point value attribute with the unique identifier sId.

Arguments:

bsBuildAttribute.declareAttributeInt(sId)

Declares an integer value attribute with the unique identifier sId.

Arguments:

Predefined built-in attributes

There are some predefined build attributes which are always available and do not need to be declared manually. The unique attribute identifier strings of predefined attribute always start with a ‘_’ which means that a custom attribute identifier cannot start with this “underbar” character.

‘_processing_order’

The processing-order is an integer sort key. The sorting order of items is defined in ascending order according to each item’s processing-order value.

References:

Integer nLayerExposureInProcessingOrder

bsPolylineIterator bsModelData.getFirstLayerPolyline(nLayerNr, nIterateOn, sAccess)

‘_disp_color’

The display color is an integer attribute which holds a 32bit color value in RGBA format. This attribute can be used to assign a custom color to a toolpath (hatch) which then is used in the preview window to draw the toolpath. If no color is set then a toolpath will be drawn in a default green color. E.g. a red color (red=0xAA,green=0x00,blue=0x00,alpha=0xFF) can be set with “<myHatchBlock>.setAttributeInt(“_disp_color”, 0xAA0000FF)”

References:

bsHatch.setAttributeInt(sId, nValue)

bsHatchBlock.setAttributeInt(sId, nValue)

bsPolylineIterator.setAttributeInt(sId, nValue)

‘_subtype’

The sub-type is an integer attribute specifying the type of geometry within a model. Valid values are bsModel.nSubtypePart and bsModel.nSubtypeSupport. The sub-type is set automatically e.g. when calling bsIsland.hatch() on a support-type-island then the resulting hatches in bsHatch will also have the subtype=bsModel.nSubtypeSupport set.

References:

Integer nSubtypePart

Integer nSubtypeSupport

bsHatch.setModelSubtype(nModelSubtype)

bsHatchBlock.setModelSubtype(subType)