From 03d61bb52490feddb5ca539a1feef05280368947 Mon Sep 17 00:00:00 2001
From: "Irina Lee [m1]" <irina.lee@etu.upmc.fr>
Date: Thu, 26 Jul 2018 13:38:45 +0200
Subject: [PATCH] add connecting point in files translator (eln)

---
 .../elntranslator/ELNTComponentCapacitor.java |  4 +-
 .../ELNTComponentCurrentSinkTDF.java          | 10 ++++-
 .../ELNTComponentCurrentSourceTDF.java        | 10 ++++-
 .../ELNTComponentIdealTransformer.java        | 10 ++++-
 ...ELNTComponentIndependentCurrentSource.java | 10 ++++-
 ...ELNTComponentIndependentVoltageSource.java | 10 ++++-
 .../elntranslator/ELNTComponentInductor.java  | 10 ++++-
 .../elntranslator/ELNTComponentResistor.java  | 10 ++++-
 .../ELNTComponentTransmissionLine.java        | 10 ++++-
 ...mponentVoltageControlledCurrentSource.java | 10 ++++-
 ...mponentVoltageControlledVoltageSource.java | 10 ++++-
 .../ELNTComponentVoltageSinkTDF.java          | 10 ++++-
 .../ELNTComponentVoltageSourceTDF.java        | 10 ++++-
 src/main/java/ui/ELNPanelTranslator.java      | 41 ++++++++++++-------
 14 files changed, 138 insertions(+), 27 deletions(-)

diff --git a/src/main/java/elntranslator/ELNTComponentCapacitor.java b/src/main/java/elntranslator/ELNTComponentCapacitor.java
index d228497920..8937aa21fa 100644
--- a/src/main/java/elntranslator/ELNTComponentCapacitor.java
+++ b/src/main/java/elntranslator/ELNTComponentCapacitor.java
@@ -38,6 +38,8 @@
 
 package elntranslator;
 
