STEPCAFControl_Writer compile error: ‘NCollection_Vector’ does not name a type

Flare

Looking around for some CAD
Hello,

I am trying to use STEPCAFControl_Writer to write a document as a step file. When I compiled the program, cmake outputs the following error:
Code:
$ cmake --build .
Scanning dependencies of target splitStep
[ 25%] Building CXX object CMakeFiles/splitStep.dir/testArea/splitStep.cpp.o
In file included from /home/kaiwen/ompl-assembly-planner/testArea/splitStep.cpp:2:
/usr/include/opencascade/STEPCAFControl_Writer.hxx:236:3: error: ‘NCollection_Vector’ does not name a type; did you mean ‘NCollection_Vec4’?
  236 |   NCollection_Vector<Handle(StepRepr_RepresentationItem)> myGDTAnnotations;
      |   ^~~~~~~~~~~~~~~~~~
      |   NCollection_Vec4
make[2]: *** [CMakeFiles/splitStep.dir/build.make:63: CMakeFiles/splitStep.dir/testArea/splitStep.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/splitStep.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

I changed the NCollection_Vector to NCollection_Vec4 as the error suggested and then it compiled. The program also manages to write the step file, but then crashes, causing a segmentation fault (core dumped). I assume this is not a valid fix, but I am clueless how to fix it otherwise.

Any help is greatly appreciated. Thank you!

Here is the Terminal output of the program:
Code:
*******************************************************************
******        Statistics on Transfer (Write)                 ******

*******************************************************************
******        Transfer Mode = 0  I.E.  As Is       ******
******        Transferring Shape, ShapeType = 2                      ******
** WorkSession : Sending all data
 Step File Name : ../solutions/splitPart.stp(1394 ents)  Write  Done
Segmentation fault (core dumped)
 

Flare

Looking around for some CAD
As a general question about this forum: Do you mind if I post the same question here and on the occt forum? I want to respect the community, but I have not though about that before posting.

Best regards, Kaiwen
 

Quaoar

Administrator
Staff member
No problem at all, people are posting here and there to get their problems solved at the end, so why wouldn't you. Go ahead!
 
Top