STEP

  1. FAQ
  2. »
  3. Products Overview
  4. »
  5. STEP

What kind of geometric modeler are you using (for solid bodies, operations and boolean operations)?

The default modeler for ODA STEP SDK is ODA Solid Modeler, so it is used for Boolean operations.

What file types (exchange structures) are supported for view in Open STEP Viewer?

Step, stepx and zipped/compressed versions of those exchange structures.

Does the STEP SDK support import/export of .stepx format?

Currently, only read operations are supported for stepx files by ODA STEP SDK.

 

 

What schemas are supported by ODA STEP SDK ?

 

Customers can use an arbitrary .exp file (for STEP Application Protocols, CIS/2, IFC or even others) which defines format with EXPRESS schema. ODA STEP SDK can work with geometry of AP203, AP214, AP242ed3, DOMAIN_MODEL and CIS/2 formats. The appropriate .exp files are provided as part of release archives.

How to initialize ODA STEP SDK for using SDAI API ?

The main initialization procedure is the same as for STEP SDK C++ API usage:


 
// Common ODA IFC SDK initialization part
OdStaticRxObject<MyServices> svcs;
odrxInitialize(&svcs);
odStepInitialize(false /* No CDA */, false /* No geometry calculation needed */);

 
// SDAI calls can be performed just after common initialization procedure
SdaiSession session = sdaiOpenSession();

 
// Preload schema which is used within c:\\file.step
SdaiString schemaFileName = "c:\\AP214E3_2010.exp";
sdaiGetSchema(schemaFileName);

 
SdaiRep repo = _sdaiCreateRepositoryFromFile(session, "c:\\file.step", "");
SdaiRep repoOpened = sdaiOpenRepositoryBN(session, "c:\\file.step ");
SdaiModel modelRO = sdaiAccessModelBN(repoOpened, "default", sdaiRO);
SdaiSet cartesianPoints = sdaiGetEntityExtentBN(modelRO, "cartesian_point");
SdaiIterator it = sdaiCreateIterator(cartesianPoints);
for (sdaiBeginning(it); sdaiNext(it);)
{
  SdaiAppInstance inst = nullptr;
  sdaiGetAggrByIterator(it, sdaiINSTANCE, &inst);
  ...
}
sdaiDeleteIterator(it);
sdaiCloseSession(session);

 
// Common ODA IFC SDK uninitialization part
odStepUninitialize();
odrxUninitialize();

 

exSDAISAS example which uses SDAI calls may be investigated additionally to get information of how to create modules which use SDAI.

How to get information about attribute type?

The only way to get information about attribute type at the moment is to case in following way:

OdArray<OdDAI::AttributePtr>::iterator nextAttribute = leftEntityAttributeFilter.begin();
    for (; nextAttribute != leftEntityAttributeFilter.end(); ++nextAttribute)
    {
      OdDAI::AttributePtr pAttrib = *nextAttribute;
      OdDAI::InverseAttributePtr pInverse = OdDAI::InverseAttribute::cast(pAttrib);
      if (!pInverse.isNull())
      {
        odPrintConsoleString(L"\nInverse attribute `%s` (%lu)", pInverse->name().c_str(), (OdUInt64)leftIterator->id().getHandle());
      }
    }

 

 

 

How can I find the name of type in STEP?

Method const OdAnsiString& OdDAI::ApplicationInstance::typeName() const; returns a type name of application instance.

For some EntityInstance, how do I get the id from the STEP file?

You can get OdDAIObjectId of an entity instance and then get a # from it if needed:

OdDAI::ApplicationInstance pInst = ...; // arbitrary instance of SDAI Model
OdDAIObjectId id = pInst->id();
OdDbHandle h = id.getHandle();

 

 

 

I use Drawings and Kernel archives (static configuration mddbg). The build succeeds, but when I run main.exe, I get the following output: ERROR: Null Ptr

Pay attention to content of TOOLKIT_IN_DLL defines in each main .cpp of examples. There is an initialization of modules needed in static:

#ifndef TOOLKIT_IN_DLL
INIT_IFC_STATIC_MODULES_NO_GEOM;
#endif

and

#ifndef TOOLKIT_IN_DLL
ODRX_INIT_STATIC_MODULE_MAP();
#endif

So in md configuration each module should been previously initialized for our rt linker can work with them. Seems your problem related with this initialization.

 

 

How to get the geometry of the STEP model?

The example of how to get geometry of STEP file is called ExStepVectorize.

Does SDAI have any dependencies on other ODA SDKs?

At the moment the Kernel and SDAI part is a base for STEP SDK and no any relation to other ODA SDKs.

