bill 2 місяців тому
батько
коміт
863277cf34

+ 0 - 7
public/icons/cad-chuang.svg

@@ -1,7 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg class="icon" width="64px" height="64.00px" viewBox="0 0 1024 1024" version="1.1"
-  xmlns="http://www.w3.org/2000/svg">
-  <path d="M192 416v32h640v-32h192v192H0v-192h192z m640 128H192v32h640v-32z m0-64H192v32h640v-32z"
-    fill="#000000" />
-</svg>

+ 0 - 8
public/icons/cad-loudao.svg

@@ -1,8 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg class="icon" width="64px" height="64.00px" viewBox="0 0 1024 1024" version="1.1"
-  xmlns="http://www.w3.org/2000/svg">
-  <path
-    fill="#000000"
-    d="M960 960H64V64h896v896z m-512-96H96v64h352v-64z m96-768h-64v832h64V96z m32 672v160h352v-160H576z m-128 0H96v64h352v-64z m0-96H96v64h352v-64z m0-96H96v64h352v-64z m0-96H96v64h352v-64z m0-96H96v64h352v-64z m0-96H96v64h352V288z m0-192H96v160h352V96z m128 640h352v-64H576v64z m0-96h352v-64H576v64z m0-96h352v-64H576v64z m0-96h352v-64H576v64z m0-96h352V288H576v64z m0-96h352V192H576v64z m0-96h352V96H576v64z" />
-</svg>

+ 0 - 8
public/icons/cad-luodichuang.svg

@@ -1,8 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg class="icon" width="64px" height="64.00px" viewBox="0 0 1024 1024" version="1.1"
-  xmlns="http://www.w3.org/2000/svg">
-  <path
-    fill="#000000"
-    d="M832 608v-64H192v32h32v32H0v-192h192v32h32v32H192v32h640v-96h192v192h-192z m-512-32v32H256v-32h64z m96 0v32h-64v-32h64z m96 0v32h-64v-32h64z m96 0v32h-64v-32h64z m96 0v32h-64v-32h64z m96 0v32h-64v-32h64z m-480-128v32H256v-32h64z m96 0v32h-64v-32h64z m96 0v32h-64v-32h64z m96 0v32h-64v-32h64z m96 0v32h-64v-32h64z m96 0v32h-64v-32h64z" />
-</svg>

+ 0 - 8
public/icons/cad-men.svg

@@ -1,8 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg class="icon" width="64px" height="64.00px" viewBox="0 0 1024 1024" version="1.1"
-  xmlns="http://www.w3.org/2000/svg">
-  <path
-    fill="#000000"
-    d="M800.32 192H864v416h160v192h-192v-128h-64V222.56c-162.496-5.216-287.104 26.336-374.176 94.08-92.8 72.192-160.064 170.048-201.824 293.984V800H0v-192h160a16 16 0 0 1 0.832-5.056c43.616-130.912 114.784-234.912 213.344-311.584C473.536 214.112 615.744 181.216 800.32 192zM832 224h-32v416h32V224z" />
-</svg>

+ 0 - 9
public/icons/cad-piaochuang.svg

@@ -1,9 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg class="icon" width="64px" height="64.00px" viewBox="0 0 1024 1024" version="1.1"
-  xmlns="http://www.w3.org/2000/svg">
-  <path
-
-    fill="#000000"
-    d="M896 256v320h96v192H32v-192h96V256h768zM224 736h576V352H224v384zM864 288H160v288h32v-256h640v256h32V288z" />
-</svg>

+ 0 - 8
public/icons/cad-shuangkaimen.svg

@@ -1,8 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg class="icon" width="64px" height="64.00px" viewBox="0 0 1024 1024" version="1.1"
-  xmlns="http://www.w3.org/2000/svg">
-  <path
-    fill="#000000"
-    d="M864 192v416h160v192h-192v-128h-64l0.032-448H768c-108.096 0-205.824 119.936-240.384 275.456-3.712 16.736-27.52 16.736-31.232 0C461.824 343.936 364.096 224 256 224v448H192v128H0v-192h159.968L160 192h96c109.12 0 204.16 98.208 252.288 233.28l3.712 10.752 0.416-1.28c45.952-136.8 139.616-238.176 248.16-242.592L768 192h96z m-32 32h-32v416h32V224zM224.032 224h-32v416h32V224z" />
-</svg>

