Fix bounding box of SPICE RCD

This commit is contained in:
Vadim Kuznetsov 2024-03-13 11:31:32 +03:00
parent 574c9add68
commit 0e7ef5855d
5 changed files with 19 additions and 22 deletions

View File

@ -29,11 +29,6 @@ C_SPICE::C_SPICE()
Description = QObject::tr("SPICE C:\nMultiple line ngspice or Xyce C specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use.");
Simulator = spicecompat::simSpice;
x1 = -30; y1 = -13;
x2 = 30; y2 = 13;
tx = x1+4;
ty = y2+4;
Model = "C_SPICE";
SpiceModel = "C";
Name = "C";
@ -47,6 +42,8 @@ C_SPICE::C_SPICE()
Props.append(new Property("Letter", "C", true,"[C,X,N] SPICE letter"));
createSymbol();
tx = x1+4;
ty = y2+4;
// rotate(); // fix historical flaw
}
@ -67,7 +64,8 @@ void C_SPICE::createSymbol()
Ports.append(new Port(-30, 0));
if (Npins >= 3) Ports.append(new Port( 0, -30));
x1 = -30; y1 = -13;
x2 = 30; y2 = 13;
}

View File

@ -29,12 +29,6 @@ DIODE_SPICE::DIODE_SPICE()
Description = QObject::tr("SPICE D:\nMultiple line ngspice or Xyce D model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use.");
Simulator = spicecompat::simSpice;
x1 = -30; y1 = -11;
x2 = 30; y2 = 11;
tx = x1+4;
ty = y2+4;
Model = "DIODE_SPICE";
SpiceModel = "D";
Name = "D";
@ -48,6 +42,8 @@ DIODE_SPICE::DIODE_SPICE()
Props.append(new Property("Letter", "D", true,"[D,X,N] SPICE letter"));
createSymbol();
tx = x1+4;
ty = y2+4;
}
void DIODE_SPICE::createSymbol()
@ -73,6 +69,9 @@ void DIODE_SPICE::createSymbol()
if (Npins >= 3) Ports.append(new Port( 0, -30));
x1 = -30; y1 = -11;
x2 = 30; y2 = 11;
}
DIODE_SPICE::~DIODE_SPICE()

View File

@ -40,9 +40,6 @@ MOS_SPICE::MOS_SPICE()
createSymbol();
x1 = -30; y1 = -30;
x2 = 4; y2 = 30;
tx = x1+4;
ty = y2+4;
@ -219,6 +216,9 @@ void MOS_SPICE::createSymbol()
Lines.append(new qucs::Line( -1, 0, -6, -5,QPen(Qt::darkRed,2)));
Lines.append(new qucs::Line( -1, 0, -6, 5,QPen(Qt::darkRed,2)));
}
x1 = -30; y1 = -30;
x2 = 4; y2 = 30;
}
QString MOS_SPICE::spice_netlist(bool)

View File

@ -28,12 +28,6 @@ R_SPICE::R_SPICE()
Description = QObject::tr("SPICE R:\nMultiple line ngspice or Xyce R specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use. ");
Simulator = spicecompat::simSpice;
x1 = -30; y1 = -11;
x2 = 30; y2 = 11;
tx = x1+4;
ty = y2+4;
Model = "R_SPICE";
SpiceModel = "R";
Name = "R";
@ -48,6 +42,9 @@ R_SPICE::R_SPICE()
createSymbol();
tx = x1+4;
ty = y2+4;
// rotate(); // fix historical flaw
}
@ -71,6 +68,9 @@ void R_SPICE::createSymbol()
if (Npins >= 3) Ports.append(new Port( 0, -30));
x1 = -30; y1 = -11;
x2 = 30; y2 = 11;
}
R_SPICE::~R_SPICE()

View File

@ -23,7 +23,7 @@
#include "components/component.h"
class R_SPICE : public Component {
class R_SPICE : public MultiViewComponent {
public:
R_SPICE();
~R_SPICE();