Simulator and pspice export: library include path is always empty

Bug #1652353 reported by tekHedd
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
jean-pierre charras

Bug Description

I'm using kicad compiled from master on debian (lmde). I pulled just now (d365dc590efa2ebde06cfe802d37163099535c20).

Application: kicad
Version: (2016-12-22 revision d365dc5)-master, release build
Libraries: wxWidgets 3.0.2
           libcurl/7.38.0 OpenSSL/1.0.1t zlib/1.2.8 libidn/1.29 libssh2/1.4.3 librtmp/2.3
Platform: Linux 3.16.0-4-amd64 x86_64, 64 bit, Little endian, wxGTK
- Build Info -
wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.55.0
Curl: 7.38.0
KiCad - Compiler: GCC 4.9.2 with C++ ABI 1002
        Settings: USE_WX_GRAPHICS_CONTEXT=OFF
                  USE_WX_OVERLAY=OFF
                  KICAD_SCRIPTING=ON
                  KICAD_SCRIPTING_MODULES=ON
                  KICAD_SCRIPTING_WXPYTHON=ON
                  BUILD_GITHUB_PLUGIN=ON
                  KICAD_USE_SCH_IO_MANAGER=OFF
                  KICAD_USE_OCE=OFF

If NET_ADJUST_INCLUDE_PATHS is not set, the pspice_exporter generates:
  .include ""

instead of using the original path. Presumably this is why the new built-in simulator also fails with a cryptic message (wish I could get a dump of its internal spice commands on failure!).

It looks like there is no way to set NET_ADJUST_INCLUDE_PATHS to true at this time (based on the @todo message). I'm a kicad noob so I have no clue. :) At any rate, I don't think there is a workaround. Should be an easy fix though (see netlist_exporter_pspice.cpp line 75 or so.) I'll attach a patch if possible.

thx

Tags: export spice
Revision history for this message
tekHedd (tekhedd) wrote :

On further consideration, i think this bug primarily affects the spice netlist export.

The diff is so small I'm just pasting it. :)

diff --git a/eeschema/netlist_exporters/netlist_exporter_pspice.cpp b/eeschema/netlist_exporters/netlist_exporter_pspice.cpp
index 6a4511a..fd1cc37 100644
--- a/eeschema/netlist_exporters/netlist_exporter_pspice.cpp
+++ b/eeschema/netlist_exporters/netlist_exporter_pspice.cpp
@@ -83,6 +83,10 @@ bool NETLIST_EXPORTER_PSPICE::Format( OUTPUTFORMATTER* aFormatter, unsigned aCtl
                 full_path = lib;
             }
         }
+ else
+ {
+ full_path = lib; // just use the unaltered path
+ }

         aFormatter->Print( 0, ".include \"%s\"\n", (const char*) full_path.c_str() );
     }

Revision history for this message
tekHedd (tekhedd) wrote :

On further consideration, pasting totally ruined the formatting. My bad.

Revision history for this message
tekHedd (tekhedd) wrote :

On further consideration, pasting totally ruined the formatting. My bad.

Revision history for this message
tekHedd (tekhedd) wrote :

On further consideration, pasting totally ruined the formatting. My bad.

Revision history for this message
tekHedd (tekhedd) wrote :

On further consideration, pasting totally ruined the formatting. My bad. (Hmm bug tracker doesn't think the output of "git diff -p" looks like a patch. But anyway there it is.)

Revision history for this message
tekHedd (tekhedd) wrote :

Oh god it actually submitted the comment on the page that said "it does not look like a patch". And I have no way to delete them. I'm very sorry and I will go away now.

tags: added: export spice
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: New → Fix Committed
assignee: nobody → jean-pierre charras (jp-charras)
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

Patches

Remote bug watches

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