+ 0 - 8
public/icons/cad-yakou.svg

@@ -1,8 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg class="icon" width="64px" height="64.00px" viewBox="0 0 1024 1024" version="1.1"
-  xmlns="http://www.w3.org/2000/svg">
-  <path
-    fill="#000000"
-    d="M896.096 352v64h128v192h-128v64h-768v-64h-128v-192h128v-64h768z m-32 32h-704v32h64v192h-64v32h704v-32h-64v-192h64v-32zM352 544v32H288v-32h64z m128 0v32h-64v-32h64z m128 0v32h-64v-32h64z m128 0v32h-64v-32h64z m-384-96v32H288v-32h64z m128 0v32h-64v-32h64z m128 0v32h-64v-32h64z m128 0v32h-64v-32h64z" />
-</svg>

+ 0 - 8
public/icons/cad-yandao.svg

@@ -1,8 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg class="icon" width="64px" height="64.00px" viewBox="0 0 1024 1024" version="1.1"
-  xmlns="http://www.w3.org/2000/svg">
-  <path
-    fill="#000000"
-    d="M960 64v896H64V64h896z m-32 32H96v832h832V96z m-32 32v768H128V128h768zM160 176.512V864h687.488L709.984 313.984 160 176.512zM864 160H226.08l510.304 127.616L864 798.016V160z" />
-</svg>

+ 0 - 8
public/icons/cad-yimen.svg

@@ -1,8 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg class="icon" width="64px" height="64.00px" viewBox="0 0 1024 1024" version="1.1"
-  xmlns="http://www.w3.org/2000/svg">
-  <path
-    fill="#000000"
-    d="M832 512v-96h192v192H416v-96H192v96H0v-192h608v96h224z m0 32H448v32h384v-32z m-256-96H192v32h384v-32z" />
-</svg>

+ 0 - 8
public/icons/cad-zhuzi.svg

@@ -1,8 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg class="icon" width="64px" height="64.00px" viewBox="0 0 1024 1024" version="1.1"
-  xmlns="http://www.w3.org/2000/svg">
-  <path
-    fill="#000000"
-    d="M960 64v896H64V64h896zM512 534.624L118.592 928h786.784L512 534.624zM928 118.592L534.624 512 928 905.376V118.592zM96 118.624v786.72L489.376 512 96 118.624zM905.344 96H118.624L512 489.376 905.344 96z" />
-</svg>

+ 6 - 2
public/icons/chuang.svg

@@ -1,3 +1,7 @@
-<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M6 14H26V13H32V19H0V13H6V14ZM6 17V18H26V17H6ZM6 16H26V15H6V16Z" fill="black"/>
+<svg width="33" height="32" viewBox="0 0 33 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M0.5 13.5H6.5V18.5H0.5L0.5 13.5Z" stroke="black"/>
+<path d="M26 13.5H32V18.5H26L26 13.5Z" stroke="black"/>
+<path d="M6.5 14.5L26 14.5" stroke="black"/>
+<path d="M6.63379 16.5L26.1338 16.5" stroke="black"/>
+<path d="M6.63379 18.5L26.1338 18.5" stroke="black"/>
 </svg>

+ 17 - 1
public/icons/loudao.svg

@@ -1,3 +1,19 @@
 <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M30 30H2V2H30V30ZM3 29H14V27H3V29ZM15 29H17V3H15V29ZM18 24V29H29V24H18ZM3 26H14V24H3V26ZM18 21V23H29V21H18ZM3 23H14V21H3V23ZM18 18V20H29V18H18ZM3 20H14V18H3V20ZM18 15V17H29V15H18ZM3 17H14V15H3V17ZM18 12V14H29V12H18ZM3 14H14V12H3V14ZM18 9V11H29V9H18ZM3 11H14V9H3V11ZM18 6V8H29V6H18ZM3 8H14V3H3V8ZM18 5H29V3H18V5Z" fill="black"/>
