Circle

This class represents the concept Circle.

Class

class GeometricItem
   relation material
      range Material, cardinality [0, 1]
class Curve
class ConicalCurve
   property a
      range double (64 bit), cardinality [1, 1]
   property segmentationParts
      range integer (64 bit), cardinality [0, 1]
   property size
      range double (64 bit), cardinality [0, 1]
   property start
      range double (64 bit), cardinality [0, 1]
class Circle

subClasses 
      class CircleByPoints    

Example (based on GEOM ontology wrapper)

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

#include    "./include/geom.h"

int64_t model = CreateModel();

if (model) {
    GEOM::Circle circle = GEOM::Circle::Create(model);

    circle.set_a(1.3);
    circle.set_start(1.57079633);
    circle.set_size(3.14159265);
    circle.set_segmentationParts(36);

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

Example (based on pure and inline API calls)

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

#include    "./include/engine.h"

int64_t model = CreateModel();

if (model) {
    //
    //  Classes
    //
    int64_t classCircle = GetClassByName(model, "Circle");

    //
    //  Datatype Properties (attributes)
    //
    int64_t propertyA = GetPropertyByName(model, "a"),
            propertyStart = GetPropertyByName(model, "start"),
            propertySize = GetPropertyByName(model, "size"),
            propertySegmentationParts = GetPropertyByName(model, "segmentationParts");

    //
    //  Instances (creating)
    //
    int64_t myInstanceCircle = CreateInstance(classCircle);
        
    SetDatatypeProperty(myInstanceCircle, propertyA, 1.3);
    SetDatatypeProperty(myInstanceCircle, propertyStart, 1.57079633);
    SetDatatypeProperty(myInstanceCircle, propertySize, 3.14159265);
    SetDatatypeProperty(myInstanceCircle, propertySegmentationParts, (int64_t) 36);

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

Example (based on pure API calls)

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

#include    "./include/engine.h"

int64_t model = CreateModel();

if (model) {
    //
    //  Classes
    //
    int64_t classCircle = GetClassByName(model, "Circle");

    //
    //  Datatype Properties (attributes)
    //
    int64_t propertyA = GetPropertyByName(model, "a"),
            propertyStart = GetPropertyByName(model, "start"),
            propertySize = GetPropertyByName(model, "size"),
            propertySegmentationParts = GetPropertyByName(model, "segmentationParts");

    //
    //  Instances (creating)
    //
    int64_t myInstanceCircle = CreateInstance(classCircle, nullptr);

    double  a = 1.3,
            start = 1.57079633,
            size = 3.14159265;
    int64_t segmentationParts = 36;
        
    SetDatatypeProperty(myInstanceCircle, propertyA, &a, 1);
    SetDatatypeProperty(myInstanceCircle, propertyStart, &start, 1);
    SetDatatypeProperty(myInstanceCircle, propertySize, &size, 1);
    SetDatatypeProperty(myInstanceCircle, propertySegmentationParts, &segmentationParts, 1);

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