Pyramid

This class represents the concept Pyramid.

Class

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

Example (based on pure API calls)

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

using RDF;      //  include at least engine.cs within your solution

public void CreatePyramid()
{
    Int64 model = RDF.engine.CreateModel();

    if (model != 0)
    {
        //
        //  Classes
        //
        Int64   classPyramid = RDF.engine.GetClassByName(model, "Pyramid");

        //
        //  Datatype Properties (attributes)
        //
        Int64   propertyLength = RDF.engine.GetPropertyByName(model, "length"),
                propertyHeight = RDF.engine.GetPropertyByName(model, "height");

        //
        //  Instances (creating)
        //
        Int64   myInstancePyramid = RDF.engine.CreateInstance(classPyramid, (string) null);

        double  length = 2.8,
                height = 1.4;

        RDF.engine.SetDatatypeProperty(myInstancePyramid, propertyLength, ref length, 1);
        RDF.engine.SetDatatypeProperty(myInstancePyramid, propertyHeight, ref height, 1);

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