+<path d="M2.5 2.5L29.5 2.5V29.5H2.5V2.5Z" stroke="black"/>
+<path d="M14.5 2.5V29.5" stroke="black"/>
+<path d="M17.5 2.5V29.5" stroke="black"/>
+<path d="M17.6337 5.5H29.6337" stroke="black"/>
+<path d="M17.6337 8.5H29.6337" stroke="black"/>
+<path d="M17.6337 11.5H29.6337" stroke="black"/>
+<path d="M17.6337 14.5H29.6337" stroke="black"/>
+<path d="M17.6337 17.5H29.6337" stroke="black"/>
+<path d="M17.6337 20.5H29.6337" stroke="black"/>
+<path d="M17.6337 23.5H29.6337" stroke="black"/>
+<path d="M2.49994 8.5H14.4999" stroke="black"/>
+<path d="M2.49994 11.5H14.4999" stroke="black"/>
+<path d="M2.49994 14.5H14.4999" stroke="black"/>
+<path d="M2.49994 17.5H14.4999" stroke="black"/>
+<path d="M2.49994 20.5H14.4999" stroke="black"/>
+<path d="M2.49994 23.5H14.4999" stroke="black"/>
+<path d="M2.49994 26.5H14.4999" stroke="black"/>
 </svg>

+ 17 - 13
public/icons/luodichuang.svg

@@ -1,15 +1,19 @@
 <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M6 14H7V15H6V16H26V13H32V19H26V17H6V18H7V19H0V13H6V14Z" fill="black"/>
-<path d="M10 19H8V18H10V19Z" fill="black"/>
-<path d="M13 19H11V18H13V19Z" fill="black"/>
-<path d="M16 19H14V18H16V19Z" fill="black"/>
-<path d="M19 19H17V18H19V19Z" fill="black"/>
-<path d="M22 19H20V18H22V19Z" fill="black"/>
-<path d="M25 19H23V18H25V19Z" fill="black"/>
-<path d="M10 15H8V14H10V15Z" fill="black"/>
-<path d="M13 15H11V14H13V15Z" fill="black"/>
-<path d="M16 15H14V14H16V15Z" fill="black"/>
-<path d="M19 15H17V14H19V15Z" fill="black"/>
-<path d="M22 15H20V14H22V15Z" fill="black"/>
-<path d="M25 15H23V14H25V15Z" fill="black"/>
+<path d="M0.5 13.5H5.5V18.5H0.5L0.5 13.5Z" stroke="black"/>
+<path d="M26.5 13.5H31.5V18.5H26.5L26.5 13.5Z" stroke="black"/>
+<path d="M5.5 16.5H26.5" stroke="black"/>
+<path d="M5.5 18.5H7" stroke="black"/>
+<path d="M8 18.5H10" stroke="black"/>
+<path d="M11 18.5H13" stroke="black"/>
+<path d="M14 18.5H16" stroke="black"/>
+<path d="M17 18.5H19" stroke="black"/>
+<path d="M20 18.5H22" stroke="black"/>
+<path d="M23 18.5H25" stroke="black"/>
+<path d="M5.5 14.5H7" stroke="black"/>
+<path d="M8 14.5H10" stroke="black"/>
+<path d="M11 14.5H13" stroke="black"/>
+<path d="M14 14.5H16" stroke="black"/>
+<path d="M17 14.5H19" stroke="black"/>
+<path d="M20 14.5H22" stroke="black"/>
+<path d="M23 14.5H25" stroke="black"/>
 </svg>

+ 4 - 1
public/icons/men.svg

@@ -1,3 +1,6 @@
 <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M11.6934 9.10552C14.7979 6.69092 19.2421 5.66348 25.0107 6.00005H27V19H32V25H26V21H24V6.95513C18.9215 6.79206 15.0279 7.77807 12.3066 9.89458C9.40522 12.1513 7.3048 15.2111 6 19.085V25H0V19H5.00195C5.00196 18.9477 5.00791 18.8943 5.02539 18.8418C6.38912 14.7506 8.61318 11.5012 11.6934 9.10552ZM25 20H26V7.00005H25V20Z" fill="black"/>