What are the standard formats such as IFC, STL, etc. that STEP can be converted to?

At the moment Open STEP Viewer can convert to .pdf, but using Visualize SDK, STEP files loaded in Visualize database can be converted to STL and many other formats. So, conversion can be performed programmatically using Visualize SDK.

 

 

Is it possible to query STEP entity geometry without drawing it? For example, create a device and get geometry.

Yes, you can access any data from STEP model using one of API provided. So, you don’t have to draw it, you can just get .step composing points, extrudes, explicit or implicit geometry and work with it without visualization and vectorization.

 

 

Do you support NURBS geometry?

Yes, in our module StepGeom we get all data from STEP file and NURBS geometry in particular and convert in to GUI curves, so we support NURBS geometry, yes, and curves, and subfaces.

Do you support visualization of all STEP BREP/cut planes/extrusion geometry (to device or conversion to shell representation)?

Yes, we support STEP advanced brep from STEP format, faceted brep, Boolean operations and cut planes, extrusions and so on, explicit geometry.

 

 

While reading a STEP file, do you generate and provide also the inverse relationships?

 

Yes, inverse relationships are calculated just after the file is opened.

 

 

Does STEP SDK have .NET wrappers?

Yes, we have such wrappers (please note, that you need Kernel and STEP archive as well).

Is the STEP Viewer available only for members and their customers, or freely available?

 

Open STEP Viewer is available for download for free. As for our other viewers - those are and may be used as examples to build your own ones.

Here’s a link to the STEP Viewerhttps://openstepviewer.com/

How to get access to Header Section instances using SDAI?

Two following SDAI extension functions are declared in sdai.h header:

SdaiInstance _sdaiHeaderDescription(SdaiRep repository);
SdaiInstance _sdaiHeaderName(SdaiRep repository);

Then attribute values of instances can be accessed using standard sdaiGetAttrBN/sdaiPutAttrBN functions.

The third instance of FILE_SCHEMA type can’t be accessed and is filled automatically when writing repository to file.

 

 

Does STEP SDK support evaluation of Derived attributes and WR rules defined in EXPRESS schema?

Yes, Derived Attributes and Where Rules evaluation is supported by EXPRESS interpreter (ISO 10303-11) which is a part of ODA STEP SDK / SDAI.

How to process non-latin letters with STEP SDK ?

String data within STEP is always in UTF-8 format, so when you get string using getAttr, the string is in UTF-8, and when you putAttr a string, SDK assumes the string is in UTF-8 format. Such UTF-8 data is implicitly converted into so-called Control Directives ('\X\C4\X\EF\X\EA\X\DC\X\F1\X\E9\X\E1') when writing Step Physical File, and converted from Control Directives into UTF-8 when reading Step Physical File.

 

UTF-8 -> putAttr -> writeFile -> Control Directives -> readFile -> getAttr -> UTF-8

 

So when you are working with string data, OdString and OdAnsiString can be used in pair for conversions:

 

OdString wStr("АБВГДЕЁ");
OdAnsiString ansiStr(wStr, OdCodePageId::CP_UTF_8);
inst->putAttr("string_value", ansiStr); // or inst->putAttr("string_value", ansiStr.c_str());
_writeSpf(model, "file.ifc"); // .ifc file will contain ansiStr data converted into internal representation (Control Directives) of such strings
...
_readSpf("file.ifc", model);
inst->getAttr("stringValue") >> ansiStr; // UTF-8 string with original data
OdString wStr(ansiStr, CP_UTF_8); // WChar string

 

How can I get information about surfaces?

All information about geometry and topology can be get as ODA own OdGe* objects (surfaces, curves) and through BrBrep interface which is convenient for walking along topology. We use BrBrep also for STEP breps visualization.

How to get OdBrBrep from manifold_solid_brep instance of STEP?

 Here is sample code to get OdBrBrep from manifold_solid_brep. Code:

#include "Entities/StepGeometricRepresentationItemMD.h"  
...
  OdDAIObjectId idManifoldSolidBrep = pDatabase->getModel()->getEntityInstance((OdUInt64)440); // Get manifold_solid_brep, here it is taken by handle for "known" instance.
  OdDAI::OdCompoundPtr compound = pDatabase->getCompound(idManifoldSolidBrep); // Get compound that composes geometry for it.
  OdStep::OdStepGeometricRepresentationItemMDPtr representationItem = compound; // Convert into RepresentationItemMD
  OdStep::OdStepModelerGeometryPtr modeler = representationItem->getModeler(); // Get modeler.
  const OdBrBrep &brBrep = modeler->bodyContainer().brBrep(); // And finally access OdBrBrep.