diff options
author | Suchita Lad | 2024-11-25 17:52:20 +0530 |
---|---|---|
committer | Suchita Lad | 2024-11-25 17:52:20 +0530 |
commit | e6ba215bd89df91bc3f93a54246f3c1e83a5ab4b (patch) | |
tree | 87482ae32fb7193541b2c6567896e21afa20d392 | |
parent | be6379f5328eb0d397c2660ef5c3619775b7a1cd (diff) | |
download | Common-Interface-Project-e6ba215bd89df91bc3f93a54246f3c1e83a5ab4b.tar.gz Common-Interface-Project-e6ba215bd89df91bc3f93a54246f3c1e83a5ab4b.tar.bz2 Common-Interface-Project-e6ba215bd89df91bc3f93a54246f3c1e83a5ab4b.zip |
Updated mxgraphparser code for primary two link
-rwxr-xr-x | blocks/Xcos/MxGraphParser.py | 13 | ||||
-rw-r--r-- | blocks/eda-frontend/public/splitblock.xsl | 25 |
2 files changed, 34 insertions, 4 deletions
diff --git a/blocks/Xcos/MxGraphParser.py b/blocks/Xcos/MxGraphParser.py index 0c3ba554..6a4b9572 100755 --- a/blocks/Xcos/MxGraphParser.py +++ b/blocks/Xcos/MxGraphParser.py @@ -422,7 +422,7 @@ for (attribid, sourceVertex, targetVertex, sourceType, targetType, style, waypoi for attribid2 in sourceVertex, targetVertex: try: linkSegments = newEdgeDict[attribid2] - print('linkSegments:', linkSegments) + print('linkSegments:', attribid2, attribid2 == sourceVertex, linkSegments) except KeyError: continue @@ -449,7 +449,9 @@ for (attribid, sourceVertex, targetVertex, sourceType, targetType, style, waypoi else: split_style = 'SPLIT_f;flip=false;mirror=false' func_name = 'SPLIT_f' + print('BEFORE Splitblock:', outroot, nextattribid, componentOrdering, geometry, parentattribid, split_style, func_name) SplitBlock(outroot, nextattribid, componentOrdering, geometry, parent=parentattribid, style=split_style, func_name=func_name) + print('AFTER Splitblock:', outroot, nextattribid, componentOrdering, geometry, parentattribid, split_style, func_name) splitblockid = nextattribid nextattribid += 1 @@ -460,17 +462,20 @@ for (attribid, sourceVertex, targetVertex, sourceType, targetType, style, waypoi print('nextAttribForSplit1:', nextAttribForSplit) port2 = nextattribid (inputCount, outputCount, nextattribid, nextAttribForSplit) = addPort2ForSplit(outroot, splitblockid, sourceVertex2, targetVertex2, sourceType, targetType, sourceType2, targetType2, inputCount, outputCount, nextattribid, nextAttribForSplit, right_array) - print('nextAttribForSplit2:', nextAttribForSplit) + print('nextAttribForSplit2:', nextAttribForSplit, sourceVertex, targetVertex) port3 = nextattribid (inputCount, outputCount, nextattribid, nextAttribForSplit) = addPort3ForSplit(outroot, splitblockid, sourceVertex, targetVertex, sourceType, targetType, sourceType2, targetType2, inputCount, outputCount, nextattribid, nextAttribForSplit, array3) - print('nextAttribForSplit3:', nextAttribForSplit) + print('nextAttribForSplit3:', nextAttribForSplit, sourceVertex2, targetVertex2) newEdgeDict[attribid2][i] = ((nextAttribForSplit, sourceVertex2, port1, sourceType2, targetType, style2, left_array, addSplit2, split_point, split_point2)) nextAttribForSplit += 1 newEdgeDict[attribid2].insert(i + 1, (nextAttribForSplit, port2, targetVertex2, sourceType, targetType2, style2, right_array, addSplit2, split_point, split_point2)) nextAttribForSplit += 1 for (__, __, __, __, __, __, tmp_array, __, tmp_split_point, tmp_split_point2) in newEdgeDict[attribid2]: print('NEWEDGE2:', attribid2, tmp_array, tmp_split_point, tmp_split_point2) - newEdgeDict[attribid] = [(nextAttribForSplit, port3, targetVertex, sourceType, targetType, style, waypoints, addSplit, split_point, split_point2)] + if attribid2 == sourceVertex: + newEdgeDict[attribid] = [(nextAttribForSplit, port3, targetVertex, sourceType, targetType, style, waypoints, addSplit, split_point, split_point2)] + else: + newEdgeDict[attribid] = [(nextAttribForSplit, port3, sourceVertex, sourceType, targetType, style, waypoints, addSplit, split_point, split_point2)] nextAttribForSplit += 1 for (__, __, __, __, __, __, tmp_array, __, tmp_split_point, tmp_split_point2) in newEdgeDict[attribid]: print('NEWEDGE3:', attribid, tmp_array, tmp_split_point, tmp_split_point2) diff --git a/blocks/eda-frontend/public/splitblock.xsl b/blocks/eda-frontend/public/splitblock.xsl index 2e6907af..c510ffce 100644 --- a/blocks/eda-frontend/public/splitblock.xsl +++ b/blocks/eda-frontend/public/splitblock.xsl @@ -227,6 +227,31 @@ </mxGeometry> </xsl:element> </xsl:if> + + + <xsl:element name="DEBUG"> + <xsl:attribute name="tgtonelink"> + <xsl:value-of select="$tgtonelink/@id" /> + </xsl:attribute> + <xsl:attribute name="srconelink"> + <xsl:value-of select="$srconelink/@id" /> + </xsl:attribute> + <xsl:attribute name="srctwolink"> + <xsl:value-of select="$srctwolink/@id" /> + </xsl:attribute> + <xsl:attribute name="newidone"> + <xsl:value-of select="$newidone" /> + </xsl:attribute> + <xsl:attribute name="newidtwo"> + <xsl:value-of select="$newidtwo" /> + </xsl:attribute> + <xsl:attribute name="newidthree"> + <xsl:value-of select="$newidthree" /> + </xsl:attribute> + <xsl:attribute name="newidfour"> + <xsl:value-of select="$newidfour" /> + </xsl:attribute> + </xsl:element> <!-- }}} --> <!-- change source or target of secondary link: foreach loop, link copy, source change {{{ --> |