Mon, 10/23/2023 - 17:29
I'm working on a CAD importer.
Everything seems to go as planned, bu we recently detected an issue regarding the rotation of the resultant CAD file. After a few tests it seems to be something related on how OCCT reads the data related to the system axis.
I will show a sample cube, imported with CAD assistant:
- Img1 is the STEP file,
- Img2 is our OBJ model.
Any thoughts on this? Any flag or parameter that can be used to know where Z is pointing?
Kind regards,
Lorenzo
Mon, 10/23/2023 - 18:42
Hello, the translation parameter can be modified:
https://dev.opencascade.org/doc/overview/html/occt_user_guides__step.htm...
Parameter:
Could you please check this one? Additionally, it can be a bug of export or some import issue. Do you have original one with clear orientation?
Best regards, Dmitrii.
Tue, 10/24/2023 - 08:46
Hi Dimitrii,
It seems there is no reference to that parameter (transformation) at the documentation. Could you confirm?
Anyway I will test it including that parameter and I will confirm.
Please find attached the STEP test file that I'm using.
Kind regards,
Lorenzo Navarro
Tue, 10/24/2023 - 09:56
Please find attached the final comparision.
I asume that the parameter must be set before the CAD reading, something like this:
Could this be an import bug?
Is there anywhere to check how many static parameters can be set. I seems that some of them are missing in the documentation.
For example in this post I found a few ones that there aren't explained on the docs (as it could be write.stepcaf.subshapes.name).
Kind regards,
Lorenzo
Tue, 10/24/2023 - 11:33
StepCafControl_ConfigurationNode should to became a container for every parameters for DE_Wrapper. Soon any STEP parameters will be not static and part of the one single struct for general reading withing new class to be more clear which setting exist and can be modified.
As for a bug - probably it is not a bug. Probably it is different option to export or something similar. kgv give you some samples with rotated one.
Best regards, Dmitrii.
Tue, 10/24/2023 - 10:14
OCCT STEP translator expects coordinate system to be Z-up. However, most applications working with OBJ files expect coordinate system to be Y-up. For this reason, CAD Assistant performs coordinate system flipping on OBJ import/export that you may find in its settings.
Within C++ API, these options are controlled by
RWObj_CafWriter::CoordinateSystemConverter
/RWObj_CafReader::CoordinateSystemConverter
like in this sample for exporting glTF files.Tue, 10/24/2023 - 12:20
Thank you both for your responses. All clear.
We will wait for the parameter refactor in order to extend our app.
Kind regards,
Lorenzo