Line3Dn

This class represents the concept Line3Dn.

Class

class GeometricItem
   relation material
      range Material, cardinality [0, 1]
class Curve
class Line3Dn
   property points
      range double (64 bit), cardinality [0, 6]
   property x0
      range double (64 bit), cardinality [0, 1]
   property y0
      range double (64 bit), cardinality [0, 1]
   property z0
      range double (64 bit), cardinality [0, 1]
   property x1
      range double (64 bit), cardinality [0, 1]
   property y1
      range double (64 bit), cardinality [0, 1]
   property z1
      range double (64 bit), cardinality [0, 1]
   property asOpenGL
      range bool, cardinality [0, 1]    

Example

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

int64_t model = CreateModel();

if (model) {
    //
    //  Classes
    //
    int64_t classLine3Dn = GetClassByName(model, "Line3Dn");

    //
    //  Datatype Properties (attributes)
    //
    int64_t propertyPoints = GetPropertyByName(model, "points");

    //
    //  Instances (creating)
    //
    int64_t myInstanceLine3Dn = CreateInstance(classLine3Dn, nullptr);

    double  points[6] = { 0., 2., 0., 2., 1., 0. };
        
    SetDatatypeProperty(myInstanceLine3Dn, propertyPoints, points, 6);

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