Skip to content

Meter units in STEP export #2021

@AdrianKriger

Description

@AdrianKriger

Description:
When exporting a model where coordinates and heights are already in meters (e.g., from a UTM-projected GeoDataFrame), the resulting STEP file header defaults to SI_UNIT(.MILLI.,.METRE.). Like so:
... ... #9640 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.) ); ...
This causes downstream simulation tools to misinterpret the scale.

I have tried using showcase.save("file.step") and cq.exporters.export(shape, "file.step"), but the .MILLI. tag persists despite the raw numerical values being correct for a meter-based model.

Question:
What is the recommended way in CadQuery to explicitly set the LENGTH_UNIT to METRE in the STEP header without manually scaling all geometry points? Is there a global OCP/Interface_Static flag that is compatible with Assembly.save()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions