From febdc56eb686aaaef05157357525eaef4a7dcd93 Mon Sep 17 00:00:00 2001
From: Suchita Lad
Date: Thu, 26 Dec 2024 17:47:03 +0530
Subject: Updated xsl files for geometry point values
---
blocks/Xcos/XmlParser.py | 12 ++-
blocks/eda-frontend/public/geometry.xsl | 183 ++++++++++++++++++++++++--------
blocks/xcos2xml/head.xsl | 31 ++----
blocks/xcos2xml/links/ExplicitLink.xsl | 8 +-
4 files changed, 161 insertions(+), 73 deletions(-)
diff --git a/blocks/Xcos/XmlParser.py b/blocks/Xcos/XmlParser.py
index 709f6c15..c17c94b2 100755
--- a/blocks/Xcos/XmlParser.py
+++ b/blocks/Xcos/XmlParser.py
@@ -272,20 +272,24 @@ def check_point_on_array(array, point, left_right_direction=True):
return True, array[:i + 1] + [point], [point] + array[i + 1:]
# if left_right_direction:
- if -20 <= leftX - pointX <= 20:
+ if -20 <= leftX - pointX <= 20 and \
+ (leftY <= pointY <= rightY or leftY >= pointY >= rightY):
print('to the left / right')
return True, array[:i + 1] + [point], [point] + array[i + 1:]
# else:
- if -20 <= leftY - pointY <= 20:
+ if -20 <= leftY - pointY <= 20 and \
+ (leftX <= pointX <= rightX or leftX >= pointX >= rightX):
print('on the up / down')
return True, array[:i + 1] + [point], [point] + array[i + 1:]
# if left_right_direction:
- if -20 <= rightX - pointX <= 20:
+ if -20 <= rightX - pointX <= 20 and \
+ (leftY <= pointY <= rightY or leftY >= pointY >= rightY):
print('to the right / right')
return True, array[:i + 1] + [point], [point] + array[i + 1:]
# else:
- if -20 <= rightY - pointY <= 20:
+ if -20 <= rightY - pointY <= 20 and \
+ (leftX <= pointX <= rightX or leftX >= pointX >= rightX):
print('on the up / down')
return True, array[:i + 1] + [point], [point] + array[i + 1:]
diff --git a/blocks/eda-frontend/public/geometry.xsl b/blocks/eda-frontend/public/geometry.xsl
index 94757f79..967a35b9 100644
--- a/blocks/eda-frontend/public/geometry.xsl
+++ b/blocks/eda-frontend/public/geometry.xsl
@@ -19,11 +19,11 @@
-
+
@@ -66,20 +66,21 @@
+
-
-
+
-
+
@@ -125,14 +126,40 @@
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
@@ -146,11 +173,11 @@
-
+
@@ -198,15 +225,15 @@
-
-
+
-
+
@@ -252,15 +279,29 @@
-
-
+
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
@@ -270,11 +311,11 @@
-
+
@@ -320,15 +361,15 @@
-
-
+
-
+
@@ -374,18 +415,18 @@
-
-
+
-
+
@@ -433,15 +474,15 @@
-
-
+
-
+
@@ -487,23 +528,77 @@
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/blocks/xcos2xml/head.xsl b/blocks/xcos2xml/head.xsl
index f44e5322..9525b080 100644
--- a/blocks/xcos2xml/head.xsl
+++ b/blocks/xcos2xml/head.xsl
@@ -471,26 +471,18 @@
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
@@ -516,9 +508,6 @@
-
-
-
diff --git a/blocks/xcos2xml/links/ExplicitLink.xsl b/blocks/xcos2xml/links/ExplicitLink.xsl
index d20c05e4..3f712132 100644
--- a/blocks/xcos2xml/links/ExplicitLink.xsl
+++ b/blocks/xcos2xml/links/ExplicitLink.xsl
@@ -13,7 +13,7 @@
-
+
0
@@ -21,7 +21,7 @@
-
+
0
@@ -29,7 +29,7 @@
-
+
0
@@ -37,7 +37,7 @@
-
+
0
--
cgit