Fri, 10/25/2024 - 19:39
Hello,
I've been reading the documentation and many example from the forums, and I can not understand why the following code is failing:
Handle(TDocStd_Document) new_document = new TDocStd_Document("step-caf-reader");
Handle(XCAFDoc_ShapeTool) shape_tool = XCAFDoc_DocumentTool::ShapeTool(new_document->Main());
// Get the root labels
TDF_LabelSequence root_labels;
shape_tool->GetFreeShapes(root_labels);
I get:
146:19: error: invalid use of incomplete type ‘class XCAFDoc_ShapeTool’
146 | shape_tool->GetFreeShapes(root_labels);
I'm using OCC 7.8.1 and g++ 14.2.1
Any help is very appreciated !,
Thank you,
Sat, 10/26/2024 - 00:52
Hello, did you add #include <XCAFDoc_ShapeTool.hxx>?
Best regards, Dmitrii.
Sat, 10/26/2024 - 01:04
Latest documentation :
https://dev.opencascade.org/doc/overview/html/
https://dev.opencascade.org/doc/occt-7.8.0/refman/html/index.html
https://github.com/Open-Cascade-SAS/OCCT/wiki
_
As for your sample, the string as a argument for document is a schema name. These schemes used for save to file.
Additionally, you trying to get roots from empty documents. Needs to read something before extraction.
Best regards, Dmitrii.
Sat, 10/26/2024 - 13:03
Thank you @Dmitrii !
The problem is that I was missing the header, some how I tough that including XCAFDoc_DocumentTool was enough.
And regarding the documentation, I don't now if its important, but the google searches, lead to a 404 error, ex:
https://dev.opencascade.org/doc/refman/html/class_x_c_a_f_doc___shape_to...
So I landed in older versions,
Best regards,
rsm
Sat, 10/26/2024 - 13:40
Yes. It is an issue because I accidentally update the Doxygen version for the master branch. It takes a few weeks for google to recache the pages. I didn't expect critical changes on doxygen side. BUT we have a dark mode now ;)
* Additionally, I plan to migrate to Sphinx in some time (already create tasks for my team).
Best regards, Dmitrii.