Box

This class represents the concept Box.

Class

class GeometricItem
   relation material
      range Material, cardinality [0, 1]
class Solid
class Box
   property length
      range double (64 bit), cardinality [1, 1]
   property width
      range double (64 bit), cardinality [1, 1]
   property height
      range double (64 bit), cardinality [1, 1]    

Example

Here you can find code snippits that show how the API call Box can be used.

__int64 rdfModel = CreateModel();

if (rdfModel) {
    __int64 classBox = GetClassByName(rdfModel, "Box");

    __int64 propertyLength = GetPropertyByName(rdfModel, "length"),
            propertyWidth = GetPropertyByName(rdfModel, "width"),
            propertyHeight = GetPropertyByName(rdfModel, "height");

    __int64 myInstanceBox = CreateInstance(classBox, nullptr);

    double  length = 2.8,
            width = 1.3,
            height = 1.4;

    SetDatatypeProperty(myInstanceBox, propertyLength, &length, 1);
    SetDatatypeProperty(myInstanceBox, propertyWidth, &width, 1);
    SetDatatypeProperty(myInstanceBox, propertyHeight, &height, 1);

    //
    //	The resulting model can be viewed in 3D-Editor.exe
    //
    SaveModel(rdfModel, "c:\\myFile.bin");
    CloseModel(rdfModel);
}