Custom Evaluation of Origin and Orientation - Intergraph Smart 3D - Reference Data

Intergraph Smart 3D Reference Data

Language
English
Product
Intergraph Smart 3D
Subproduct
Reference Data
Search by Category
Reference Data
Smart 3D Version
12.1 (2019)

Often parts need to be positioned and oriented correctly based on the given inputs. For example, a stair needs to be positioned and oriented based on the TopSupport, SideReference, and BottomSupport inputs selected by you.

The 3D API framework provides an interface ICustomEvaluate which should be realized by the symbol to support evaluation of origin and orientation for parts.

Evaluating origin and orientation of a part involves the following steps:

  1. Realize ICustomEvaluate on the symbol.

  2. Construct the transformation matrix based on the given inputs.

The following code example demonstrates how to construct the transformation matrix from the vectors based on the geometric inputs and the position value given for a stair:

EvaluateGeometry(ByVal oBO As BusinessObject, bPartChanged As bool, bGeomInputChanged As bool, bPropertyValueChanged As bool)

'Initialize the matrix to identity.

oMatrix = New Matrix4X4()

'Construct a double array and set the actual double values for the local

'x, y, z vectors in the transformation matrix.

'Also set the translation component.

Dim dArrMatrix As Double() = New Double(15) {}

'Set the double array on the matrix.

oMatrix.Set(dArrMatrix)

3. Set the transformation matrix on the Business Object.

The following code example shows how to set the transformation matrix on the Ladder object.

'Set the orientation matrix on the ladder or stair.

Dim ladderStairObject As StairLadderBase = DirectCast(oBO, StairLadderBase)

ladderStairObject.Matrix = oMatrixOrientation