+<path d="M5.5 19.5C5.5 19.5 7.78572 12 12.5 9C17.2143 5.99996 24.5 6.5 24.5 6.5" stroke="black"/>
+<path d="M0.5 19.5H5.5V24.5H0.5L0.5 19.5Z" stroke="black"/>
+<path d="M26.5 19.5H31.5V24.5H26.5L26.5 19.5Z" stroke="black"/>
+<path d="M24.5 6.5H26.5V20.5H24.5L24.5 6.5Z" stroke="black"/>
 </svg>

+ 6 - 0
public/icons/men_l.svg

@@ -0,0 +1,6 @@
+<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M26.5 19.5C26.5 19.5 24.2143 12 19.5 9C14.7857 5.99996 7.5 6.5 7.5 6.5" stroke="black"/>
+<path d="M31.5 19.5H26.5V24.5H31.5L31.5 19.5Z" stroke="black"/>
+<path d="M5.5 19.5H0.5V24.5H5.5L5.5 19.5Z" stroke="black"/>
+<path d="M7.5 6.5H5.5V20.5H7.5L7.5 6.5Z" stroke="black"/>
+</svg>

+ 5 - 1
public/icons/piaochuang.svg

@@ -1,3 +1,7 @@
 <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M28 18H31V24H1V18H4V8H28V18ZM7 23H25V11H7V23ZM5 18H6V10H26V18H27V9H5V18Z" fill="#000000"/>
+<path d="M4.5 18.5V8.5H27.5V18.5" stroke="black"/>
+<path d="M6.5 18.5V10.5H25.5V18.5" stroke="black"/>
+<path d="M1.5 18.5H6.5V23.5H1.5L1.5 18.5Z" stroke="black"/>
+<path d="M25.5 18.5H30.5V23.5H25.5L25.5 18.5Z" stroke="black"/>
+<path d="M6.5 23.5H25.5" stroke="black"/>
 </svg>

+ 5 - 1
public/icons/shuangkaimen.svg

@@ -1,3 +1,7 @@
 <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M27 6V19H32V25H26V21H24V7C20.6219 7 17.5683 10.7476 16.4881 15.6085C16.3721 16.1305 15.6279 16.1305 15.5119 15.6085C14.4317 10.7476 11.3781 7 8 7V21H6V25H0V19H5V6H8C11.4106 6 14.3809 9.06895 15.8843 13.2894L16 13.626L16.0132 13.5857C17.4486 9.31052 20.3762 6.14339 23.768 6.00474L24 6H27ZM26 20V7H25V20H26ZM7.001 7H6.001V20H7.001V7Z" fill="black"/>
+<path d="M0.5 19.5H5.5V24.5H0.5L0.5 19.5Z" stroke="black"/>
+<path d="M26.5 19.5H31.5V24.5H26.5L26.5 19.5Z" stroke="black"/>
+<path d="M24.5 6.5H26.5V20.5H24.5L24.5 6.5Z" stroke="black"/>
+<path d="M5.5 6.5H7.5V20.5H5.5L5.5 6.5Z" stroke="black"/>
+<path d="M7.5 6.50176C7.5 6.50176 10.6667 6.50176 13.5 9.50176C16.3333 12.5018 16 15.5018 16 15.5018C16 15.5018 15.5 12.6782 18.5 9.50176C21.5 6.3253 24.5 6.50176 24.5 6.50176" stroke="black"/>
 </svg>

+ 12 - 9
public/icons/yakou.svg

@@ -1,11 +1,14 @@
 <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M10.9971 18H8.99707V17H10.9971V18Z" fill="black"/>
