bsProcessingNode

Module: bsProcessingNode

A processing node to be used with bsProcessingGraph. Processing nodes are connected by node links. Nodes have input- and output-pins where other nodes could be connected. These node-pins are providing or receiving layer models (bsModel) where the name of the pin is equal to the model name. The node itself owns a calculate function which transforms the input model(s) into the output model(s).

bsProcessingNode bsProcessingNode(sNodeName)

Creates a new processing node.

Arguments:

Return

New node.

setCalculateFunc(calcFunc)

Sets the node’s calculation function which transforms the input model(s) into the output model(s). The processing node does not have any default implementation. So if no function is set then the node is unusable and the parent processing graph is invalid.

The calculate function is expected to have the following format:

void func(modelData, hatchResult, nLayerNr, inputModels, outputModels);

Links: void func(modelData, hatchResult, nLayerNr, inputModels, outputModels)

Arguments:

String getName()

Get the node name.

Return

Name of the node.

void func(modelData, hatchResult, nLayerNr, inputModels, outputModels)

The node’s calculation function is a custom function which transforms the input model(s) into the output model(s). It can be implemented anywhere outside the node and it is set by setCalculateFunc(). This function is not available as a method of the processing node. E.g. you cannot call it from the script as myNode.func().

Arguments: