← Back to team overview

kicad-developers team mailing list archive

Re: Integrated Simulator

 

Le 22/07/2016 à 11:14, Tomasz Wlostowski a écrit :
> On 22.07.2016 11:11, Eldar Khayrullin wrote:
>> Opening the sallen_key.sch with eeschema show in the log window:
>>
>> 1) Note: can't find init file.
>>
>> 2) Error: .include filename missing
>> If delete ".include diodes.lib" - OK.
>>
>> 3) Error on line 0 : a$poly$e.xu1.eos %vd [ xu1.53 xu1.98 ] %vd ( xu1.3
>> 2 ) a$poly$e.xu1.eos
> 
> Hi Eldar,
> 
> Compile ngspice with --enable-xspice option.
> 
> Tom
> 

Hi, tom,

First, great work. Thanks to all CERN guys.

On W7 32 bits I have a similar issue (using sallen_key.sch).
Here is a copy of the message panel:

Note: can't find init file.
******
** ngspice-26 shared library
** Creation Date: Tue Jul 12 14:24:11 CEST 2016
******
Error: .include filename missing
Error: ngspice.dll cannot recover and awaits to be detached
Error: there aren't any circuits loaded.

The libngspice-0.dll comes from https://orson.net.pl/pub/libngspice/windows/i686/.
I have just copied in in the kicad/bin folder.

Are there some requirements on Windows I am not aware of?

I had also a compil issue due to the fact mathplot is a bit old.
Attached my (small) fixes to compile it on wxWidgets 3.1 on W7 32 bits (without this fix, it does
not compile)

-- 
Jean-Pierre CHARRAS
 common/widgets/mathplot.cpp | 23 ++++++++++++-----------
 include/widgets/mathplot.h  |  3 ++-
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/common/widgets/mathplot.cpp b/common/widgets/mathplot.cpp
index 22f643e..040ab04 100644
--- a/common/widgets/mathplot.cpp
+++ b/common/widgets/mathplot.cpp
@@ -91,7 +91,7 @@ wxBitmap mpLayer::GetColourSquare(int side)
 {
     wxBitmap square(side, side, -1);
     wxColour filler = m_pen.GetColour();
-    wxBrush brush(filler, wxSOLID);
+    wxBrush brush(filler, wxBRUSHSTYLE_SOLID );
     wxMemoryDC dc;
     dc.SelectObject(square);
     dc.SetBackground(brush);
@@ -1236,14 +1236,14 @@ void mpScaleXBase::Plot(wxDC & dc, mpWindow & w)
                     else
                         dc.DrawLine( p, orgy, p, orgy+4);
                 } else { // draw grid dotted lines
-                    m_pen.SetStyle(wxDOT);
+                    m_pen.SetStyle(wxPENSTYLE_DOT);
                     dc.SetPen(m_pen);
                     if ((m_flags == mpALIGN_BOTTOM) && !m_drawOutsideMargins) {
                         //printf("d1");
-                        m_pen.SetStyle(wxDOT);
+                        m_pen.SetStyle(wxPENSTYLE_DOT);
                         dc.SetPen(m_pen);
                         dc.DrawLine( p, orgy+4, p, minYpx );
-                        m_pen.SetStyle(wxSOLID);
+                        m_pen.SetStyle(wxPENSTYLE_SOLID );
                         dc.SetPen(m_pen);
                         dc.DrawLine( p, orgy+4, p, orgy-4 );
                     } else {
@@ -1255,13 +1255,13 @@ void mpScaleXBase::Plot(wxDC & dc, mpWindow & w)
                             dc.DrawLine( p, minYpx, p, maxYpx ); //0/*-w.GetScrY()*/, p, w.GetScrY() );
                         }
                     }
-                    m_pen.SetStyle(wxSOLID);
+                    m_pen.SetStyle(wxPENSTYLE_SOLID );
                     dc.SetPen(m_pen);
                 }
             }
         }
 
-        m_pen.SetStyle(wxSOLID);
+        m_pen.SetStyle(wxPENSTYLE_SOLID );
         dc.SetPen(m_pen);
         dc.DrawLine( startPx, minYpx, endPx, minYpx );
         dc.DrawLine( startPx, maxYpx, endPx, maxYpx );
@@ -1419,7 +1419,7 @@ void mpScaleY::Plot(wxDC & dc, mpWindow & w)
                 } else {
                     dc.DrawLine( orgx-4, p, orgx+4, p);
 
-                    m_pen.SetStyle(wxDOT);
+                    m_pen.SetStyle(wxPENSTYLE_DOT);
                     dc.SetPen( m_pen);
                     if ((m_flags == mpALIGN_LEFT) && !m_drawOutsideMargins) {
                         dc.DrawLine( orgx-4, p, endPx, p);
@@ -1432,7 +1432,7 @@ void mpScaleY::Plot(wxDC & dc, mpWindow & w)
                             //dc.DrawLine( orgx-4/*-w.GetScrX()*/, p, w.GetScrX(), p);
                         }
                     }
-                    m_pen.SetStyle(wxSOLID);
+                    m_pen.SetStyle(wxPENSTYLE_SOLID );
                     dc.SetPen( m_pen);
                 }
                 // Print ticks labels
@@ -1671,7 +1671,7 @@ void mpWindow::OnMouseMove(wxMouseEvent     &event)
         if (event.m_leftDown) {
             if (m_movingInfoLayer == NULL) {
                 wxClientDC dc(this);
-                wxPen pen(m_fgColour, 1, wxDOT);
+                wxPen pen(m_fgColour, 1, wxPENSTYLE_DOT);
                 dc.SetPen(pen);
                 dc.SetBrush(*wxTRANSPARENT_BRUSH);
                 dc.DrawRectangle(m_mouseLClick.x, m_mouseLClick.y, event.GetX() - m_mouseLClick.x, event.GetY() - m_mouseLClick.y);
@@ -2265,7 +2265,7 @@ void mpWindow::OnPaint( wxPaintEvent& WXUNUSED(event) )
 
     if(m_zooming)
     {
-        wxPen pen(m_fgColour, 1, wxDOT);
+        wxPen pen(m_fgColour, 1, wxPENSTYLE_DOT);
         trgDc->SetPen(pen);
         trgDc->SetBrush(*wxTRANSPARENT_BRUSH);
         trgDc->DrawRectangle(m_zoomRect);
@@ -2684,7 +2684,8 @@ void mpWindow::GetBoundingBox(double* bbox)
     bbox[3] = m_maxY;
 }
 
-bool mpWindow::SaveScreenshot(const wxString& filename, int type, wxSize imageSize, bool fit)
+bool mpWindow::SaveScreenshot( const wxString& filename, wxBitmapType type,
+                               wxSize imageSize, bool fit )
 {
     int sizeX, sizeY;
     int bk_scrX, bk_scrY;
diff --git a/include/widgets/mathplot.h b/include/widgets/mathplot.h
index 1f8c18f..170df50 100644
--- a/include/widgets/mathplot.h
+++ b/include/widgets/mathplot.h
@@ -1301,7 +1301,8 @@ class WXDLLIMPEXP_MATHPLOT mpWindow : public wxWindow
           @param type image type to be saved: see wxImage output file types for flags
           @param imageSize Set a size for the output image. Default is the same as the screen size
           @param fit Decide whether to fit the plot into the size*/
-        bool SaveScreenshot(const wxString& filename, int type = wxBITMAP_TYPE_BMP, wxSize imageSize = wxDefaultSize, bool fit = false);
+        bool SaveScreenshot(const wxString& filename, wxBitmapType type = wxBITMAP_TYPE_BMP,
+                            wxSize imageSize = wxDefaultSize, bool fit = false);
 
         /** This value sets the zoom steps whenever the user clicks "Zoom in/out" or performs zoom with the mouse wheel.
          *  It must be a number above unity. This number is used for zoom in, and its inverse for zoom out. Set to 1.5 by default. */

References