-<path d="M14.9971 18H12.9971V17H14.9971V18Z" fill="black"/>
-<path d="M18.9971 18H16.9971V17H18.9971V18Z" fill="black"/>
-<path d="M22.9971 18H20.9971V17H22.9971V18Z" fill="black"/>
-<path d="M10.9971 15H8.99707V14H10.9971V15Z" fill="black"/>
-<path d="M14.9971 15H12.9971V14H14.9971V15Z" fill="black"/>
-<path d="M18.9971 15H16.9971V14H18.9971V15Z" fill="black"/>
-<path d="M22.9971 15H20.9971V14H22.9971V15Z" fill="black"/>
-<path d="M28 13H32V19H28V21H4V19H0V13H4V11H28V13ZM5 13H7V19H5V20H27V19H25V13H27V12H5V13Z" fill="black"/>
+<path d="M0.5 13.5H6.5V18.5H0.5L0.5 13.5Z" stroke="black"/>
+<path d="M25.5 13.5L31.5 13.5V18.5L25.5 18.5L25.5 13.5Z" stroke="black"/>
+<path d="M27.5 13.5L27.4999 11.5L4.5 11.5002L4.50007 13.5002" stroke="black"/>
+<path d="M4.49982 18.5L4.49989 20.5L27.4998 20.4997L27.4998 18.4997" stroke="black"/>
+<path d="M9 14.5H11" stroke="black"/>
+<path d="M13 14.5H15" stroke="black"/>
+<path d="M17 14.5H19" stroke="black"/>
+<path d="M21 14.5H23" stroke="black"/>
+<path d="M9 17.5H11" stroke="black"/>
+<path d="M13 17.5H15" stroke="black"/>
+<path d="M17 17.5H19" stroke="black"/>
+<path d="M21 17.5H23" stroke="black"/>
 </svg>

+ 3 - 2
public/icons/yandao.svg

@@ -1,4 +1,5 @@
 <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M28 28H4V4H28V28ZM5 27H26.4844L22.1865 9.81152L5 5.51465V27ZM23.0127 8.9873L27 24.9365V5H7.0625L23.0127 8.9873Z" fill="black"/>
-<path d="M30 30H2V2H30V30ZM3 29H29V3H3V29Z" fill="black"/>
+<path d="M4.5 4.5L22.5 9.5L27.5 27.5" stroke="black"/>
+<path d="M2.5 2.5L29.5 2.5V29.5H2.5V2.5Z" stroke="black"/>
+<path d="M4.5 4.5H27.5L27.5 27.5H4.50001L4.5 4.5Z" stroke="black"/>
 </svg>

+ 4 - 1
public/icons/yimen.svg

@@ -1,3 +1,6 @@
 <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M32 19H13V16H6V19H0V13H19V16H26V13H32V19ZM14 18H26V17H14V18ZM6 15H18V14H6V15Z" fill="black"/>
+<path d="M0.5 13.5H5.5V18.5H0.5L0.5 13.5Z" stroke="black"/>
+<path d="M26.5 13.5H31.5V18.5H26.5L26.5 13.5Z" stroke="black"/>
+<path d="M13.4999 16.5H26.5L26.5001 18.5H13.5L13.4999 16.5Z" stroke="black"/>
+<path d="M5.5 13.5H18.5001L18.5002 15.5H5.50007L5.5 13.5Z" stroke="black"/>
 </svg>

+ 3 - 1
public/icons/zhuzi.svg

@@ -1,3 +1,5 @@
 <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M30 30H2V2H30V30ZM3.70703 29H28.293L16 16.707L3.70703 29ZM16.707 16L29 28.293V3.70703L16.707 16ZM3 28.293L15.293 16L3 3.70703V28.293ZM16 15.293L28.293 3H3.70703L16 15.293Z" fill="black"/>
+<path d="M2.5 2.5L29.5 29.5" stroke="black"/>
+<path d="M29.5 2.5L2.5 29.5" stroke="black"/>
+<path d="M2.5 2.5L29.5 2.5V29.5H2.5V2.5Z" stroke="black"/>
 </svg>

+ 46 - 17
src/example/constant.ts

