Skip to content

Origin and color problems with SolidWorks STEP models. #541

@dsa-t

Description

@dsa-t

Description

I have a STEP model that seems to lose origin and color information when re-exported using OCCT.

This archive contains the original and re-exported models: SJ1-2515-SMT-TR-models.zip

For testing, the 4 models were placed next to each other in Altium Designer and opened in the 3D view:

Image

Image

From left to right:

  • Model re-exported in OCCT 7.8.0 (bad origin, bad colors) (SJ1-2515-SMT-TR_occt780.step)
  • Model re-exported in OCCT 7.7.0 (bad origin, good colors) (SJ1-2515-SMT-TR_occt770.step)
  • Model re-exported in OCCT 7.6.0 (bad origin, good colors) (SJ1-2515-SMT-TR_occt760.step)
  • Original model (good origin, bad colors) (SJ1-2515-SMT-TR.STEP)
    In Autodesk online viewer these models look like that too.

Similar test in KiCad 9.0.2 (OCCT 7.8.1) when exported to STEP and viewed in CAD Assistant:

Image

Image


So the problem seems to be that OCCT doesn't put the colors and the origin into the XCAFDoc correctly.


KiCad issue: https://gitlab.com/kicad/code/kicad/-/issues/19065

Expected Behavior

The origin and the colors when re-exporting this model using DRAW should be the same as in the original and not lost.

Actual Behavior

The origin gets changed. And the colors get lost depending on OCCT version.

Sample Code or DRAW Tcl Script

Tcl Code for re-export:

pload ALL DCAF INSPECTOR
ReadStep D ".../SJ1-2515-SMT-TR.STEP"
WriteStep D ".../re-exported.STEP"

Tcl code for viewing in DRAW:

XShow D
vsetdispmode 1

The original model looks like this in DRAW even in OCCT 7.6.0 (bad colors, wrong orientation):

Image

Operating System

Windows

Compiler

MSVC

Bitness

64-bit

OCCT Version

latest

Additional Files

No response

Metadata

Metadata

Labels

0. NewThe issue was created, but not updated by maintainer. Waiting for updates labels and categories1. Data ExchangeImport/Export or iterating of the CAD data2. BugSomething isn't working

Type

No type

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions