Skip to content

feat: add support for editing STEP headers

Giannis Nikiteas requested to merge feat/occ-step-metadata into master

Fixes #2739 (closed)

I have made certain decisions to keep things simple.

  1. Certain STEP headers receive an array of strings as an input. Since we can't pass that kind of data structure in Gmsh options (DefaultOptions.h) I have opted to use a length 1 array. This works fine the STEP writer formats the output (max line width) anyway.
  2. I have chosen to leave the defaults empty so that they default to the OCC, however I am not sure if that is the best solution. When the user wants to intentionally set a header section as an empty string Gmsh will default to the OCC internal value. Maybe there is a better way to check if the options have been set other than string.empty() ?
  3. I used names for the options that match the definitions of the STEP fields in OCC. We could potentially change those to something more user friendly.
  4. I used Handle_... instead of Handle(SomeType) since it is less verbose (by 1 char).
  5. I formatted the code with clang-format (and the committed config file). FYI we should probably set-up some pre-commit hooks for formatting, because there were other formatting issues from unrelated code that clang-format picked up.
Edited by Giannis Nikiteas

Merge request reports