@@ -5,26 +5,26 @@ export const iconGroups = [
       {
         name: "门",
         children: [
-          { wall: true, icon: "cad-men", name: "门" },
-          { wall: true, icon: "cad-shuangkaimen", name: "双开门" },
-          { wall: true, icon: "cad-yimen", name: "移门" },
-          { wall: true, icon: "cad-yakou", name: "哑口" },
+          { wall: true, icon: "men", name: "门" },
+          { wall: true, icon: "shuangkaimen", name: "双开门" },
+          { wall: true, icon: "yimen", name: "移门" },
+          { wall: true, icon: "yakou", name: "哑口" },
         ],
       },
       {
         name: "窗",
         children: [
-          { wall: true, icon: "cad-chuang", name: "窗" },
-          { wall: true, icon: "cad-piaochuang", name: "飘窗" },
-          { wall: true, icon: "cad-luodichuang", name: "落地窗" },
+          { wall: true, icon: "chuang", name: "窗" },
+          { wall: true, icon: "piaochuang", name: "飘窗" },
+          { wall: true, icon: "luodichuang", name: "落地窗" },
         ],
       },
       {
         name: "构件",
         children: [
-          { icon: "cad-zhuzi", name: "柱子" },
-          { icon: "cad-yandao", name: "烟道" },
-          { icon: "cad-loudao", name: "楼道" },
+          { icon: "zhuzi", name: "柱子" },
+          { icon: "yandao", name: "烟道" },
+          { icon: "loudao", name: "楼道" },
         ],
       },
     ],
@@ -112,13 +112,42 @@ export const iconGroups = [
     ],
   },
 ];
+
+export const getIconItem = (icon: string) => {
+  for (const group of iconGroups) {
+    for (const itemGroup of group.children) {
+      for (const item of itemGroup.children) {
+        if (item.icon === icon) {
+          return item;
+        }
+      }
+    }
+  }
+};
+
 export const aiIconMap = {
-  SingleDoor: "cad-men",
-  DoubleDoor: "cad-shuangkaimen",
-  SlideDoor: "cad-yimen",
-  Pass: "cad-yakou",
-  SingleWindow: "cad-chuang",
-  BayWindow: "cad-piaochuang",
-  FrenchWindow: "cad-luodichuang",
+  SingleDoor: "men",
+  DoubleDoor: "shuangkaimen",
+  SlideDoor: "yimen",
+  Pass: "yakou",
+  SingleWindow: "chuang",
+  BayWindow: "piaochuang",
+  FrenchWindow: "luodichuang",
   Chair: "Chair",
 };
+export const styleIconMap = {
+  "style-4": "zhiwen_o",
+  "style-5": "youzuji_o",
+  "style-6": "zuozuji_o",
+  "style-7": "xieyin_o",
+  "style-8": "xuepo_o",
+  "style-9": "xueji_o",
+  "style-10": "shitiz_o",
+  "style-11": "shitib_o",
+  "style-12": "shitifuhao_o",
+  "style-13": "buqiang_o",
+  "style-14": "shouqiang_o",
+  "style-15": "dantou_o",
+  "style-16": "danke_o",
+  "style-17": "helunhenji_o",
+};

+ 3 - 2
src/example/fuse/views/overview/slide-icons.vue

@@ -17,6 +17,7 @@
             @click="drawIcon(`./icons/${item.icon}.svg`, item.name, item)"
           >
             <Icon :name="item.icon" size="32px" :color="item.color" />
+            {{ item.icon }}
             <span>{{ item.name }}</span>
           </div>
         </div>
