step file export option user origin does not work

Bug #1778564 reported by Stefan Bethge
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Seth Hillbrand

Bug Description

When exporting a step file from pcbnew, there is an option to set a user defined origin. The command line option user-origin is set as e.g. --user-origin 150.495000x86.895000 while the help text on the command line states it should be used as --user-origin=10.0x10.0mm. Doing this manually on the console however also fails with the generic usage help output. I was not able to produce a custom origin step file at all. Without the option it seems to work normal.

Application: kicad
Version: (5.0.0-rc2-189-ga552b4c), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Platform: Mac OS X (Darwin 17.6.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (UTF-8,STL containers,compatible with 2.8)
    Boost: 1.61.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.43.0
    Compiler: Clang 7.3.0 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=ON
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

tags: added: export step
tags: added: kicad2step
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Is the step export not creating any step file or is the step file created but the origin is incorrect. I just tested this with 5.0.0 and the latest development build and I am getting a valid step file with the user origin set to 100.5x100.5 and -100.5x-100.5 but I'm not 100% sure the user offset of the model is correct.

Changed in kicad:
status: New → Incomplete
Revision history for this message
Stefan Bethge (kjyv) wrote :

As written, I was not able to produce a custom origin step file. No step file is written when a custom origin is specified. I've tested it again also with the current stable 5.0.0-3, same behavior. Maybe this is OS X specific but it seems to convert tool is somehow broken.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Would one of our macos devs please test this? I am not having this issue on windows so it may be macos specific.

Revision history for this message
Maciej Suminski (orsonmmz) wrote :

Could it be a locale problem? Does it work for you when you replace points with commas?

Revision history for this message
Seth Hillbrand (sethh) wrote :

Confirmed on Mac. The 0.0000x0.00000 parameter will probably need to be quoted for MacOS. Also fails for Board Center origin

Error:
Executing '"/Users/seth/code/kicad-mac-builder/build/kicad-dest/kicad.app/Contents/Applications/pcbnew.app/Contents/MacOS/../../../../MacOS/kicad2step" --no-virtual --user-origin 133.208967x51.762820 -f -o "/Users/seth/Downloads/TEST KICAD STEP EXPORT.step" "/Users/seth/Downloads/_autosave-TEST KICAD STEP EXPORT.kicad_pcb"'
Warning: Usage: kicad2step [-o ] [-f] [--drill-origin] [--grid-origin] [--user-origin ] [--no-virtual] [--min-distance ] [-h]
Warning: -o, --output-filename=
Warning: -f, --force
Warning: --drill-origin
Warning: --grid-origin c
Warning: --user-origin= a
Warning: --no-virtual
Warning: --min-distance= ntents/Applications/pcbnew.app/Contents/MacOS/../../../../MacOS/kicad2step
Warning: -h r
Error: Unable to create STEP file. Check that the board has a valid outline and models.

Application: pcbnew
Version: (6.0.0-rc1-dev-404-g60620ea2a), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Platform: Mac OS X (Darwin 17.6.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (UTF-8,STL containers,compatible with 2.8)
    Boost: 1.66.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=ON
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Revision history for this message
Stefan Bethge (kjyv) wrote :

No, using commas and/or quoting does not help either. I've noticed the usage message is also a little bit weird, with random characters at the end of some of the lines. They change when I specify mm or no unit:

Usage: kicad2step [-o <str>] [-f] [--drill-origin] [--grid-origin] [--user-origin <str>] [--no-virtual] [--min-distance <str>] [-h]
  -o, --output-filename=<str>
  -f, --force r
  --drill-origin
  --grid-origin
  --user-origin=<str>
  --no-virtual t
  --min-distance=<str> a
  -h

Seth Hillbrand (sethh)
Changed in kicad:
milestone: none → 5.0.1
status: Incomplete → Triaged
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision e7a9643b379e0d05be8dc56d1630148d0107ec07
https://git.launchpad.net/kicad/patch/?id=e7a9643b379e0d05be8dc56d1630148d0107ec07

Changed in kicad:
status: Triaged → Fix Committed
assignee: nobody → Seth Hillbrand (sethh)
Revision history for this message
Andy Peters (devel-latke) wrote :

I just noticed that I can't create a STEP file of the whole board using the board center as the origin. I get the same messages as noted in Seth's comment #5 above.

Does the fix just committed fix the board-origin fail, too?

Revision history for this message
Andy Peters (devel-latke) wrote :

Answering my own question: in the 27 Sept 2018 nightly, it is fixed.

Application: kicad
Version: (6.0.0-rc1-dev-617-g3bac10b11), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Platform: Mac OS X (Darwin 17.7.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (UTF-8,STL containers,compatible with 2.8)
    Boost: 1.67.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.51.0
    Compiler: Clang 8.0.0 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=ON
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.