+import ui.eln.ELNConnectingPoint;
+
 /**
  * Class ELNTComponentCapacitor
  * Parameters of a ELN primitive component : capacitor
@@ -53,7 +55,7 @@ public class ELNTComponentCapacitor extends ELNTComponent {
 	
 	private ELNTModule module;
 	
-	public ELNTComponentCapacitor(String _name, double _val, double _q0, String _unit0, String _unit1, ELNTModule _module) {
+	public ELNTComponentCapacitor(String _name, double _val, double _q0, String _unit0, String _unit1, ELNConnectingPoint[] _cp, ELNTModule _module) {
 		name = _name;
 		val = _val;
 		q0 = _q0;
diff --git a/src/main/java/elntranslator/ELNTComponentCurrentSinkTDF.java b/src/main/java/elntranslator/ELNTComponentCurrentSinkTDF.java
index 6f83646d7d..a0ffc2cba4 100644
--- a/src/main/java/elntranslator/ELNTComponentCurrentSinkTDF.java
+++ b/src/main/java/elntranslator/ELNTComponentCurrentSinkTDF.java
@@ -38,6 +38,8 @@
 
 package elntranslator;
 
+import ui.eln.ELNConnectingPoint;
+
 /**
  * Class ELNTComponentCurrentSinkTDF
  * Parameters of a ELN primitive component : TDF current sink
@@ -49,12 +51,14 @@ package elntranslator;
 public class ELNTComponentCurrentSinkTDF extends ELNTComponent {
 	private String name;
 	private double scale;
+	private ELNConnectingPoint[] cp;
 	
 	private ELNTModule module;
 	
-	public ELNTComponentCurrentSinkTDF(String _name, double _scale, ELNTModule _module) {
+	public ELNTComponentCurrentSinkTDF(String _name, double _scale, ELNConnectingPoint[] _cp, ELNTModule _module) {
 		name = _name;
 		scale = _scale;
+		cp = _cp;
 		module = _module;
 	}
 
@@ -66,6 +70,10 @@ public class ELNTComponentCurrentSinkTDF extends ELNTComponent {
 		return scale;
 	}
 
+	public ELNConnectingPoint[] getCp() {
+		return cp;
+	}
+	
 	public ELNTModule getModule() {
 		return module;
 	}
diff --git a/src/main/java/elntranslator/ELNTComponentCurrentSourceTDF.java b/src/main/java/elntranslator/ELNTComponentCurrentSourceTDF.java
index c4eb167417..464097cd52 100644
--- a/src/main/java/elntranslator/ELNTComponentCurrentSourceTDF.java
+++ b/src/main/java/elntranslator/ELNTComponentCurrentSourceTDF.java
@@ -38,6 +38,8 @@
 
 package elntranslator;
 
+import ui.eln.ELNConnectingPoint;
+
 /**
  * Class ELNTComponentCurrentSourceTDF
  * Parameters of a ELN primitive component : TDF current source
@@ -49,12 +51,14 @@ package elntranslator;
 public class ELNTComponentCurrentSourceTDF extends ELNTComponent {
 	private String name;
 	private double scale;
+	private ELNConnectingPoint[] cp;
 	
 	private ELNTModule module;
 	
-	public ELNTComponentCurrentSourceTDF(String _name, double _scale, ELNTModule _module) {
+	public ELNTComponentCurrentSourceTDF(String _name, double _scale, ELNConnectingPoint[] _cp, ELNTModule _module) {
 		name = _name;
 		scale = _scale;
+		cp = _cp;
 		module = _module;
 	}
 
@@ -66,6 +70,10 @@ public class ELNTComponentCurrentSourceTDF extends ELNTComponent {
 		return scale;
 	}
 
+	public ELNConnectingPoint[] getCp() {
+		return cp;
+	}
+	
 	public ELNTModule getModule() {
 		return module;
 	}
diff --git a/src/main/java/elntranslator/ELNTComponentIdealTransformer.java b/src/main/java/elntranslator/ELNTComponentIdealTransformer.java
index ac915027e1..e6e8588bc0 100644
--- a/src/main/java/elntranslator/ELNTComponentIdealTransformer.java
+++ b/src/main/java/elntranslator/ELNTComponentIdealTransformer.java
@@ -38,6 +38,8 @@
 
 package elntranslator;
 
+import ui.eln.ELNConnectingPoint;
+
 /**
  * Class ELNTComponentIdealTransformer
  * Parameters of a ELN primitive component : ideal transformer
@@ -49,12 +51,14 @@ package elntranslator;
 public class ELNTComponentIdealTransformer extends ELNTComponent {
 	private String name;
 	private double ratio;
+	private ELNConnectingPoint[] cp;
 	
 	private ELNTModule module;
 	
-	public ELNTComponentIdealTransformer(String _name, double _ratio, ELNTModule _module) {
+	public ELNTComponentIdealTransformer(String _name, double _ratio, ELNConnectingPoint[] _cp, ELNTModule _module) {
 		name = _name;
 		ratio = _ratio;
+		cp = _cp;
 		module = _module;
 	}
 
@@ -65,6 +69,10 @@ public class ELNTComponentIdealTransformer extends ELNTComponent {
 	public double getRatio() {
 		return ratio;
 	}
+	
+	public ELNConnectingPoint[] getCp() {
+		return cp;
+	}
 
 	public ELNTModule getModule() {
 		return module;
diff --git a/src/main/java/elntranslator/ELNTComponentIndependentCurrentSource.java b/src/main/java/elntranslator/ELNTComponentIndependentCurrentSource.java
index 6e83ffcf1b..9596a8b4ae 100644
--- a/src/main/java/elntranslator/ELNTComponentIndependentCurrentSource.java
+++ b/src/main/java/elntranslator/ELNTComponentIndependentCurrentSource.java
@@ -38,6 +38,8 @@
 
 package elntranslator;
 
+import ui.eln.ELNConnectingPoint;
+
 /**
  * Class ELNTComponentIndependentCurrentSource
  * Parameters of a ELN primitive component : independent current source
@@ -51,11 +53,12 @@ public class ELNTComponentIndependentCurrentSource extends ELNTComponent {
 	private double initValue, offset, amplitude, frequency, phase, acAmplitude, acPhase, acNoiseAmplitude;
 	private String delay;
 	private String unit0;
+	private ELNConnectingPoint[] cp;
 	
 	private ELNTModule module;
 	
 	public ELNTComponentIndependentCurrentSource(String _name, double _initValue, double _offset, double _amplitude, double _frequency, double _phase, 
-			double _acAmplitude, double _acPhase, double _acNoiseAmplitude, String _delay, String _unit0, ELNTModule _module) {
+			double _acAmplitude, double _acPhase, double _acNoiseAmplitude, String _delay, String _unit0, ELNConnectingPoint[] _cp, ELNTModule _module) {
 		name = _name;
 		initValue = _initValue;
 		offset = _offset;
@@ -67,6 +70,7 @@ public class ELNTComponentIndependentCurrentSource extends ELNTComponent {
 		acNoiseAmplitude = _acNoiseAmplitude;
 		delay = _delay;
 		unit0 = _unit0;
+		cp = _cp;
 		module = _module;
 	}
 
@@ -113,6 +117,10 @@ public class ELNTComponentIndependentCurrentSource extends ELNTComponent {
 	public String getUnit0() {
 		return unit0;
 	}
+	
+	public ELNConnectingPoint[] getCp() {
+		return cp;
+	}
 
 	public ELNTModule getModule() {
 		return module;
diff --git a/src/main/java/elntranslator/ELNTComponentIndependentVoltageSource.java b/src/main/java/elntranslator/ELNTComponentIndependentVoltageSource.java
index 875fd8c8f5..9b2c8c944a 100644
--- a/src/main/java/elntranslator/ELNTComponentIndependentVoltageSource.java
+++ b/src/main/java/elntranslator/ELNTComponentIndependentVoltageSource.java
@@ -38,6 +38,8 @@
 
 package elntranslator;
 
+import ui.eln.ELNConnectingPoint;
+
 /**
  * Class ELNTComponentIndependentVoltageSource
  * Parameters of a ELN primitive component : independent voltage source
@@ -51,11 +53,12 @@ public class ELNTComponentIndependentVoltageSource extends ELNTComponent {
 	private double initValue, offset, amplitude, frequency, phase, acAmplitude, acPhase, acNoiseAmplitude;
 	private String delay;
 	private String unit0;
+	private ELNConnectingPoint[] cp;
 	
 	private ELNTModule module;
 	
 	public ELNTComponentIndependentVoltageSource(String _name, double _initValue, double _offset, double _amplitude, double _frequency, double _phase, 
-			double _acAmplitude, double _acPhase, double _acNoiseAmplitude, String _delay, String _unit0, ELNTModule _module) {
+			double _acAmplitude, double _acPhase, double _acNoiseAmplitude, String _delay, String _unit0, ELNConnectingPoint[] _cp, ELNTModule _module) {
 		name = _name;
 		initValue = _initValue;
 		offset = _offset;
@@ -67,6 +70,7 @@ public class ELNTComponentIndependentVoltageSource extends ELNTComponent {
 		acNoiseAmplitude = _acNoiseAmplitude;
 		delay = _delay;
 		unit0 = _unit0;
+		cp = _cp;
 		module = _module;
 	}
 
@@ -114,6 +118,10 @@ public class ELNTComponentIndependentVoltageSource extends ELNTComponent {
 		return unit0;
 	}
 
+	public ELNConnectingPoint[] getCp() {
+		return cp;
+	}
+	
 	public ELNTModule getModule() {
 		return module;
 	}
diff --git a/src/main/java/elntranslator/ELNTComponentInductor.java b/src/main/java/elntranslator/ELNTComponentInductor.java
index 9bdba90dfa..96020bf090 100644
--- a/src/main/java/elntranslator/ELNTComponentInductor.java
+++ b/src/main/java/elntranslator/ELNTComponentInductor.java
@@ -38,6 +38,8 @@
 
 package elntranslator;
 
+import ui.eln.ELNConnectingPoint;
+
 /**
  * Class ELNTComponentInductor
  * Parameters of a ELN primitive component : inductor
@@ -50,15 +52,17 @@ public class ELNTComponentInductor extends ELNTComponent {
 	private String name;
 	private double val, phi0;
 	private String unit0, unit1;
+	private ELNConnectingPoint[] cp;
 	
 	private ELNTModule module;
 	
-	public ELNTComponentInductor(String _name, double _val, double _phi0, String _unit0, String _unit1, ELNTModule _module) {
+	public ELNTComponentInductor(String _name, double _val, double _phi0, String _unit0, String _unit1, ELNConnectingPoint[] _cp, ELNTModule _module) {
 		name = _name;
 		val = _val;
 		phi0 = _phi0;
 		unit0 = _unit0;
 		unit1 = _unit1;
+		cp = _cp;
 		module = _module;
 	}
 
@@ -82,6 +86,10 @@ public class ELNTComponentInductor extends ELNTComponent {
 		return unit1;
 	}
 
+	public ELNConnectingPoint[] getCp() {
+		return cp;
+	}
+	
 	public ELNTModule getModule() {
 		return module;
 	}
diff --git a/src/main/java/elntranslator/ELNTComponentResistor.java b/src/main/java/elntranslator/ELNTComponentResistor.java
index 607882b250..fc015176c7 100644
--- a/src/main/java/elntranslator/ELNTComponentResistor.java
+++ b/src/main/java/elntranslator/ELNTComponentResistor.java
@@ -38,6 +38,8 @@
 
 package elntranslator;
 
+import ui.eln.ELNConnectingPoint;
+
 /**
  * Class ELNTComponentResistor
  * Parameters of a ELN primitive component : resistor
@@ -50,13 +52,15 @@ public class ELNTComponentResistor extends ELNTComponent {
 	private String name;
 	private double val;
 	private String unit;
+	private ELNConnectingPoint[] cp;
 	
 	private ELNTModule module;
 	
-	public ELNTComponentResistor(String _name, double _val, String _unit, ELNTModule _module) {
+	public ELNTComponentResistor(String _name, double _val, String _unit, ELNConnectingPoint[] _cp, ELNTModule _module) {
 		name = _name;
 		val = _val;
 		unit = _unit;
+		cp = _cp;
 		module = _module;
 	}
 
@@ -71,6 +75,10 @@ public class ELNTComponentResistor extends ELNTComponent {
 	public String getUnit() {
 		return unit;
 	}
+	
+	public ELNConnectingPoint[] getCp() {
+		return cp;
+	}
 
 	public ELNTModule getModule() {
 		return module;
diff --git a/src/main/java/elntranslator/ELNTComponentTransmissionLine.java b/src/main/java/elntranslator/ELNTComponentTransmissionLine.java
index 1e1af79423..8211c380ec 100644
--- a/src/main/java/elntranslator/ELNTComponentTransmissionLine.java
+++ b/src/main/java/elntranslator/ELNTComponentTransmissionLine.java
@@ -38,6 +38,8 @@
 
 package elntranslator;
 
+import ui.eln.ELNConnectingPoint;
+
 /**
  * Class ELNTComponentTransmissionLine
  * Parameters of a ELN primitive component : transmission line
@@ -51,16 +53,18 @@ public class ELNTComponentTransmissionLine extends ELNTComponent {
 	private double z0, delta0;
 	private String delay;
 	private String unit0, unit2;
+	private ELNConnectingPoint[] cp;
 	
 	private ELNTModule module;
 	
-	public ELNTComponentTransmissionLine(String _name, double _z0, double _delta0, String _delay, String _unit0, String _unit2, ELNTModule _module) {
+	public ELNTComponentTransmissionLine(String _name, double _z0, double _delta0, String _delay, String _unit0, String _unit2, ELNConnectingPoint[] _cp, ELNTModule _module) {
 		name = _name;
 		z0 = _z0;
 		delta0 = _delta0;
 		delay = _delay;
 		unit0 = _unit0;
 		unit2 = _unit2;
+		cp = _cp;
 		module = _module;
 	}
 
@@ -88,6 +92,10 @@ public class ELNTComponentTransmissionLine extends ELNTComponent {
 		return unit2;
 	}
 
+	public ELNConnectingPoint[] getCp() {
+		return cp;
+	}
+	
 	public ELNTModule getModule() {
 		return module;
 	}
diff --git a/src/main/java/elntranslator/ELNTComponentVoltageControlledCurrentSource.java b/src/main/java/elntranslator/ELNTComponentVoltageControlledCurrentSource.java
index 327840d4bc..fa7c19ba10 100644
--- a/src/main/java/elntranslator/ELNTComponentVoltageControlledCurrentSource.java
+++ b/src/main/java/elntranslator/ELNTComponentVoltageControlledCurrentSource.java
@@ -38,6 +38,8 @@
 
 package elntranslator;
 
+import ui.eln.ELNConnectingPoint;
+
 /**
  * Class ELNTComponentVoltageControlledCurrentSource
  * Parameters of a ELN primitive component : voltage controlled current source
@@ -50,13 +52,15 @@ public class ELNTComponentVoltageControlledCurrentSource extends ELNTComponent {
 	private String name;
 	private double val;
 	private String unit;
+	private ELNConnectingPoint[] cp;
 	
 	private ELNTModule module;
 	
-	public ELNTComponentVoltageControlledCurrentSource(String _name, double _val, String _unit, ELNTModule _module) {
+	public ELNTComponentVoltageControlledCurrentSource(String _name, double _val, String _unit, ELNConnectingPoint[] _cp, ELNTModule _module) {
 		name = _name;
 		val = _val;
 		unit = _unit;
+		cp = _cp;
 		module = _module;
 	}
 
@@ -71,6 +75,10 @@ public class ELNTComponentVoltageControlledCurrentSource extends ELNTComponent {
 	public String getUnit() {
 		return unit;
 	}
+	
+	public ELNConnectingPoint[] getCp() {
+		return cp;
+	}
 
 	public ELNTModule getModule() {
 		return module;
diff --git a/src/main/java/elntranslator/ELNTComponentVoltageControlledVoltageSource.java b/src/main/java/elntranslator/ELNTComponentVoltageControlledVoltageSource.java
index 564559de46..7a1e9e2892 100644
--- a/src/main/java/elntranslator/ELNTComponentVoltageControlledVoltageSource.java
+++ b/src/main/java/elntranslator/ELNTComponentVoltageControlledVoltageSource.java
@@ -38,6 +38,8 @@
 
 package elntranslator;
 
+import ui.eln.ELNConnectingPoint;
+
 /**
  * Class ELNTComponentVoltageControlledVoltageSource
  * Parameters of a ELN primitive component : voltage controlled voltage source
@@ -49,12 +51,14 @@ package elntranslator;
 public class ELNTComponentVoltageControlledVoltageSource extends ELNTComponent {
 	private String name;
 	private double val;
+	private ELNConnectingPoint[] cp;
 	
 	private ELNTModule module;
 	
-	public ELNTComponentVoltageControlledVoltageSource(String _name, double _val, ELNTModule _module) {
+	public ELNTComponentVoltageControlledVoltageSource(String _name, double _val, ELNConnectingPoint[] _cp, ELNTModule _module) {
 		name = _name;
 		val = _val;
+		cp = _cp;
 		module = _module;
 	}
 
@@ -65,6 +69,10 @@ public class ELNTComponentVoltageControlledVoltageSource extends ELNTComponent {
 	public double getVal() {
 		return val;
 	}
+	
+	public ELNConnectingPoint[] getCp() {
+		return cp;
+	}
 
 	public ELNTModule getModule() {
 		return module;
diff --git a/src/main/java/elntranslator/ELNTComponentVoltageSinkTDF.java b/src/main/java/elntranslator/ELNTComponentVoltageSinkTDF.java
index d6072a9052..da0e9c1083 100644
--- a/src/main/java/elntranslator/ELNTComponentVoltageSinkTDF.java
+++ b/src/main/java/elntranslator/ELNTComponentVoltageSinkTDF.java
@@ -38,6 +38,8 @@
 
 package elntranslator;
 
+import ui.eln.ELNConnectingPoint;
+
 /**
  * Class ELNTComponentVoltageSinkTDF
  * Parameters of a ELN primitive component : TDF voltage sink
@@ -49,12 +51,14 @@ package elntranslator;
 public class ELNTComponentVoltageSinkTDF extends ELNTComponent {
 	private String name;
 	private double scale;
+	private ELNConnectingPoint[] cp;
 	
 	private ELNTModule module;
 	
-	public ELNTComponentVoltageSinkTDF(String _name, double _scale, ELNTModule _module) {
+	public ELNTComponentVoltageSinkTDF(String _name, double _scale, ELNConnectingPoint[] _cp, ELNTModule _module) {
 		name = _name;
 		scale = _scale;
+		cp = _cp;
 		module = _module;
 	}
 
@@ -66,6 +70,10 @@ public class ELNTComponentVoltageSinkTDF extends ELNTComponent {
 		return scale;
 	}
 
+	public ELNConnectingPoint[] getCp() {
+		return cp;
+	}
+	
 	public ELNTModule getModule() {
 		return module;
 	}
diff --git a/src/main/java/elntranslator/ELNTComponentVoltageSourceTDF.java b/src/main/java/elntranslator/ELNTComponentVoltageSourceTDF.java
index 43e4bd2640..6f51b41e0e 100644
--- a/src/main/java/elntranslator/ELNTComponentVoltageSourceTDF.java
+++ b/src/main/java/elntranslator/ELNTComponentVoltageSourceTDF.java
@@ -38,6 +38,8 @@
 
 package elntranslator;
 
+import ui.eln.ELNConnectingPoint;
+
 /**
  * Class ELNTComponentVoltageSourceTDF
  * Parameters of a ELN primitive component : TDF voltage source
@@ -49,12 +51,14 @@ package elntranslator;
 public class ELNTComponentVoltageSourceTDF extends ELNTComponent {
 	private String name;
 	private double scale;
+	private ELNConnectingPoint[] cp;
 	
 	private ELNTModule module;
 	
-	public ELNTComponentVoltageSourceTDF(String _name, double _scale, ELNTModule _module) {
+	public ELNTComponentVoltageSourceTDF(String _name, double _scale, ELNConnectingPoint[] _cp, ELNTModule _module) {
 		name = _name;
 		scale = _scale;
+		cp = _cp;
 		module = _module;
 	}
 
@@ -65,6 +69,10 @@ public class ELNTComponentVoltageSourceTDF extends ELNTComponent {
 	public double getScale() {
 		return scale;
 	}
+	
+	public ELNConnectingPoint[] getCp() {
+		return cp;
+	}
 
 	public ELNTModule getModule() {
 		return module;
diff --git a/src/main/java/ui/ELNPanelTranslator.java b/src/main/java/ui/ELNPanelTranslator.java
index f7922c3c9f..d8c810b192 100644
--- a/src/main/java/ui/ELNPanelTranslator.java
+++ b/src/main/java/ui/ELNPanelTranslator.java
@@ -105,8 +105,9 @@ public class ELNPanelTranslator {
 					double q0 = capacitor.getQ0();
 					String unit0 = capacitor.getUnit0();
 					String unit1 = capacitor.getUnit1();
+					ELNConnectingPoint[] cp = (ELNConnectingPoint) capacitor.connectingPoint;
 
-					ELNTComponentCapacitor elnCapacitor = new ELNTComponentCapacitor(name, val, q0, unit0, unit1, elnModule);
+					ELNTComponentCapacitor elnCapacitor = new ELNTComponentCapacitor(name, val, q0, unit0, unit1, cp, elnModule);
 
 					elnMap.put(capacitor, elnCapacitor);
 					elnModule.addComponentCapacitor(elnCapacitor);
@@ -118,8 +119,9 @@ public class ELNPanelTranslator {
 
 					String name = TDF_isink.getValue();
 					double scale = TDF_isink.getScale();
+					ELNConnectingPoint[] cp = (ELNConnectingPoint) TDF_isink.connectingPoint;
 
-					ELNTComponentCurrentSinkTDF elnTDF_isink = new ELNTComponentCurrentSinkTDF(name, scale, elnModule);
+					ELNTComponentCurrentSinkTDF elnTDF_isink = new ELNTComponentCurrentSinkTDF(name, scale, cp, elnModule);
 
 					elnMap.put(TDF_isink, elnTDF_isink);
 					elnModule.addComponentCurrentSinkTDF(elnTDF_isink);
@@ -131,8 +133,9 @@ public class ELNPanelTranslator {
 
 					String name = TDF_isource.getValue();
 					double scale = TDF_isource.getScale();
+					ELNConnectingPoint[] cp = (ELNConnectingPoint) TDF_isource.connectingPoint;
 
-					ELNTComponentCurrentSourceTDF elnTDF_isource = new ELNTComponentCurrentSourceTDF(name, scale, elnModule);
+					ELNTComponentCurrentSourceTDF elnTDF_isource = new ELNTComponentCurrentSourceTDF(name, scale, cp, elnModule);
 
 					elnMap.put(TDF_isource, elnTDF_isource);
 					elnModule.addComponentCurrentSourceTDF(elnTDF_isource);
@@ -144,8 +147,9 @@ public class ELNPanelTranslator {
 
 					String name = idealTransformer.getValue();
 					double ratio = idealTransformer.getRatio();
+					ELNConnectingPoint[] cp = (ELNConnectingPoint) idealTransformer.connectingPoint;
 
-					ELNTComponentIdealTransformer elnIdealTransformer = new ELNTComponentIdealTransformer(name, ratio, elnModule);
+					ELNTComponentIdealTransformer elnIdealTransformer = new ELNTComponentIdealTransformer(name, ratio, cp, elnModule);
 
 					elnMap.put(idealTransformer, elnIdealTransformer);
 					elnModule.addComponentIdealTransformer(elnIdealTransformer);
@@ -166,8 +170,9 @@ public class ELNPanelTranslator {
 					double acNoiseAmpliture = isource.getAcNoiseAmplitude();
 					String delay = isource.getDelay();
 					String unit0 = isource.getUnit0();
+					ELNConnectingPoint[] cp = (ELNConnectingPoint) isource.connectingPoint;
 
-					ELNTComponentIndependentCurrentSource elnISource = new ELNTComponentIndependentCurrentSource(name, initValue, offset, amplitude, frequency, phase, acAmplitude, acPhase, acNoiseAmpliture, delay, unit0, elnModule);
+					ELNTComponentIndependentCurrentSource elnISource = new ELNTComponentIndependentCurrentSource(name, initValue, offset, amplitude, frequency, phase, acAmplitude, acPhase, acNoiseAmpliture, delay, unit0, cp, elnModule);
 
 					elnMap.put(isource, elnISource);
 					elnModule.addComponentIndependentCurrentSource(elnISource);
@@ -188,8 +193,9 @@ public class ELNPanelTranslator {
 					double acNoiseAmpliture = vsource.getAcNoiseAmplitude();
 					String delay = vsource.getDelay();
 					String unit0 = vsource.getUnit0();
+					ELNConnectingPoint[] cp = (ELNConnectingPoint) vsource.connectingPoint;
 
-					ELNTComponentIndependentVoltageSource elnVSource = new ELNTComponentIndependentVoltageSource(name, initValue, offset, amplitude, frequency, phase, acAmplitude, acPhase, acNoiseAmpliture, delay, unit0, elnModule);
+					ELNTComponentIndependentVoltageSource elnVSource = new ELNTComponentIndependentVoltageSource(name, initValue, offset, amplitude, frequency, phase, acAmplitude, acPhase, acNoiseAmpliture, delay, unit0, cp, elnModule);
 
 					elnMap.put(vsource, elnVSource);
 					elnModule.addComponentIndependentVoltageSource(elnVSource);
@@ -204,8 +210,9 @@ public class ELNPanelTranslator {
 					double phi0 = inductor.getPhi0();
 					String unit0 = inductor.getUnit0();
 					String unit1 = inductor.getUnit1();
+					ELNConnectingPoint[] cp = (ELNConnectingPoint) inductor.connectingPoint;
 
-					ELNTComponentInductor elnInductor = new ELNTComponentInductor(name, val, q0, unit0, unit1, elnModule);
+					ELNTComponentInductor elnInductor = new ELNTComponentInductor(name, val, q0, unit0, unit1, cp, elnModule);
 
 					elnMap.put(inductor, elnInductor);
 					elnModule.addComponentInductor(elnInductor);
@@ -230,8 +237,9 @@ public class ELNPanelTranslator {
 					String name = resistor.getValue();
 					double val = resistor.getVal();
 					String unit = resistor.getUnit();
+					ELNConnectingPoint[] cp = (ELNConnectingPoint) resistor.connectingPoint;
 
-					ELNTComponentResistor elnResistor = new ELNTComponentResistor(name, val, unit, elnModule);
+					ELNTComponentResistor elnResistor = new ELNTComponentResistor(name, val, unit, cp, elnModule);
 
 					elnMap.put(resistor, elnResistor);
 					elnModule.addComponentResistor(elnResistor);
@@ -247,8 +255,9 @@ public class ELNPanelTranslator {
 					String delay = transmissionLine.getDelay();
 					String unit0 = transmissionLine.getUnit0();
 					String unit2 = transmissionLine.getUnit2();
+					ELNConnectingPoint[] cp = (ELNConnectingPoint) transmissionLine.connectingPoint;
 
-					ELNTComponentTransmissionLine elnTransmissionLine = new ELNTComponentTransmissionLine(name, z0, delta0, delay, unit0, unit2, elnModule);
+					ELNTComponentTransmissionLine elnTransmissionLine = new ELNTComponentTransmissionLine(name, z0, delta0, delay, unit0, unit2, cp, elnModule);
 
 					elnMap.put(transmissionLine, elnTransmissionLine);
 					elnModule.addComponentTransmissionLine(elnTransmissionLine);
@@ -261,8 +270,9 @@ public class ELNPanelTranslator {
 					String name = vccs.getValue();
 					double val = vccs.getVal();
 					String unit = vccs.getUnit();
+					ELNConnectingPoint[] cp = (ELNConnectingPoint) vccs.connectingPoint;
 
-					ELNTComponentVoltageControlledCurrentSource elnVCCS = new ELNTComponentVoltageControlledCurrentSource(name, val, unit, elnModule);
+					ELNTComponentVoltageControlledCurrentSource elnVCCS = new ELNTComponentVoltageControlledCurrentSource(name, val, unit, cp, elnModule);
 
 					elnMap.put(vccs, elnVCCS);
 					elnModule.addComponentVoltageControlledCurrentSource(elnVCCS);
@@ -274,8 +284,9 @@ public class ELNPanelTranslator {
 
 					String name = vcvs.getValue();
 					double val = vcvs.getVal();
-
-					ELNTComponentVoltageControlledVoltageSource elnVCVS = new ELNTComponentVoltageControlledVoltageSource(name, val, elnModule);
+					ELNConnectingPoint[] cp = (ELNConnectingPoint) vcvs.connectingPoint;
+					
+					ELNTComponentVoltageControlledVoltageSource elnVCVS = new ELNTComponentVoltageControlledVoltageSource(name, val, cp, elnModule);
 
 					elnMap.put(vcvs, elnVCVS);
 					elnModule.addComponentVoltageControlledVoltageSource(elnVCVS);
@@ -287,8 +298,9 @@ public class ELNPanelTranslator {
 
 					String name = TDF_vsink.getValue();
 					double scale = TDF_vsink.getScale();
+					ELNConnectingPoint[] cp = (ELNConnectingPoint) TDF_vsink.connectingPoint;
 
-					ELNTComponentVoltageSinkTDF elnTDF_vsink = new ELNTComponentVoltageSinkTDF(name, scale, elnModule);
+					ELNTComponentVoltageSinkTDF elnTDF_vsink = new ELNTComponentVoltageSinkTDF(name, scale, cp, elnModule);
 
 					elnMap.put(TDF_vsink, elnTDF_vsink);
 					elnModule.addComponentVoltageSinkTDF(elnTDF_vsink);
@@ -300,8 +312,9 @@ public class ELNPanelTranslator {
 
 					String name = TDF_vsource.getValue();
 					double scale = TDF_vsource.getScale();
+					ELNConnectingPoint[] cp = (ELNConnectingPoint) TDF_vsource.connectingPoint;
 
-					ELNTComponentVoltageSourceTDF elnTDF_vsource = new ELNTComponentVoltageSourceTDF(name, scale, elnModule);
+					ELNTComponentVoltageSourceTDF elnTDF_vsource = new ELNTComponentVoltageSourceTDF(name, scale, cp, elnModule);
 
 					elnMap.put(TDF_vsource, elnTDF_vsource);
 					elnModule.addComponentVoltageSourceTDF(elnTDF_vsource);
-- 
GitLab