Clean up and some checks
This commit is contained in:
parent
e0ae9be20b
commit
2680a12b1b
12
examples/ex15.gv
generated
12
examples/ex15.gv
generated
@ -5,10 +5,10 @@ graph {
|
|||||||
node [fillcolor="#FFFFFF" fontname=arial height=0 margin=0 shape=none style=filled width=0]
|
node [fillcolor="#FFFFFF" fontname=arial height=0 margin=0 shape=none style=filled width=0]
|
||||||
edge [fontname=arial style=bold]
|
edge [fontname=arial style=bold]
|
||||||
edge [color="#FF66CC" headclip=false style="solid,bold" tailclip=false]
|
edge [color="#FF66CC" headclip=false style="solid,bold" tailclip=false]
|
||||||
X1:p1j:c -- X1:p5j:c [addPTS=.18 colorPTS="#FF66CC" straight=straight]
|
X1:p1j:c -- X1:p5j:c [addPTS=.18 straight=straight]
|
||||||
X1:p5j:c -- X1:p7j:c [addPTS=.18 colorPTS="#FF66CC" straight=straight]
|
X1:p5j:c -- X1:p7j:c [addPTS=.18 straight=straight]
|
||||||
edge [color="#FF0000" headclip=false style="solid,bold" tailclip=false]
|
edge [color="#FF0000" headclip=false style="solid,bold" tailclip=false]
|
||||||
X1:p2j:c -- X1:p6j:c [addPTS=.18 colorPTS="#FF0000" straight=straight]
|
X1:p2j:c -- X1:p6j:c [addPTS=.18 straight=straight]
|
||||||
edge [headclip=true style=bold tailclip=true]
|
edge [headclip=true style=bold tailclip=true]
|
||||||
X1 [label=<
|
X1 [label=<
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
@ -94,10 +94,10 @@ graph {
|
|||||||
</table>
|
</table>
|
||||||
> fillcolor="#FFFFFF" shape=box style=filled]
|
> fillcolor="#FFFFFF" shape=box style=filled]
|
||||||
edge [color="#000000" headclip=false style="solid,bold" tailclip=false]
|
edge [color="#000000" headclip=false style="solid,bold" tailclip=false]
|
||||||
X2:p1j:c -- X2:p5j:c [addPTS=.18 colorPTS="#000000" straight=straight]
|
X2:p1j:c -- X2:p5j:c [addPTS=.18 straight=straight]
|
||||||
X2:p5j:c -- X2:p7j:c [addPTS=.18 colorPTS="#000000" straight=straight]
|
X2:p5j:c -- X2:p7j:c [addPTS=.18 straight=straight]
|
||||||
edge [color="#000000" headclip=false style="solid,bold" tailclip=false]
|
edge [color="#000000" headclip=false style="solid,bold" tailclip=false]
|
||||||
X2:p2j:c -- X2:p6j:c [addPTS=.18 colorPTS="#000000" straight=straight]
|
X2:p2j:c -- X2:p6j:c [addPTS=.18 straight=straight]
|
||||||
edge [headclip=true style=bold tailclip=true]
|
edge [headclip=true style=bold tailclip=true]
|
||||||
X2 [label=<
|
X2 [label=<
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
|
|||||||
60
examples/ex15.html
generated
60
examples/ex15.html
generated
@ -323,66 +323,6 @@
|
|||||||
<title>X2:c--X2:c</title>
|
<title>X2:c--X2:c</title>
|
||||||
<path fill="none" stroke="#000000" stroke-width="2" d="M933.09,-207.75C933.09,-175.75 933.09,-143.75 933.09,-111.75"/>
|
<path fill="none" stroke="#000000" stroke-width="2" d="M933.09,-207.75C933.09,-175.75 933.09,-143.75 933.09,-111.75"/>
|
||||||
</g>
|
</g>
|
||||||
<!-- __CIRCLE__1 -->
|
|
||||||
<g id="node4" class="node">
|
|
||||||
<title>__CIRCLE__1</title>
|
|
||||||
<ellipse fill="#ff66cc" stroke="#ff66cc" cx="86.31" cy="-229.5" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__2 -->
|
|
||||||
<g id="node5" class="node">
|
|
||||||
<title>__CIRCLE__2</title>
|
|
||||||
<ellipse fill="#ff66cc" stroke="#ff66cc" cx="86.31" cy="-133.5" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__3 -->
|
|
||||||
<g id="node6" class="node">
|
|
||||||
<title>__CIRCLE__3</title>
|
|
||||||
<ellipse fill="#ff66cc" stroke="#ff66cc" cx="86.31" cy="-133.5" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__4 -->
|
|
||||||
<g id="node7" class="node">
|
|
||||||
<title>__CIRCLE__4</title>
|
|
||||||
<ellipse fill="#ff66cc" stroke="#ff66cc" cx="86.31" cy="-85.5" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__5 -->
|
|
||||||
<g id="node8" class="node">
|
|
||||||
<title>__CIRCLE__5</title>
|
|
||||||
<ellipse fill="#ff0000" stroke="#ff0000" cx="141.19" cy="-205.5" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__6 -->
|
|
||||||
<g id="node9" class="node">
|
|
||||||
<title>__CIRCLE__6</title>
|
|
||||||
<ellipse fill="#ff0000" stroke="#ff0000" cx="141.19" cy="-109.5" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__7 -->
|
|
||||||
<g id="node10" class="node">
|
|
||||||
<title>__CIRCLE__7</title>
|
|
||||||
<ellipse fill="#000000" stroke="#000000" cx="882.28" cy="-231.75" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__8 -->
|
|
||||||
<g id="node11" class="node">
|
|
||||||
<title>__CIRCLE__8</title>
|
|
||||||
<ellipse fill="#000000" stroke="#000000" cx="882.28" cy="-135.75" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__9 -->
|
|
||||||
<g id="node12" class="node">
|
|
||||||
<title>__CIRCLE__9</title>
|
|
||||||
<ellipse fill="#000000" stroke="#000000" cx="882.28" cy="-135.75" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__10 -->
|
|
||||||
<g id="node13" class="node">
|
|
||||||
<title>__CIRCLE__10</title>
|
|
||||||
<ellipse fill="#000000" stroke="#000000" cx="882.28" cy="-87.75" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__11 -->
|
|
||||||
<g id="node14" class="node">
|
|
||||||
<title>__CIRCLE__11</title>
|
|
||||||
<ellipse fill="#000000" stroke="#000000" cx="933.09" cy="-207.75" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__12 -->
|
|
||||||
<g id="node15" class="node">
|
|
||||||
<title>__CIRCLE__12</title>
|
|
||||||
<ellipse fill="#000000" stroke="#000000" cx="933.09" cy="-111.75" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
|
|||||||
BIN
examples/ex15.png
generated
BIN
examples/ex15.png
generated
Binary file not shown.
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 56 KiB |
60
examples/ex15.svg
generated
60
examples/ex15.svg
generated
@ -294,65 +294,5 @@
|
|||||||
<title>X2:c--X2:c</title>
|
<title>X2:c--X2:c</title>
|
||||||
<path fill="none" stroke="#000000" stroke-width="2" d="M933.09,-207.75C933.09,-175.75 933.09,-143.75 933.09,-111.75"/>
|
<path fill="none" stroke="#000000" stroke-width="2" d="M933.09,-207.75C933.09,-175.75 933.09,-143.75 933.09,-111.75"/>
|
||||||
</g>
|
</g>
|
||||||
<!-- __CIRCLE__1 -->
|
|
||||||
<g id="node4" class="node">
|
|
||||||
<title>__CIRCLE__1</title>
|
|
||||||
<ellipse fill="#ff66cc" stroke="#ff66cc" cx="86.31" cy="-229.5" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__2 -->
|
|
||||||
<g id="node5" class="node">
|
|
||||||
<title>__CIRCLE__2</title>
|
|
||||||
<ellipse fill="#ff66cc" stroke="#ff66cc" cx="86.31" cy="-133.5" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__3 -->
|
|
||||||
<g id="node6" class="node">
|
|
||||||
<title>__CIRCLE__3</title>
|
|
||||||
<ellipse fill="#ff66cc" stroke="#ff66cc" cx="86.31" cy="-133.5" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__4 -->
|
|
||||||
<g id="node7" class="node">
|
|
||||||
<title>__CIRCLE__4</title>
|
|
||||||
<ellipse fill="#ff66cc" stroke="#ff66cc" cx="86.31" cy="-85.5" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__5 -->
|
|
||||||
<g id="node8" class="node">
|
|
||||||
<title>__CIRCLE__5</title>
|
|
||||||
<ellipse fill="#ff0000" stroke="#ff0000" cx="141.19" cy="-205.5" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__6 -->
|
|
||||||
<g id="node9" class="node">
|
|
||||||
<title>__CIRCLE__6</title>
|
|
||||||
<ellipse fill="#ff0000" stroke="#ff0000" cx="141.19" cy="-109.5" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__7 -->
|
|
||||||
<g id="node10" class="node">
|
|
||||||
<title>__CIRCLE__7</title>
|
|
||||||
<ellipse fill="#000000" stroke="#000000" cx="882.28" cy="-231.75" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__8 -->
|
|
||||||
<g id="node11" class="node">
|
|
||||||
<title>__CIRCLE__8</title>
|
|
||||||
<ellipse fill="#000000" stroke="#000000" cx="882.28" cy="-135.75" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__9 -->
|
|
||||||
<g id="node12" class="node">
|
|
||||||
<title>__CIRCLE__9</title>
|
|
||||||
<ellipse fill="#000000" stroke="#000000" cx="882.28" cy="-135.75" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__10 -->
|
|
||||||
<g id="node13" class="node">
|
|
||||||
<title>__CIRCLE__10</title>
|
|
||||||
<ellipse fill="#000000" stroke="#000000" cx="882.28" cy="-87.75" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__11 -->
|
|
||||||
<g id="node14" class="node">
|
|
||||||
<title>__CIRCLE__11</title>
|
|
||||||
<ellipse fill="#000000" stroke="#000000" cx="933.09" cy="-207.75" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
<!-- __CIRCLE__12 -->
|
|
||||||
<g id="node15" class="node">
|
|
||||||
<title>__CIRCLE__12</title>
|
|
||||||
<ellipse fill="#000000" stroke="#000000" cx="933.09" cy="-111.75" rx="6.48" ry="6.48"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 24 KiB |
@ -282,23 +282,6 @@ class Harness:
|
|||||||
shColor = shortComp.color
|
shColor = shortComp.color
|
||||||
|
|
||||||
if pinindex+1 in shortPins:
|
if pinindex+1 in shortPins:
|
||||||
# path = os.getcwd().replace('\\', '/')
|
|
||||||
# blackCircle = Image(src=f"{path}/images/circle_5mm_96dpi.png") # , width = 5, height = 5, fixedsize = True circle_5mm_96dpi.png
|
|
||||||
|
|
||||||
# from cairosvg import svg2png
|
|
||||||
|
|
||||||
# svg_code = """
|
|
||||||
# <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
# <circle cx="12" cy="12" r="10"/>
|
|
||||||
# <line x1="12" y1="8" x2="12" y2="12"/>
|
|
||||||
# <line x1="12" y1="16" x2="12" y2="16"/>
|
|
||||||
# </svg>
|
|
||||||
# """
|
|
||||||
|
|
||||||
# svg2png(bytestring=svg_code,write_to= f'{path}/output.png')
|
|
||||||
|
|
||||||
# pinhtml.append(f' <td port="p{pinindex+1}J">{html_image(blackCircle).replace("<tdX>", "")}</td>')
|
|
||||||
|
|
||||||
pinhtml.append(f' <td width="21" port="p{pinindex+1}J"></td>')
|
pinhtml.append(f' <td width="21" port="p{pinindex+1}J"></td>')
|
||||||
|
|
||||||
# pinhtml.append(f' <td port="p{pinindex+1}J"><FONT FACE="Sans" POINT-SIZE="12.0" COLOR="{wv_colors.translate_color(shColor, "HEX")}">⬤</FONT></td>')
|
# pinhtml.append(f' <td port="p{pinindex+1}J"><FONT FACE="Sans" POINT-SIZE="12.0" COLOR="{wv_colors.translate_color(shColor, "HEX")}">⬤</FONT></td>')
|
||||||
@ -333,8 +316,8 @@ class Harness:
|
|||||||
f"{connector.name}:p{shortPins[i - 1]}j:c",
|
f"{connector.name}:p{shortPins[i - 1]}j:c",
|
||||||
f"{connector.name}:p{shortPins[i]}j:c",
|
f"{connector.name}:p{shortPins[i]}j:c",
|
||||||
straight="straight",
|
straight="straight",
|
||||||
addPTS=".18",
|
addPTS=".18", # Size of the point at the end of the straight line/edge, it also enables the drawing of it
|
||||||
colorPTS=str(wv_colors.translate_color(shColor, "HEX")),
|
colorPTS=str(wv_colors.translate_color(shColor, "HEX")), # the color of the point at the end of the line, it is requered that the circle is drawin
|
||||||
)
|
)
|
||||||
|
|
||||||
dot.attr("edge", headclip="true", tailclip="true", style="bold")
|
dot.attr("edge", headclip="true", tailclip="true", style="bold")
|
||||||
|
|||||||
37
src/wireviz/images/circle_5mm.svg
generated
37
src/wireviz/images/circle_5mm.svg
generated
@ -1,37 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
|
|
||||||
<svg
|
|
||||||
width="5mm"
|
|
||||||
height="5mm"
|
|
||||||
viewBox="0 0 5 5"
|
|
||||||
version="1.1"
|
|
||||||
id="svg1"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="namedview1"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#000000"
|
|
||||||
borderopacity="0.25"
|
|
||||||
inkscape:showpageshadow="2"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pagecheckerboard="0"
|
|
||||||
inkscape:deskcolor="#d1d1d1"
|
|
||||||
inkscape:document-units="mm" />
|
|
||||||
<defs
|
|
||||||
id="defs1" />
|
|
||||||
<g
|
|
||||||
inkscape:label="Ebene 1"
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer1">
|
|
||||||
<circle
|
|
||||||
style="fill:#000000;stroke-width:0.264583;stroke-dasharray:2.11667, 1.05833"
|
|
||||||
id="path1"
|
|
||||||
cx="2.5"
|
|
||||||
cy="2.5"
|
|
||||||
r="2.5" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 999 B |
BIN
src/wireviz/images/circle_5mm_96dpi.png
generated
BIN
src/wireviz/images/circle_5mm_96dpi.png
generated
Binary file not shown.
|
Before Width: | Height: | Size: 352 B |
@ -35,7 +35,7 @@ E[straight] {
|
|||||||
$.label=""; // remove pesky label
|
$.label=""; // remove pesky label
|
||||||
$.lp=""; // remove peskier label pos
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
if (hasAttr($, "addPTS") && $.addPTS!=""){
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
// now we place point nodes at the edge ends
|
// now we place point nodes at the edge ends
|
||||||
pt[1] = tok[0];
|
pt[1] = tok[0];
|
||||||
pt[2] = tok[cnt-1];
|
pt[2] = tok[cnt-1];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user