Cone

This class represents the concept Cone.

Class

class GeometricItem
   relation material
      range Material, cardinality [0, 1]
class Solid
class Cone
   property height
      range double (64 bit), cardinality [1, 1]
   property radius
      range double (64 bit), cardinality [1, 1]
   property segmentationParts
      range integer (64 bit), cardinality [0, 1]    

Example (based on pure API calls)

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

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

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

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

        //
        //  Datatype Properties (attributes)
        //
        Int64   propertyHeight = RDF.engine.GetPropertyByName(model, "height"),
                propertyRadius = RDF.engine.GetPropertyByName(model, "radius"),
                propertySegmentationParts = RDF.engine.GetPropertyByName(model, "segmentationParts");

        //
        //  Instances (creating)
        //
        Int64   myInstanceCone = RDF.engine.CreateInstance(classCone, (string) null);

        double  height = 2.8,
                radius = 1.3;
        Int64   segmentationParts = 36;

        RDF.engine.SetDatatypeProperty(myInstanceCone, propertyHeight, ref height, 1);
        RDF.engine.SetDatatypeProperty(myInstanceCone, propertyRadius, ref radius, 1);
        RDF.engine.SetDatatypeProperty(myInstanceCone, propertySegmentationParts, ref segmentationParts, 1);

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