Cone

This class represents the concept Cone.

Class

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

Example

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

__int64 rdfModel = CreateModel();

if (rdfModel) {
    __int64 classCone = GetClassByName(rdfModel, "Cone");

    __int64 propertyHeight = GetPropertyByName(rdfModel, "height"),
            propertyRadius = GetPropertyByName(rdfModel, "radius"),
            propertySegmentationParts = GetPropertyByName(rdfModel, "segmentationParts");

    __int64 myInstanceCone = CreateInstance(classCone, nullptr);

    double  height = 2.8,
            radius = 1.3;
    __int64 segmentationParts = 36;
        
    SetDatatypeProperty(myInstanceCone, propertyHeight, &height, 1);
    SetDatatypeProperty(myInstanceCone, propertyRadius, &radius, 1);
    SetDatatypeProperty(myInstanceCone, propertySegmentationParts, &segmentationParts, 1);

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