@@ -41,11 +42,11 @@ const drawIcon = async (url: string, name: string, item: any) => {
   props.draw.enterDrawShape(
     "icon",
     {
-      url,
-      name,
       ...defaultStyle,
       ...(item.parse || {}),
       ...parset,
+      url,
+      name,
     },
     true
   );

+ 43 - 38
src/example/platform/platform-resource.ts

@@ -1,7 +1,7 @@
 import { Pos, Size } from "@/utils/math";
 import { extractConnectedSegments } from "@/utils/polygon";
 import { validNum } from "@/utils/shared";
-import { aiIconMap, iconGroups } from "../constant";
+import { aiIconMap, getIconItem, iconGroups, styleIconMap } from "../constant";
 import { Euler, MathUtils, Object3D, Quaternion, Vector3 } from "three";
 import { getSvgContent, parseSvgContent } from "@/utils/resource";
 
@@ -249,15 +249,18 @@ export const taggingGets = {
 
       const reqs = signages.map((signage: any) => {
         if (!validNum(signage.pos[0]) || !validNum(signage.pos[2])) return;
+        const styleMap = (styleIconMap as any)[signage.icon];
         const getIcon =
           signage.icon.indexOf("style-") === 0
-            ? getSceneApi("./", `./styles/${signage.icon}.svg`).catch((e) => {
-                console.error(e);
-                return getSceneApi(
-                  "ossRoot",
-                  `/sdk/images/billboard/${signage.icon}.png`
-                );
-              })
+            ? styleMap
+              ? Promise.resolve(`./icons/${styleMap}.svg`)
+              : getSceneApi("./", `./styles/${signage.icon}.svg`).catch((e) => {
+                  console.error(e);
+                  return getSceneApi(
+                    "ossRoot",
+                    `/sdk/images/billboard/${signage.icon}.png`
+                  );
+                })
             : getSceneApi("oss", `${prev}/user/${signage.icon}`);
 
         const yRotate = getBillYaw(signage);
@@ -265,8 +268,11 @@ export const taggingGets = {
         console.log(signage);
         return getIcon
           .then((url) => {
+            const name = (styleMap && getIconItem(styleMap)?.name) || ''
+
             tags.push({
               url,
+              name,
               position: {
                 x: signage.pos[0],
                 y: signage.pos[2],
@@ -315,18 +321,11 @@ export const taggingGets = {
               shape.category in aiIconMap
                 ? (aiIconMap as any)[shape.category]
                 : shape.category;
-            let name = "";
-            let isWall = false;
-            for (const group of iconGroups) {
-              for (const itemGroup of group.children) {
-                for (const item of itemGroup.children) {
-                  if (item.icon === icon) {
-                    name = item.name;
-                    isWall = "wall" in item && item.wall;
-                  }
-                }
-              }
-            }
+            
+            
+            const itemIcon = getIconItem(icon)
+            const name = itemIcon?.name
+            const isWall = itemIcon && "wall" in itemIcon ? itemIcon.wall : false;
             const isTag = icon === "Tag";
             if (name || isTag) {
               const item = {
@@ -345,23 +344,29 @@ export const taggingGets = {
               if (isWall) {
                 const wh = Math.max(item.size.width, item.size.height);
                 loadPromises.push(
-                  getSvgContent(item.url).then((svgContent) => {
-                    const content = parseSvgContent(svgContent);
-                    item.fixed = true
-                    // item.size.width = item.size.height = wh
-                    
-                    if (wh === item.size.width) {
-                      item.size.width = wh
-                      item.size.height = data.imageWidth / data.imageHeight * (content.height / content.width * wh) 
-                      item.position.y -= item.size.height / 2;
-                    } else {
-                      item.size.width = wh
-                      item.size.height = data.imageWidth / data.imageHeight * (content.height / content.width * wh) 
-                      item.position.x += item.size.height / 2;
-                      item.rotate = Math.PI / 2;
-                    }
-                    tags.push(item as any);
-                  }).catch(() => {})
+                  getSvgContent(item.url)
+                    .then((svgContent) => {
+                      const content = parseSvgContent(svgContent);
+                      item.fixed = true;
+                      // item.size.width = item.size.height = wh
+
+                      if (wh === item.size.width) {
+                        item.size.width = wh;
+                        item.size.height =
+                          (data.imageWidth / data.imageHeight) *
+                          ((content.height / content.width) * wh);
+                        item.position.y -= item.size.height / 2;
+                      } else {
+                        item.size.width = wh;
+                        item.size.height =
+                          (data.imageWidth / data.imageHeight) *
+                          ((content.height / content.width) * wh);
+                        item.position.x += item.size.height / 2;
+                        item.rotate = Math.PI / 2;
+                      }
+                      tags.push(item as any);
+                    })
+                    .catch(() => {})
                 );
               } else {
                 tags.push(item as any);
@@ -371,7 +376,7 @@ export const taggingGets = {
             }
           }
         }
-        return Promise.all(loadPromises)
+        return Promise.all(loadPromises);
       })
       .catch((e) => {
         console.error(e);