Incorrect normals in OCCT and CAD Assistant

Hi,

I am getting incorrect normals from CAD Assistant when converting STEP files to OBJ. I experience the same in my own program using OCCT 7.5.0, that read STEP files and render them directly using OpenGL. My program do take in account the orientation, transformation and triangle indexes of the shapes and faces.

When loading a STEP file into CAD Assistant the viewer seems to fix the normal direction, but when I convert it to OBJ I get incorrect normals. 

EXAMPLE:

This is just one example, I can replicate this with various STEP files and viewers (STEP and OBJ files are attached in .zip):

  1. Correct normals from STEP file in CAD Assistant viewer.
    ​​ - ​see attached picture: SpaceShuttle_STEP_loaded_into_CAD_Assistant.PNG
     
  2. Incorrect normals when converted STEP to OBJ using CAD Assistant and viewed in MeshLab, Autodesk Viewer, my own viewer etc.
     - see attached picture: SpaceShuttle_STEP_exported_as_OBJ_from_CAD_Assistant_viewed_in_MeshLab.PNG
     
  3. Incorrect normals when reading STEP using OCCT and rendered using OpenGL.
     - see attached picture: SpaceShuttle_STEP_read_using_OCCT_and_rendered_using_OpenGL.PNG

Seems like this is a general issue in OCCT, are the orientations read from STEP files not correct? How does the CAD Assistant viewer fix the normals?

Best regards, Oliver

Kirill Gavrilov's picture

If you will explore shape properties of the model of problematic parts, you will see that they are defined via open Shells rather than Solids.
Unlike the case of a closed Solid, an orientation of an open Shell can be arbitrary - it just preserves how it was originally constructed.

CAD Assistant shows both Front and Back sides of open Shells with the same color, so that by default you will not be able to see such disparity in the model,
but you can enable the option "Visualization options" -> "Lighting" -> "Distinguish backside of faces" in CAD Assistant settings to see the difference.