When I imported the vrml model, I obtain a mirror of the model. And you can see that the letters are in the opposite direction. I don't know how to solve this problem. Do you have any good suggestions?
TDF_LabelSequence FreeShape;
myShapeTool->GetFreeShapes(FreeShape);
int Roots = FreeShape.Length();
for (int index = 1; index <= Roots; index++)
{
TDF_Label label = FreeShape.Value(index);
Handle(XCAFPrs_AISObject) displayedShape = new XCAFPrs_AISObject(label);
m_context->Display(displayedShape, false);
}
Please change the file suffix name from .info to .wrl, because we are unable to upload the .wrl file.
Discussion
9 archived replies
Posts are displayed in their archived order.
01Commenter-1
Hello, I guess you need to specify direction.
You have 2 ways:
Use DE_Wrapper interface:
Handle(Vrml_ConfigurationNode) aNode = new Vrml_ConfigurationNode();
// Setting up read process
// aNode->InternalParameters...
// aNode->GlobalParameters...
// Directions have correct default value look into
// InternalParameters.ReadFileCoordinateSys
// InternalParameters.ReadSystemCoordinateSys
Handle(DE_Provider) aVrlmProvider = aNode->BuildProvider();
//Init doc
Handle(TDocStd_Document) aDocument;
//...
//
const TCollection_AsciiString aPath = "";
bool anIsDone = aVrlmProvider->Read(aPath, aDocument);
Thank you very much for your suggestion. I have solved my problem perfectly using the VrmlAPI_CafReader method you provided.
Best regards, Author
03Commenter-2
Hi Dimitrii,
I have tried same approach.
But aVrlmProvider giving me error : pointer to incomplete class type is not allowed.
Also
in aVrmlReader apart from SetDocument, id didn't find any other methods.
Thank you in Advance.
04Commenter-1
It is compiling issue. Please add #include lines of any classes that you are using or trying to use including as a non-direct casting. As for a document, you need to create (initialize) one before using.
If problem still here, please share logs and code samples :)
Best regards, Commenter-1.
05Commenter-2
Sorry. It was my mistake. Code is working fine.
But I am not able to load the model.
I have tried to open model in CAD Assistance also. But that application also fails to open model. (See attached model)
Error is : VrmlData_VrmlFormatError
Thank you Dmitrii.
06Commenter-1
Let me chack the issue. I will return to you during a week. We resolve an issue with VRML #1 in 7.8 I hope it will help with first file. But for now, could you please share the version of OCC, that are you using.
In bug case i will create an issue in bug tracker and share the link. The priority in case of small fix will be increased.
VRML Reader is very sensetive, indeed need to find a way to process and skip unsupported types. Issue created, there are no planning for that issue for now.
As for a
Best regards, Commenter-1.
09Commenter-2
Could you please let me know which VRML node types are supported in Open Cascade 7.9, and which VRML versions (e.g., 1.0 or 2.0) are compatible?