From b8160ce5d3854edad734adbac19bde2ceeeb4df1 Mon Sep 17 00:00:00 2001 From: Suchita Lad Date: Fri, 2 Aug 2024 11:16:40 +0530 Subject: Updated files for split --- blocks/Xcos/MxGraphParser.py | 1 + blocks/Xcos/blocks/Capacitor.py | 6 +- blocks/Xcos/blocks/ConstantVoltage.py | 4 +- blocks/xcos2xml/links/ExplicitLink.xsl | 2 +- blocks/xcos2xml/ports/port.xsl | 8 +- blocks/xcos2xml/split.xsl | 434 ++++++++++++++++++++++++--------- 6 files changed, 327 insertions(+), 128 deletions(-) diff --git a/blocks/Xcos/MxGraphParser.py b/blocks/Xcos/MxGraphParser.py index 94f2aefe..c80f2c4d 100755 --- a/blocks/Xcos/MxGraphParser.py +++ b/blocks/Xcos/MxGraphParser.py @@ -326,6 +326,7 @@ for (attribid, sourceVertex, targetVertex, sourceType, targetType, geometry) in (style2, sourceVertex2, targetVertex2, sourceType2, targetType2) = edgeDict2[targetVertex] for (attribid, (style, sourceVertex, targetVertex, sourceType, targetType)) in edgeDict.items(): + print("testing",attribid,style, sourceVertex, targetVertex, sourceType, targetType) if int(attribid) >= 10000: attribid = nextattribid nextattribid += 1 diff --git a/blocks/Xcos/blocks/Capacitor.py b/blocks/Xcos/blocks/Capacitor.py index f90e2ec0..1aa94898 100644 --- a/blocks/Xcos/blocks/Capacitor.py +++ b/blocks/Xcos/blocks/Capacitor.py @@ -50,9 +50,9 @@ def Capacitor(outroot, attribid, ordering, geometry, parameters): # Add nested Array node inside innerArrayNode nestedArrayNode = addArrayNode(innerArrayNode, scilabClass="ScilabList") - addScilabDoubleNode(nestedArrayNode, width=1, realParts=["4.7E-6"]) - addScilabDoubleNode(nestedArrayNode, width=1, realParts=["2.0"]) - addScilabDoubleNode(innerArrayNode, width=2, realParts=["0.0", "1.0"]) + addScilabDoubleNode(nestedArrayNode, width=1, realParts=["0.01"]) + addScilabDoubleNode(nestedArrayNode, width=1, realParts=["0.0"]) + addScilabDoubleNode(innerArrayNode, realParts=["0.0", "1.0"], width=2) addgeometryNode(outnode, GEOMETRY, geometry['height'], geometry['width'], geometry['x'], geometry['y']) return outnode diff --git a/blocks/Xcos/blocks/ConstantVoltage.py b/blocks/Xcos/blocks/ConstantVoltage.py index e31032b2..4d08a720 100644 --- a/blocks/Xcos/blocks/ConstantVoltage.py +++ b/blocks/Xcos/blocks/ConstantVoltage.py @@ -45,8 +45,8 @@ def ConstantVoltage(outroot, attribid, ordering, geometry, parameters): innerArrayNode = addArrayNode(innerArrayNode, scilabClass="ScilabList") - innerNode = addDataNode(innerArrayNode, 'ScilabDouble', height=1, width=1) - addScilabDoubleNode(innerNode, width=1, realParts=format_real_number(parameters[0])) + + addScilabDoubleNode(innerArrayNode, width=1, realParts=["1"]) addgeometryNode(outnode, GEOMETRY, geometry['height'], geometry['width'], geometry['x'], geometry['y']) diff --git a/blocks/xcos2xml/links/ExplicitLink.xsl b/blocks/xcos2xml/links/ExplicitLink.xsl index d7c85dd2..90cfccf8 100644 --- a/blocks/xcos2xml/links/ExplicitLink.xsl +++ b/blocks/xcos2xml/links/ExplicitLink.xsl @@ -1,4 +1,4 @@ - + diff --git a/blocks/xcos2xml/ports/port.xsl b/blocks/xcos2xml/ports/port.xsl index f6a5422d..5513b6d6 100644 --- a/blocks/xcos2xml/ports/port.xsl +++ b/blocks/xcos2xml/ports/port.xsl @@ -79,9 +79,9 @@ 0 0 0 - + - + @@ -107,9 +107,9 @@ 0 0 0 - + - + diff --git a/blocks/xcos2xml/split.xsl b/blocks/xcos2xml/split.xsl index cefd4d58..2a77c45a 100644 --- a/blocks/xcos2xml/split.xsl +++ b/blocks/xcos2xml/split.xsl @@ -1,7 +1,15 @@ - - - - + + + + + + + + + + + + @@ -13,130 +21,320 @@ - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - 1 - - - - - - - .null - Unknown - 0 - 0 - - - - - - - - - - - - - - - + + + + + + + + 1 + + + + + + + + .null + Unknown + 0 + 0 + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - 1 - - - - - - - .null - Unknown - 0 - 0 - - - - - + + + + + + + + + + + 1 + + + + + + + .null + Unknown + 0 + 0 + + + + + + + + + + + + + + 1 + + + + + + + .null + Unknown + 0 + 0 + + + + + - - - - - - - - - 1 - - - - - - - .null - Unknown - 0 - 0 - - - - - - + + + + + + 1 + + + + + + + + .null + Unknown + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + .null + Unknown + 0 + 0 + + + + + + + + + + + + + + 1 + + + + + + + .null + Unknown + 0 + 0 + + + + + + + + + + + + + 1 + + + + + + + + .null + Unknown + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + .null + Unknown + 0 + 0 + + + + + + + + + + + + + + 1 + + + + + + + .null + Unknown + 0 + 0 + + + + + - + @@ -156,7 +354,7 @@ - + -- cgit