how to feed Ng_OCC_Geometry with shape?

  • Detlef Rudolph
    Detlef Rudolph

    Hello Netgen,

    the code lines show how I generate a mesh with ng4.5 and how I try with Version 5.0.
    The shapes of different objects are already in memory, so I can't use the Load Methods
    of netgen. But what formerly would be accepted, to set the shape direct in an empty
    OCCGeometry isn't functionable anymore, because the Ng_OCC_Geometry is only a (void *)

    So can you please give me a hint to mesh a shape which is in memory and not loadable
    as a file?

    Thanks in advance, Detlef

    //NetgenOCCGeometry * occgeo = new NetgenOCCGeometry();
    nglib::Ng_OCC_Geometry* occ_geom = nglib::Ng_OCC_NewGeometry();
    if (! occ_geom)
        LOG.error(__FUNCTION__, "can't create netgen OCC geometry!");
    /* occ_geom-> */
    //occgeo->shape = theShape; 
    //occgeo->changed = 1;  
    //occgeo->BuildBoundingBox(); //build bounding box around shape
    //occgeo->HealGeometry(); //repair potential defects in geometry model
    // call netgen meshing function
    //  OCCGenerateMesh(*occgeo, mesh.Ptr(), curvaturesafety, segmentsedge,
    //                  perfstepsstart, perfstepsend,
    //              maxh, minh, grading, uselocal);
    //catch (...)
    //  delete occgeo;
    //  throw OcafException(-999, "Error during Meshing, aborting.");
    //delete occgeo;