FIX: Aix and temp control
jira: none Change-Id: I7a9db8178a77727c85ad2b727771179fc5e8050a
3
resources/images/L.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="7.77482" cy="7.85898" r="7.70859" fill="#262E30"/>
|
||||
</svg>
|
After Width: | Height: | Size: 166 B |
3
resources/images/R.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="7.77482" cy="8.025" r="7.70859" fill="#262E30"/>
|
||||
</svg>
|
After Width: | Height: | Size: 164 B |
16
resources/images/left_extruder_active_empty.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<svg width="24" height="62" viewBox="0 0 24 62" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M23.319 7.74414H8.03388C4.87765 7.74414 2.31903 10.3028 2.31903 13.459V44.0802H23.319V7.74414Z" fill="#626262"/>
|
||||
<ellipse cx="6.3" cy="0.89351" rx="6.3" ry="0.89351" transform="matrix(-1 0 0 1 20.519 7.14844)" fill="#383938"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.50363 0H18.419V7.80938H18.4188C18.4132 8.06259 16.4196 8.26768 13.9611 8.26768C11.4992 8.26768 9.50342 8.06201 9.50342 7.80831C9.50342 7.8068 9.50349 7.80529 9.50363 7.80378V0Z" fill="#9C9C9C"/>
|
||||
<rect width="6.3" height="6.5524" rx="3.15" transform="matrix(-1 0 0 1 17.019 1.19141)" fill="#848484"/>
|
||||
<rect width="6.3" height="15.4875" transform="matrix(-1 0 0 1 11.419 44.0801)" fill="#404040"/>
|
||||
<path d="M12.294 12.6476C13.6551 11.9613 17.7657 10.5887 23.319 10.5887V42.0609H10.6607V42.9433H7.39403C7.53014 42.7472 7.7207 42.2373 7.39403 41.7667C7.06736 41.2961 4.80792 41.1785 3.71903 41.1785V39.4137V37.0606L4.12737 25.0012L7.39403 22.6481V14.4124L4.5357 11.177C4.39959 10.7848 4.2907 9.8828 4.94403 9.41219C5.59736 8.94158 6.84959 9.2161 7.39403 9.41219L12.294 12.6476Z" fill="#8B8B8B"/>
|
||||
<path d="M20.519 17.5711V13.1035L13.519 14.8905L17.2249 18.4646L20.519 17.5711Z" fill="#454545"/>
|
||||
<path d="M15.619 18.9056L11.839 16.084H11.419V21.445H12.259L15.619 18.9056Z" fill="#454545"/>
|
||||
<rect width="9.8" height="5.95673" transform="matrix(-1 0 0 1 20.519 43.4844)" fill="#8B8B8B"/>
|
||||
<rect width="12.6" height="7.74375" rx="2.28594" transform="matrix(-1 0 0 1 21.919 49.4395)" fill="#292929"/>
|
||||
<path d="M20.519 60.162V57.1836H11.419V60.162L13.0736 61.3533H18.8645L20.519 60.162Z" fill="#333333"/>
|
||||
<path d="M16.494 61.9492L17.019 61.3535H14.919L15.444 61.9492H16.494Z" fill="#CFCFCF"/>
|
||||
<rect width="6.3" height="16.6788" rx="2.28594" transform="matrix(-1 0 0 1 7.21902 44.0801)" fill="#515151"/>
|
||||
<ellipse cx="7" cy="7.03977" rx="7" ry="7.03977" transform="matrix(-1 0 0 1 21.2191 23.2324)" fill="#EEEEEE"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
16
resources/images/left_extruder_active_filled.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<svg width="24" height="62" viewBox="0 0 24 62" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M23.3303 7.74414H8.04517C4.88895 7.74414 2.33032 10.3028 2.33032 13.459V44.0802H23.3303V7.74414Z" fill="#626262"/>
|
||||
<ellipse cx="6.3" cy="0.89351" rx="6.3" ry="0.89351" transform="matrix(-1 0 0 1 20.5303 7.14844)" fill="#383938"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.51493 0H18.4303V7.80938H18.4301C18.4245 8.06259 16.4309 8.26768 13.9724 8.26768C11.5105 8.26768 9.51471 8.06201 9.51471 7.80831C9.51471 7.8068 9.51478 7.80529 9.51493 7.80378V0Z" fill="#9C9C9C"/>
|
||||
<rect width="6.3" height="6.5524" rx="3.15" transform="matrix(-1 0 0 1 17.0303 1.19141)" fill="#848484"/>
|
||||
<rect width="6.3" height="15.4875" transform="matrix(-1 0 0 1 11.4303 44.0801)" fill="#404040"/>
|
||||
<path d="M12.3053 12.6476C13.6664 11.9613 17.777 10.5887 23.3303 10.5887V42.0609H10.672V42.9433H7.40532C7.54143 42.7472 7.73199 42.2373 7.40532 41.7667C7.07866 41.2961 4.81921 41.1785 3.73032 41.1785V39.4137V37.0606L4.13866 25.0012L7.40532 22.6481V14.4124L4.54699 11.177C4.41088 10.7848 4.30199 9.8828 4.95532 9.41219C5.60866 8.94158 6.86088 9.2161 7.40532 9.41219L12.3053 12.6476Z" fill="#8B8B8B"/>
|
||||
<path d="M20.5303 17.5711V13.1035L13.5303 14.8905L17.2362 18.4646L20.5303 17.5711Z" fill="#454545"/>
|
||||
<path d="M15.6303 18.9056L11.8503 16.084H11.4303V21.445H12.2703L15.6303 18.9056Z" fill="#454545"/>
|
||||
<rect width="9.8" height="5.95673" transform="matrix(-1 0 0 1 20.5303 43.4844)" fill="#8B8B8B"/>
|
||||
<rect width="12.6" height="7.74375" rx="2.28594" transform="matrix(-1 0 0 1 21.9303 49.4395)" fill="#292929"/>
|
||||
<path d="M20.5303 60.162V57.1836H11.4303V60.162L13.0849 61.3533H18.8758L20.5303 60.162Z" fill="#333333"/>
|
||||
<path d="M16.5053 61.9492L17.0303 61.3535H14.9303L15.4553 61.9492H16.5053Z" fill="#CFCFCF"/>
|
||||
<rect width="6.3" height="16.6788" rx="2.28594" transform="matrix(-1 0 0 1 7.23032 44.0801)" fill="#515151"/>
|
||||
<ellipse cx="7" cy="7.03977" rx="7" ry="7.03977" transform="matrix(-1 0 0 1 21.2303 23.2324)" fill="#00AE42"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
18
resources/images/left_extruder_unactive_empty.svg
Normal file
@ -0,0 +1,18 @@
|
||||
<svg width="24" height="62" viewBox="0 0 24 62" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g opacity="0.4">
|
||||
<path d="M23.6355 7.74414H8.02221C4.86599 7.74414 2.30737 10.3028 2.30737 13.459V44.0802H23.6355V7.74414Z" fill="#626262"/>
|
||||
<ellipse cx="6.39844" cy="0.89351" rx="6.39844" ry="0.89351" transform="matrix(-1 0 0 1 20.7917 7.14844)" fill="#383938"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.60423 0H18.6589V7.80938H18.6587C18.653 8.06259 16.6283 8.26768 14.1314 8.26768C11.631 8.26768 9.60402 8.06201 9.60402 7.80831C9.60402 7.80683 9.60409 7.80535 9.60423 7.80387V0Z" fill="#9C9C9C"/>
|
||||
<rect width="6.39844" height="6.5524" rx="3.19922" transform="matrix(-1 0 0 1 17.2371 1.19141)" fill="#848484"/>
|
||||
<rect width="6.39844" height="15.4875" transform="matrix(-1 0 0 1 11.5496 44.0801)" fill="#404040"/>
|
||||
<path d="M12.4382 12.6476C13.8206 11.9613 17.9954 10.5887 23.6355 10.5887V42.0609H10.7794V42.9433H7.46167C7.59991 42.7472 7.79344 42.2373 7.46167 41.7667C7.1299 41.2961 4.83515 41.1785 3.72925 41.1785V39.4137V37.0606L4.14396 25.0012L7.46167 22.6481V14.4124L4.55868 11.177C4.42044 10.7848 4.30985 9.8828 4.97339 9.41219C5.63693 8.94158 6.90872 9.2161 7.46167 9.41219L12.4382 12.6476Z" fill="#8B8B8B"/>
|
||||
<path d="M20.7917 17.5711V13.1035L13.6824 14.8905L17.4462 18.4646L20.7917 17.5711Z" fill="#454545"/>
|
||||
<path d="M15.8152 18.9056L11.9761 16.084H11.5496V21.445H12.4027L15.8152 18.9056Z" fill="#454545"/>
|
||||
<rect width="9.95313" height="5.95673" transform="matrix(-1 0 0 1 20.7917 43.4844)" fill="#8B8B8B"/>
|
||||
<rect width="12.7969" height="7.74375" rx="2.28594" transform="matrix(-1 0 0 1 22.2136 49.4395)" fill="#292929"/>
|
||||
<path d="M20.7917 60.162V57.1836H11.5496V60.162L13.23 61.3533H19.1114L20.7917 60.162Z" fill="#333333"/>
|
||||
<path d="M16.7039 61.9492L17.2371 61.3535H15.1042L15.6375 61.9492H16.7039Z" fill="#CFCFCF"/>
|
||||
<rect width="6.39844" height="16.6788" rx="2.28594" transform="matrix(-1 0 0 1 7.28394 44.0801)" fill="#515151"/>
|
||||
<ellipse cx="7.10938" cy="7.03977" rx="7.10938" ry="7.03977" transform="matrix(-1 0 0 1 21.5027 23.2324)" fill="#CECECE"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
18
resources/images/left_extruder_unactive_filled.svg
Normal file
@ -0,0 +1,18 @@
|
||||
<svg width="24" height="62" viewBox="0 0 24 62" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g opacity="0.4">
|
||||
<path d="M23.6355 7.74414H8.02221C4.86599 7.74414 2.30737 10.3028 2.30737 13.459V44.0802H23.6355V7.74414Z" fill="#626262"/>
|
||||
<ellipse cx="6.39844" cy="0.89351" rx="6.39844" ry="0.89351" transform="matrix(-1 0 0 1 20.7917 7.14844)" fill="#383938"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.60423 0H18.6589V7.80938H18.6587C18.653 8.06259 16.6283 8.26768 14.1314 8.26768C11.631 8.26768 9.60402 8.06201 9.60402 7.80831C9.60402 7.80683 9.60409 7.80535 9.60423 7.80387V0Z" fill="#9C9C9C"/>
|
||||
<rect width="6.39844" height="6.5524" rx="3.19922" transform="matrix(-1 0 0 1 17.2371 1.19141)" fill="#848484"/>
|
||||
<rect width="6.39844" height="15.4875" transform="matrix(-1 0 0 1 11.5496 44.0801)" fill="#404040"/>
|
||||
<path d="M12.4382 12.6476C13.8206 11.9613 17.9954 10.5887 23.6355 10.5887V42.0609H10.7794V42.9433H7.46167C7.59991 42.7472 7.79344 42.2373 7.46167 41.7667C7.1299 41.2961 4.83515 41.1785 3.72925 41.1785V39.4137V37.0606L4.14396 25.0012L7.46167 22.6481V14.4124L4.55868 11.177C4.42044 10.7848 4.30985 9.8828 4.97339 9.41219C5.63693 8.94158 6.90872 9.2161 7.46167 9.41219L12.4382 12.6476Z" fill="#8B8B8B"/>
|
||||
<path d="M20.7917 17.5711V13.1035L13.6824 14.8905L17.4462 18.4646L20.7917 17.5711Z" fill="#454545"/>
|
||||
<path d="M15.8152 18.9056L11.9761 16.084H11.5496V21.445H12.4027L15.8152 18.9056Z" fill="#454545"/>
|
||||
<rect width="9.95313" height="5.95673" transform="matrix(-1 0 0 1 20.7917 43.4844)" fill="#8B8B8B"/>
|
||||
<rect width="12.7969" height="7.74375" rx="2.28594" transform="matrix(-1 0 0 1 22.2136 49.4395)" fill="#292929"/>
|
||||
<path d="M20.7917 60.162V57.1836H11.5496V60.162L13.23 61.3533H19.1114L20.7917 60.162Z" fill="#333333"/>
|
||||
<path d="M16.7039 61.9492L17.2371 61.3535H15.1042L15.6375 61.9492H16.7039Z" fill="#CFCFCF"/>
|
||||
<rect width="6.39844" height="16.6788" rx="2.28594" transform="matrix(-1 0 0 1 7.28394 44.0801)" fill="#515151"/>
|
||||
<ellipse cx="7.10938" cy="7.03977" rx="7.10938" ry="7.03977" transform="matrix(-1 0 0 1 21.5027 23.2324)" fill="#CECECE"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
19
resources/images/pipe_of_empty.svg
Normal file
@ -0,0 +1,19 @@
|
||||
<svg width="9" height="52" viewBox="0 0 9 52" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.6727 2.22441C7.6727 2.22436 7.6727 2.22431 7.6727 2.22426C7.6727 1.1339 6.16865 0.25 4.31332 0.25C2.45799 0.25 0.953949 1.1339 0.953949 2.22426C0.953949 2.22679 0.953957 2.22933 0.953973 2.23186V50.9227H7.67272V2.22441H7.6727Z" fill="url(#paint0_linear_17771_23150)" fill-opacity="0.2"/>
|
||||
<line x1="7.93365" y1="1.90944" x2="7.93365" y2="50.8449" stroke="url(#paint1_linear_17771_23150)" stroke-width="0.522015" stroke-linecap="round"/>
|
||||
<line x1="0.935385" y1="1.90944" x2="0.935387" y2="50.8449" stroke="url(#paint2_linear_17771_23150)" stroke-width="0.522015" stroke-linecap="round"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_17771_23150" x1="4.31333" y1="0.25" x2="4.31333" y2="50.9227" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A5F960" stop-opacity="0"/>
|
||||
<stop offset="1" stop-color="#EBFFD7"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_17771_23150" x1="7.67264" y1="49.2037" x2="7.67264" y2="1.64844" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#00AE42"/>
|
||||
<stop offset="1" stop-color="#A5F960" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_17771_23150" x1="0.674383" y1="49.2037" x2="0.674379" y2="1.64844" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#00AE42"/>
|
||||
<stop offset="1" stop-color="#A5F960" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
19
resources/images/pipe_of_filled.svg
Normal file
@ -0,0 +1,19 @@
|
||||
<svg width="8" height="52" viewBox="0 0 8 52" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.34897 2.22441C7.34897 2.22436 7.34897 2.22431 7.34897 2.22426C7.34897 1.1339 5.84492 0.25 3.98959 0.25C2.13426 0.25 0.630219 1.1339 0.630219 2.22426C0.630219 2.22679 0.630227 2.22933 0.630243 2.23186V50.9227H7.34899V2.22441H7.34897Z" fill="url(#paint0_linear_17771_23141)" fill-opacity="0.2"/>
|
||||
<line x1="7.60991" y1="1.90944" x2="7.60992" y2="50.8449" stroke="url(#paint1_linear_17771_23141)" stroke-width="0.522015" stroke-linecap="round"/>
|
||||
<line x1="0.611654" y1="1.90944" x2="0.611657" y2="50.8449" stroke="url(#paint2_linear_17771_23141)" stroke-width="0.522015" stroke-linecap="round"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_17771_23141" x1="3.9896" y1="0.25" x2="3.9896" y2="50.9227" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A5F960" stop-opacity="0"/>
|
||||
<stop offset="1" stop-color="#00AE42"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_17771_23141" x1="7.34891" y1="49.2037" x2="7.34891" y2="1.64844" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#00AE42"/>
|
||||
<stop offset="1" stop-color="#A5F960" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_17771_23141" x1="0.350652" y1="49.2037" x2="0.350649" y2="1.64844" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#00AE42"/>
|
||||
<stop offset="1" stop-color="#A5F960" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
22
resources/images/pipe_of_loading_selected.svg
Normal file
@ -0,0 +1,22 @@
|
||||
<svg width="9" height="52" viewBox="0 0 9 52" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.52713 2.22441C7.52713 2.22436 7.52713 2.22431 7.52713 2.22426C7.52713 1.1339 6.02308 0.25 4.16775 0.25C2.31242 0.25 0.80838 1.1339 0.80838 2.22426C0.80838 2.22679 0.808388 2.22933 0.808405 2.23186V50.9227H7.52715V2.22441H7.52713Z" fill="url(#paint0_linear_17771_23047)" fill-opacity="0.2"/>
|
||||
<line x1="7.78808" y1="1.90944" x2="7.78808" y2="50.8449" stroke="url(#paint1_linear_17771_23047)" stroke-width="0.522015" stroke-linecap="round"/>
|
||||
<line x1="0.789816" y1="1.90944" x2="0.789818" y2="50.8449" stroke="url(#paint2_linear_17771_23047)" stroke-width="0.522015" stroke-linecap="round"/>
|
||||
<path d="M2.3958 23.5781L3.893 25.0753C4.09686 25.2792 4.42738 25.2792 4.63124 25.0753L6.12844 23.5781" stroke="#00AE42" stroke-width="1.04403" stroke-linecap="round"/>
|
||||
<path d="M2.3958 35.2441L3.893 36.7413C4.09686 36.9452 4.42738 36.9452 4.63124 36.7413L6.12844 35.2441" stroke="#00AE42" stroke-width="1.04403" stroke-linecap="round"/>
|
||||
<path d="M2.3958 44.1094L3.94891 45.2742C4.13451 45.4134 4.38972 45.4134 4.57533 45.2742L6.12844 44.1094" stroke="#00AE42" stroke-width="1.04403" stroke-linecap="round"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_17771_23047" x1="4.16777" y1="0.25" x2="4.16777" y2="50.9227" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A5F960" stop-opacity="0"/>
|
||||
<stop offset="1" stop-color="#00AE42"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_17771_23047" x1="7.52707" y1="49.2037" x2="7.52707" y2="1.64844" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#00AE42"/>
|
||||
<stop offset="1" stop-color="#A5F960" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_17771_23047" x1="0.528814" y1="49.2037" x2="0.52881" y2="1.64844" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#00AE42"/>
|
||||
<stop offset="1" stop-color="#A5F960" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
22
resources/images/pipe_of_loading_unselected.svg
Normal file
@ -0,0 +1,22 @@
|
||||
<svg width="9" height="52" viewBox="0 0 9 52" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.6293 2.92363C7.6293 2.92358 7.6293 2.92353 7.6293 2.92347C7.6293 1.83312 6.12526 0.949219 4.26993 0.949219C2.4146 0.949219 0.910553 1.83312 0.910553 2.92347C0.910553 2.92601 0.910561 2.92855 0.910577 2.93108V51.622H7.62932V2.92363H7.6293Z" fill="url(#paint0_linear_17771_23056)" fill-opacity="0.2"/>
|
||||
<line x1="7.89025" y1="2.60866" x2="7.89025" y2="51.5441" stroke="url(#paint1_linear_17771_23056)" stroke-width="0.522015" stroke-linecap="round"/>
|
||||
<line x1="0.891989" y1="2.60866" x2="0.891991" y2="51.5441" stroke="url(#paint2_linear_17771_23056)" stroke-width="0.522015" stroke-linecap="round"/>
|
||||
<path d="M2.49797 24.2773L3.99517 25.7745C4.19903 25.9784 4.52955 25.9784 4.73341 25.7745L6.23061 24.2773" stroke="#D5D5D5" stroke-width="1.04403" stroke-linecap="round"/>
|
||||
<path d="M2.49797 35.9434L3.99517 37.4406C4.19903 37.6444 4.52955 37.6444 4.73341 37.4406L6.23061 35.9434" stroke="#D5D5D5" stroke-width="1.04403" stroke-linecap="round"/>
|
||||
<path d="M2.49797 44.8086L4.05108 45.9734C4.23669 46.1126 4.49189 46.1126 4.6775 45.9734L6.23061 44.8086" stroke="#D5D5D5" stroke-width="1.04403" stroke-linecap="round"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_17771_23056" x1="4.26994" y1="0.949219" x2="4.26994" y2="51.622" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#E1E1E1" stop-opacity="0"/>
|
||||
<stop offset="1" stop-color="#8A8A8A"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_17771_23056" x1="7.62925" y1="49.9029" x2="7.62924" y2="2.34766" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#B7B7B7"/>
|
||||
<stop offset="1" stop-color="#EDEDED" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_17771_23056" x1="0.630987" y1="49.9029" x2="0.630983" y2="2.34766" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#B7B7B7"/>
|
||||
<stop offset="1" stop-color="#EDEDED" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
22
resources/images/pipe_of_unloading_selected.svg
Normal file
@ -0,0 +1,22 @@
|
||||
<svg width="8" height="52" viewBox="0 0 8 52" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.42447 2.22441C7.42447 2.22436 7.42447 2.22431 7.42447 2.22426C7.42447 1.1339 5.92042 0.25 4.06509 0.25C2.20976 0.25 0.705719 1.1339 0.705719 2.22426C0.705719 2.22679 0.705727 2.22933 0.705743 2.23186V50.9227H7.42449V2.22441H7.42447Z" fill="url(#paint0_linear_17771_23132)" fill-opacity="0.2"/>
|
||||
<line x1="7.68542" y1="1.90944" x2="7.68542" y2="50.8449" stroke="url(#paint1_linear_17771_23132)" stroke-width="0.522015" stroke-linecap="round"/>
|
||||
<line x1="0.687155" y1="1.90944" x2="0.687157" y2="50.8449" stroke="url(#paint2_linear_17771_23132)" stroke-width="0.522015" stroke-linecap="round"/>
|
||||
<path d="M6.02577 25.4453L4.52857 23.9481C4.32471 23.7443 3.99419 23.7443 3.79033 23.9481L2.29313 25.4453" stroke="#00AE42" stroke-width="1.04403" stroke-linecap="round"/>
|
||||
<path d="M6.02577 37.1113L4.52857 35.6141C4.32471 35.4103 3.99419 35.4103 3.79033 35.6141L2.29313 37.1113" stroke="#00AE42" stroke-width="1.04403" stroke-linecap="round"/>
|
||||
<path d="M6.02577 45.5098L4.47266 44.3449C4.28706 44.2057 4.03185 44.2057 3.84624 44.3449L2.29313 45.5098" stroke="#00AE42" stroke-width="1.04403" stroke-linecap="round"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_17771_23132" x1="4.0651" y1="0.25" x2="4.0651" y2="50.9227" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A5F960" stop-opacity="0"/>
|
||||
<stop offset="1" stop-color="#00AE42"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_17771_23132" x1="7.42441" y1="49.2037" x2="7.42441" y2="1.64844" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#00AE42"/>
|
||||
<stop offset="1" stop-color="#A5F960" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_17771_23132" x1="0.426153" y1="49.2037" x2="0.426149" y2="1.64844" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#00AE42"/>
|
||||
<stop offset="1" stop-color="#A5F960" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
22
resources/images/pipe_of_unloading_unselected.svg
Normal file
@ -0,0 +1,22 @@
|
||||
<svg width="8" height="52" viewBox="0 0 8 52" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.14724 2.92363C7.14724 2.92358 7.14724 2.92353 7.14724 2.92347C7.14724 1.83312 5.6432 0.949219 3.78787 0.949219C1.93254 0.949219 0.428497 1.83312 0.428497 2.92347C0.428497 2.92601 0.428505 2.92855 0.428522 2.93108V51.622H7.14727V2.92363H7.14724Z" fill="url(#paint0_linear_17771_23156)" fill-opacity="0.2"/>
|
||||
<line x1="7.40819" y1="2.60866" x2="7.4082" y2="51.5441" stroke="url(#paint1_linear_17771_23156)" stroke-width="0.522015" stroke-linecap="round"/>
|
||||
<line x1="0.409933" y1="2.60866" x2="0.409935" y2="51.5441" stroke="url(#paint2_linear_17771_23156)" stroke-width="0.522015" stroke-linecap="round"/>
|
||||
<path d="M5.74855 26.1445L4.25135 24.6473C4.04749 24.4435 3.71697 24.4435 3.51311 24.6473L2.01591 26.1445" stroke="#D5D5D5" stroke-width="1.04403" stroke-linecap="round"/>
|
||||
<path d="M5.74855 37.8105L4.25135 36.3133C4.04749 36.1095 3.71697 36.1095 3.51311 36.3133L2.01591 37.8105" stroke="#D5D5D5" stroke-width="1.04403" stroke-linecap="round"/>
|
||||
<path d="M5.74855 46.209L4.19544 45.0442C4.00984 44.9049 3.75463 44.9049 3.56902 45.0442L2.01591 46.209" stroke="#D5D5D5" stroke-width="1.04403" stroke-linecap="round"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_17771_23156" x1="3.78788" y1="0.949219" x2="3.78788" y2="51.622" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#E1E1E1" stop-opacity="0"/>
|
||||
<stop offset="1" stop-color="#8A8A8A"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_17771_23156" x1="7.14719" y1="49.9029" x2="7.14719" y2="2.34766" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#B7B7B7"/>
|
||||
<stop offset="1" stop-color="#EDEDED" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_17771_23156" x1="0.148931" y1="49.9029" x2="0.148927" y2="2.34766" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#B7B7B7"/>
|
||||
<stop offset="1" stop-color="#EDEDED" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
16
resources/images/right_extruder_active_empty.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<svg width="23" height="63" viewBox="0 0 23 63" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0.0690308 8.54883H15.3542C18.5104 8.54883 21.069 11.1075 21.069 14.2637V44.8849H0.0690308V8.54883Z" fill="#626262"/>
|
||||
<ellipse cx="9.16905" cy="8.84663" rx="6.3" ry="0.89351" fill="#383938"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.8844 0.804688H4.96902V8.61406H4.96925C4.97484 8.86728 6.96848 9.07237 9.42694 9.07237C11.8889 9.07237 13.8846 8.8667 13.8846 8.61299C13.8846 8.61148 13.8846 8.60998 13.8844 8.60847V0.804688Z" fill="#9C9C9C"/>
|
||||
<rect x="6.36902" y="1.99609" width="6.3" height="6.5524" rx="3.15" fill="#848484"/>
|
||||
<rect x="11.9691" y="44.8848" width="6.3" height="15.4875" fill="#404040"/>
|
||||
<path d="M11.094 13.4523C9.73292 12.766 5.62236 11.3934 0.0690308 11.3934V42.8655H12.7274V43.7479H15.994C15.8579 43.5519 15.6674 43.042 15.994 42.5714C16.3207 42.1008 18.5801 41.9831 19.669 41.9831V40.2184V37.8653L19.2607 25.8059L15.994 23.4528V15.2171L18.8524 11.9817C18.9885 11.5895 19.0974 10.6875 18.444 10.2169C17.7907 9.74627 16.5385 10.0208 15.994 10.2169L11.094 13.4523Z" fill="#8B8B8B"/>
|
||||
<path d="M2.86905 18.3758V13.9082L9.86905 15.6952L6.16317 19.2693L2.86905 18.3758Z" fill="#454545"/>
|
||||
<path d="M7.76904 19.7103L11.549 16.8887H11.969V22.2497H11.129L7.76904 19.7103Z" fill="#454545"/>
|
||||
<rect x="2.86905" y="44.2891" width="9.8" height="5.95673" fill="#8B8B8B"/>
|
||||
<rect x="1.46902" y="50.2441" width="12.6" height="7.74375" rx="2.28594" fill="#292929"/>
|
||||
<path d="M2.86905 60.9666V57.9883H11.969V60.9666L10.3145 62.158H4.52359L2.86905 60.9666Z" fill="#333333"/>
|
||||
<path d="M6.89402 62.7539L6.36902 62.1582H8.46902L7.94402 62.7539H6.89402Z" fill="#CFCFCF"/>
|
||||
<rect x="16.169" y="44.8848" width="6.3" height="16.6788" rx="2.28594" fill="#515151"/>
|
||||
<ellipse cx="9.16901" cy="31.0769" rx="7" ry="7.03977" fill="#EEEEEE"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
16
resources/images/right_extruder_active_filled.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<svg width="24" height="62" viewBox="0 0 24 62" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0.63031 7.74023H15.9155C19.0717 7.74023 21.6303 10.2989 21.6303 13.4551V44.0763H0.63031V7.74023Z" fill="#626262"/>
|
||||
<ellipse cx="9.73033" cy="8.03804" rx="6.3" ry="0.89351" fill="#383938"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.4457 -0.00390625H5.5303V7.80547H5.53053C5.53612 8.05868 7.52975 8.26378 9.98822 8.26378C12.4501 8.26378 14.4459 8.05811 14.4459 7.8044C14.4459 7.80289 14.4458 7.80138 14.4457 7.79988V-0.00390625Z" fill="#9C9C9C"/>
|
||||
<rect x="6.9303" y="1.1875" width="6.3" height="6.5524" rx="3.15" fill="#848484"/>
|
||||
<rect x="12.5303" y="44.0762" width="6.3" height="15.4875" fill="#404040"/>
|
||||
<path d="M11.6553 12.6437C10.2942 11.9574 6.18364 10.5848 0.63031 10.5848V42.0569H13.2886V42.9393H16.5553C16.4192 42.7433 16.2286 42.2334 16.5553 41.7628C16.882 41.2922 19.1414 41.1746 20.2303 41.1746V39.4098V37.0567L19.822 24.9973L16.5553 22.6442V14.4085L19.4136 11.1731C19.5498 10.7809 19.6586 9.8789 19.0053 9.40829C18.352 8.93767 17.0998 9.2122 16.5553 9.40829L11.6553 12.6437Z" fill="#8B8B8B"/>
|
||||
<path d="M3.43033 17.5672V13.0996L10.4303 14.8866L6.72445 18.4607L3.43033 17.5672Z" fill="#454545"/>
|
||||
<path d="M8.33032 18.9017L12.1103 16.0801H12.5303V21.4411H11.6903L8.33032 18.9017Z" fill="#454545"/>
|
||||
<rect x="3.43033" y="43.4805" width="9.8" height="5.95673" fill="#8B8B8B"/>
|
||||
<rect x="2.0303" y="49.4355" width="12.6" height="7.74375" rx="2.28594" fill="#292929"/>
|
||||
<path d="M3.43033 60.1581V57.1797H12.5303V60.1581L10.8758 61.3494H5.08487L3.43033 60.1581Z" fill="#333333"/>
|
||||
<path d="M7.4553 61.9453L6.9303 61.3496H9.0303L8.5053 61.9453H7.4553Z" fill="#CFCFCF"/>
|
||||
<rect x="16.7303" y="44.0762" width="6.3" height="16.6788" rx="2.28594" fill="#515151"/>
|
||||
<ellipse cx="9.73032" cy="30.2683" rx="7" ry="7.03977" fill="#00AE42"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
18
resources/images/right_extruder_unactive_empty.svg
Normal file
@ -0,0 +1,18 @@
|
||||
<svg width="24" height="63" viewBox="0 0 24 63" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g opacity="0.4">
|
||||
<path d="M0.283936 7.82031H15.8972C19.0534 7.82031 21.6121 10.3789 21.6121 13.5352V44.1564H0.283936V7.82031Z" fill="#626262"/>
|
||||
<ellipse cx="9.52612" cy="8.11812" rx="6.39844" ry="0.89351" fill="#383938"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.3152 0.0761719H5.2605V7.88555H5.26072C5.2664 8.13876 7.29118 8.34385 9.78806 8.34385C12.2884 8.34385 14.3154 8.13818 14.3154 7.88448C14.3154 7.883 14.3153 7.88152 14.3152 7.88004V0.0761719Z" fill="#9C9C9C"/>
|
||||
<rect x="6.68237" y="1.26758" width="6.39844" height="6.5524" rx="3.19922" fill="#848484"/>
|
||||
<rect x="12.3699" y="44.1562" width="6.39844" height="15.4875" fill="#404040"/>
|
||||
<path d="M11.4812 12.7238C10.0988 12.0375 5.92404 10.6649 0.283936 10.6649V42.137H13.1401V43.0194H16.4578C16.3195 42.8233 16.126 42.3135 16.4578 41.8429C16.7895 41.3723 19.0843 41.2546 20.1902 41.2546V39.4898V37.1368L19.7755 25.0774L16.4578 22.7243V14.4886L19.3608 11.2532C19.499 10.861 19.6096 9.95898 18.946 9.48836C18.2825 9.01775 17.0107 9.29228 16.4578 9.48836L11.4812 12.7238Z" fill="#8B8B8B"/>
|
||||
<path d="M3.12769 17.6472V13.1797L10.2371 14.9667L6.47327 18.5407L3.12769 17.6472Z" fill="#454545"/>
|
||||
<path d="M8.10425 18.9818L11.9433 16.1602H12.3699V21.5212H11.5167L8.10425 18.9818Z" fill="#454545"/>
|
||||
<rect x="3.12769" y="43.5605" width="9.95313" height="5.95673" fill="#8B8B8B"/>
|
||||
<rect x="1.70581" y="49.5156" width="12.7969" height="7.74375" rx="2.28594" fill="#292929"/>
|
||||
<path d="M3.12769 60.2381V57.2598H12.3699V60.2381L10.6895 61.4295H4.80808L3.12769 60.2381Z" fill="#333333"/>
|
||||
<path d="M7.21558 62.0254L6.68237 61.4297H8.81519L8.28198 62.0254H7.21558Z" fill="#CFCFCF"/>
|
||||
<rect x="16.6355" y="44.1562" width="6.39844" height="16.6788" rx="2.28594" fill="#515151"/>
|
||||
<ellipse cx="9.52612" cy="30.3484" rx="7.10938" ry="7.03977" fill="#CECECE"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
18
resources/images/right_extruder_unactive_filled.svg
Normal file
@ -0,0 +1,18 @@
|
||||
<svg width="24" height="63" viewBox="0 0 24 63" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g opacity="0.4">
|
||||
<path d="M0.283936 7.82031H15.8972C19.0534 7.82031 21.6121 10.3789 21.6121 13.5352V44.1564H0.283936V7.82031Z" fill="#626262"/>
|
||||
<ellipse cx="9.52612" cy="8.11812" rx="6.39844" ry="0.89351" fill="#383938"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.3152 0.0761719H5.2605V7.88555H5.26072C5.2664 8.13876 7.29118 8.34385 9.78806 8.34385C12.2884 8.34385 14.3154 8.13818 14.3154 7.88448C14.3154 7.883 14.3153 7.88152 14.3152 7.88004V0.0761719Z" fill="#9C9C9C"/>
|
||||
<rect x="6.68237" y="1.26758" width="6.39844" height="6.5524" rx="3.19922" fill="#848484"/>
|
||||
<rect x="12.3699" y="44.1562" width="6.39844" height="15.4875" fill="#404040"/>
|
||||
<path d="M11.4812 12.7238C10.0988 12.0375 5.92404 10.6649 0.283936 10.6649V42.137H13.1401V43.0194H16.4578C16.3195 42.8233 16.126 42.3135 16.4578 41.8429C16.7895 41.3723 19.0843 41.2546 20.1902 41.2546V39.4898V37.1368L19.7755 25.0774L16.4578 22.7243V14.4886L19.3608 11.2532C19.499 10.861 19.6096 9.95898 18.946 9.48836C18.2825 9.01775 17.0107 9.29228 16.4578 9.48836L11.4812 12.7238Z" fill="#8B8B8B"/>
|
||||
<path d="M3.12769 17.6472V13.1797L10.2371 14.9667L6.47327 18.5407L3.12769 17.6472Z" fill="#454545"/>
|
||||
<path d="M8.10425 18.9818L11.9433 16.1602H12.3699V21.5212H11.5167L8.10425 18.9818Z" fill="#454545"/>
|
||||
<rect x="3.12769" y="43.5605" width="9.95313" height="5.95673" fill="#8B8B8B"/>
|
||||
<rect x="1.70581" y="49.5156" width="12.7969" height="7.74375" rx="2.28594" fill="#292929"/>
|
||||
<path d="M3.12769 60.2381V57.2598H12.3699V60.2381L10.6895 61.4295H4.80808L3.12769 60.2381Z" fill="#333333"/>
|
||||
<path d="M7.21558 62.0254L6.68237 61.4297H8.81519L8.28198 62.0254H7.21558Z" fill="#CFCFCF"/>
|
||||
<rect x="16.6355" y="44.1562" width="6.39844" height="16.6788" rx="2.28594" fill="#515151"/>
|
||||
<ellipse cx="9.52612" cy="30.3484" rx="7.10938" ry="7.03977" fill="#CECECE"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
@ -546,7 +546,7 @@ void AMSMaterialsSetting::on_select_reset(wxCommandEvent& event) {
|
||||
else {
|
||||
PACalibIndexInfo select_index_info;
|
||||
select_index_info.tray_id = slot_id;
|
||||
select_index_info.nozzle_diameter = obj->m_nozzle_data.nozzles[0].diameter;
|
||||
select_index_info.nozzle_diameter = obj->m_extder_data.extders[0].diameter;
|
||||
select_index_info.cali_idx = -1;
|
||||
select_index_info.filament_id = selected_ams_id;
|
||||
CalibUtils::select_PA_calib_result(select_index_info);
|
||||
@ -687,7 +687,7 @@ void AMSMaterialsSetting::on_select_ok(wxCommandEvent &event)
|
||||
if (obj->cali_version >= 0) {
|
||||
PACalibIndexInfo select_index_info;
|
||||
select_index_info.tray_id = vt_tray;
|
||||
select_index_info.nozzle_diameter = obj->m_nozzle_data.nozzles[0].diameter;
|
||||
select_index_info.nozzle_diameter = obj->m_extder_data.extders[0].diameter;
|
||||
|
||||
auto cali_select_id = m_comboBox_cali_result->GetSelection();
|
||||
if (m_pa_profile_items.size() > 0 && cali_select_id >= 0) {
|
||||
@ -726,7 +726,7 @@ void AMSMaterialsSetting::on_select_ok(wxCommandEvent &event)
|
||||
if (obj->cali_version >= 0) {
|
||||
PACalibIndexInfo select_index_info;
|
||||
select_index_info.tray_id = cali_tray_id;
|
||||
select_index_info.nozzle_diameter = obj->m_nozzle_data.nozzles[0].diameter;
|
||||
select_index_info.nozzle_diameter = obj->m_extder_data.extders[0].diameter;
|
||||
|
||||
auto cali_select_id = m_comboBox_cali_result->GetSelection();
|
||||
if (m_pa_profile_items.size() > 0 && cali_select_id > 0) {
|
||||
@ -889,7 +889,7 @@ void AMSMaterialsSetting::Popup(wxString filament, wxString sn, wxString temp_mi
|
||||
std::set<std::string> filament_id_set;
|
||||
PresetBundle * preset_bundle = wxGetApp().preset_bundle;
|
||||
std::ostringstream stream;
|
||||
stream << std::fixed << std::setprecision(1) << obj->m_nozzle_data.nozzles[0].diameter;
|
||||
stream << std::fixed << std::setprecision(1) << obj->m_extder_data.extders[0].diameter;
|
||||
std::string nozzle_diameter_str = stream.str();
|
||||
std::set<std::string> printer_names = preset_bundle->get_printer_names_by_printer_type_and_nozzle(MachineObject::get_preset_printer_model_name(obj->printer_type), nozzle_diameter_str);
|
||||
|
||||
@ -1061,7 +1061,7 @@ void AMSMaterialsSetting::on_select_filament(wxCommandEvent &evt)
|
||||
if (preset_bundle) {
|
||||
std::ostringstream stream;
|
||||
if (obj)
|
||||
stream << std::fixed << std::setprecision(1) << obj->m_nozzle_data.nozzles[0].diameter;
|
||||
stream << std::fixed << std::setprecision(1) << obj->m_extder_data.extders[0].diameter;
|
||||
std::string nozzle_diameter_str = stream.str();
|
||||
std::set<std::string> printer_names = preset_bundle->get_printer_names_by_printer_type_and_nozzle(MachineObject::get_preset_printer_model_name(obj->printer_type),
|
||||
nozzle_diameter_str);
|
||||
|
@ -512,7 +512,7 @@ void AmsMapingPopup::update_ams_data_multi_machines()
|
||||
|
||||
void AmsMapingPopup::update(MachineObject* obj)
|
||||
{
|
||||
//BOOST_LOG_TRIVIAL(info) << "ams_mapping nozzle count " << obj->m_nozzle_data.nozzle.size();
|
||||
//BOOST_LOG_TRIVIAL(info) << "ams_mapping nozzle count " << obj->m_extder_data.nozzle.size();
|
||||
BOOST_LOG_TRIVIAL(info) << "ams_mapping total count " << obj->amsList.size();
|
||||
|
||||
|
||||
|
@ -210,7 +210,7 @@ void HistoryWindow::on_device_connected(MachineObject* obj)
|
||||
int selection = 1;
|
||||
for (int i = 0; i < nozzle_diameter_list.size(); i++) {
|
||||
m_comboBox_nozzle_dia->AppendString(wxString::Format("%1.1f mm", nozzle_diameter_list[i]));
|
||||
if (abs(curr_obj->m_nozzle_data.nozzles[0].diameter - nozzle_diameter_list[i]) < 1e-3) {
|
||||
if (abs(curr_obj->m_extder_data.extders[0].diameter - nozzle_diameter_list[i]) < 1e-3) {
|
||||
selection = i;
|
||||
}
|
||||
}
|
||||
@ -615,7 +615,7 @@ wxArrayString NewCalibrationHistoryDialog::get_all_filaments(const MachineObject
|
||||
std::set<std::string> filament_id_set;
|
||||
std::set<std::string> printer_names;
|
||||
std::ostringstream stream;
|
||||
stream << std::fixed << std::setprecision(1) << obj->m_nozzle_data.nozzles[0].diameter;
|
||||
stream << std::fixed << std::setprecision(1) << obj->m_extder_data.extders[0].diameter;
|
||||
std::string nozzle_diameter_str = stream.str();
|
||||
|
||||
for (auto printer_it = preset_bundle->printers.begin(); printer_it != preset_bundle->printers.end(); printer_it++) {
|
||||
@ -759,7 +759,7 @@ NewCalibrationHistoryDialog::NewCalibrationHistoryDialog(wxWindow *parent, const
|
||||
static std::array<float, 4> nozzle_diameter_list = {0.2f, 0.4f, 0.6f, 0.8f};
|
||||
for (int i = 0; i < nozzle_diameter_list.size(); i++) {
|
||||
m_comboBox_nozzle_diameter->AppendString(wxString::Format("%1.1f mm", nozzle_diameter_list[i]));
|
||||
if (abs(obj->m_nozzle_data.nozzles[0].diameter - nozzle_diameter_list[i]) < 1e-3) {
|
||||
if (abs(obj->m_extder_data.extders[0].diameter - nozzle_diameter_list[i]) < 1e-3) {
|
||||
m_comboBox_nozzle_diameter->SetSelection(i);
|
||||
}
|
||||
}
|
||||
|
@ -619,7 +619,7 @@ void PressureAdvanceWizard::update(MachineObject* obj)
|
||||
if (obj->cali_version != -1 && obj->cali_version != cali_version) {
|
||||
cali_version = obj->cali_version;
|
||||
PACalibExtruderInfo cali_info;
|
||||
cali_info.nozzle_diameter = obj->m_nozzle_data.nozzles[0].diameter;
|
||||
cali_info.nozzle_diameter = obj->m_extder_data.extders[0].diameter;
|
||||
CalibUtils::emit_get_PA_calib_info(cali_info);
|
||||
}
|
||||
}
|
||||
|
@ -500,8 +500,8 @@ float CalibrationCaliPage::get_selected_calibration_nozzle_dia(MachineObject* ob
|
||||
return obj->cali_selected_nozzle_dia;
|
||||
|
||||
// return default nozzle if nozzle diameter is set
|
||||
if (obj->m_nozzle_data.nozzles[0].diameter > 1e-3 && obj->m_nozzle_data.nozzles[0].diameter < 10.0f)
|
||||
return obj->m_nozzle_data.nozzles[0].diameter;
|
||||
if (obj->m_extder_data.extders[0].diameter > 1e-3 && obj->m_extder_data.extders[0].diameter < 10.0f)
|
||||
return obj->m_extder_data.extders[0].diameter;
|
||||
|
||||
// return 0.4 by default
|
||||
return 0.4;
|
||||
|
@ -1867,7 +1867,7 @@ void CalibrationPresetPage::init_with_machine(MachineObject* obj)
|
||||
// set nozzle value from machine
|
||||
bool nozzle_is_set = false;
|
||||
for (int i = 0; i < NOZZLE_LIST_COUNT; i++) {
|
||||
if (abs(obj->m_nozzle_data.nozzles[0].diameter - nozzle_diameter_list[i]) < 1e-3) {
|
||||
if (abs(obj->m_extder_data.extders[0].diameter - nozzle_diameter_list[i]) < 1e-3) {
|
||||
if (m_comboBox_nozzle_dia->GetCount() > i) {
|
||||
m_comboBox_nozzle_dia->SetSelection(i);
|
||||
nozzle_is_set = true;
|
||||
@ -1890,7 +1890,7 @@ void CalibrationPresetPage::init_with_machine(MachineObject* obj)
|
||||
if (obj->is_multi_extruders()) {
|
||||
for (int i = 0; i < m_comboBox_nozzle_volume_types.size(); ++i) {
|
||||
m_comboBox_nozzle_volume_types[i]->Show();
|
||||
m_comboBox_nozzle_volume_types[i]->SetSelection(obj->m_nozzle_data.nozzles[i].flow_type);
|
||||
m_comboBox_nozzle_volume_types[i]->SetSelection(obj->m_extder_data.extders[i].flow_type);
|
||||
}
|
||||
|
||||
if (!obj->is_main_extruder_on_left() && m_main_extruder_on_left) {
|
||||
|
@ -675,11 +675,11 @@ MachineObject::MachineObject(NetworkAgent* agent, std::string name, std::string
|
||||
auto vslot = AmsTray(std::to_string(VIRTUAL_TRAY_MAIN_ID));
|
||||
vt_slot.push_back(vslot);
|
||||
|
||||
m_nozzle_data.current_nozzle_id = 0;
|
||||
m_nozzle_data.target_nozzle_id = 0;
|
||||
m_nozzle_data.total_nozzle_count = 1;
|
||||
Nozzle nozzle;
|
||||
m_nozzle_data.nozzles.push_back(nozzle);
|
||||
m_extder_data.current_extder_id = 0;
|
||||
m_extder_data.target_extder_id = 0;
|
||||
m_extder_data.total_extder_count = 1;
|
||||
Extder nozzle;
|
||||
m_extder_data.extders.push_back(nozzle);
|
||||
}
|
||||
|
||||
MachineObject::~MachineObject()
|
||||
@ -1165,7 +1165,7 @@ bool MachineObject::is_main_extruder_on_left() const
|
||||
|
||||
bool MachineObject::is_multi_extruders() const
|
||||
{
|
||||
return m_nozzle_data.total_nozzle_count > 1;
|
||||
return m_extder_data.total_extder_count > 1;
|
||||
}
|
||||
|
||||
bool MachineObject::need_SD_card() const
|
||||
@ -1771,6 +1771,7 @@ int MachineObject::command_go_home()
|
||||
}
|
||||
}
|
||||
|
||||
// Old protocol
|
||||
int MachineObject::command_control_fan(FanType fan_type, bool on_off)
|
||||
{
|
||||
std::string gcode = (boost::format("M106 P%1% S%2% \n") % (int)fan_type % (on_off ? 255 : 0)).str();
|
||||
@ -1787,6 +1788,9 @@ int MachineObject::command_control_fan(FanType fan_type, bool on_off)
|
||||
return this->publish_gcode(gcode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Old protocol
|
||||
int MachineObject::command_control_fan_val(FanType fan_type, int val)
|
||||
{
|
||||
std::string gcode = (boost::format("M106 P%1% S%2% \n") % (int)fan_type % (val)).str();
|
||||
@ -1802,6 +1806,35 @@ int MachineObject::command_control_fan_val(FanType fan_type, int val)
|
||||
return this->publish_gcode(gcode);
|
||||
}
|
||||
|
||||
// New protocol
|
||||
int MachineObject::command_control_fan(int fan_id, bool on_off)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << "New protocol of fan setting(switch on/of status), fan_id = " << fan_id;
|
||||
json j;
|
||||
j["print"]["command"] = "set_fan";
|
||||
j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
|
||||
j["print"]["fan_index"] = fan_id;
|
||||
|
||||
// wait add, set on or off
|
||||
j["print"]["speed"] = 50;
|
||||
BOOST_LOG_TRIVIAL(info) << "MachineObject::command_control_fan, command info need to update, to set on or off status.";
|
||||
return this->publish_json(j.dump());
|
||||
}
|
||||
|
||||
// New protocol
|
||||
int MachineObject::command_control_fan_val(int fan_id, int val)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << "New protocol of fan setting(set speed), fan_id = " << fan_id;
|
||||
json j;
|
||||
j["print"]["command"] = "set_fan";
|
||||
j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
|
||||
j["print"]["fan_index"] = fan_id;
|
||||
|
||||
j["print"]["speed"] = val;
|
||||
BOOST_LOG_TRIVIAL(info) << "MachineObject::command_control_fan_val, set the speed of fan, fan_id = " << fan_id;
|
||||
return this->publish_json(j.dump());
|
||||
}
|
||||
|
||||
|
||||
int MachineObject::command_task_abort()
|
||||
{
|
||||
@ -3492,15 +3525,15 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
||||
}
|
||||
if (jj.contains("nozzle_temper")) {
|
||||
if (jj["nozzle_temper"].is_number()) {
|
||||
if (m_nozzle_data.nozzles.size() == 1) {
|
||||
m_nozzle_data.nozzles[0].temp = jj["nozzle_temper"].get<float>();
|
||||
if (m_extder_data.extders.size() == 1) {
|
||||
m_extder_data.extders[0].temp = jj["nozzle_temper"].get<float>();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (jj.contains("nozzle_target_temper")) {
|
||||
if (jj["nozzle_target_temper"].is_number()) {
|
||||
if (m_nozzle_data.nozzles.size() == 1) {
|
||||
m_nozzle_data.nozzles[0].target_temp = jj["nozzle_target_temper"].get<float>();
|
||||
if (m_extder_data.extders.size() == 1) {
|
||||
m_extder_data.extders[0].target_temp = jj["nozzle_target_temper"].get<float>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3537,7 +3570,6 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
||||
else {
|
||||
cooling_fan_speed = 0;
|
||||
}
|
||||
|
||||
if (jj.contains("big_fan1_speed")) {
|
||||
big_fan1_speed = stoi(jj["big_fan1_speed"].get<std::string>());
|
||||
big_fan1_speed = round( floor(big_fan1_speed / float(1.5)) * float(25.5) );
|
||||
@ -3545,7 +3577,6 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
||||
else {
|
||||
big_fan1_speed = 0;
|
||||
}
|
||||
|
||||
if (jj.contains("big_fan2_speed")) {
|
||||
big_fan2_speed = stoi(jj["big_fan2_speed"].get<std::string>());
|
||||
big_fan2_speed = round( floor(big_fan2_speed / float(1.5)) * float(25.5) );
|
||||
@ -3554,7 +3585,7 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
||||
big_fan2_speed = 0;
|
||||
}
|
||||
}
|
||||
|
||||
converse_to_duct();
|
||||
if (jj.contains("heatbreak_fan_speed")) {
|
||||
heatbreak_fan_speed = stoi(jj["heatbreak_fan_speed"].get<std::string>());
|
||||
}
|
||||
@ -3576,6 +3607,35 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
||||
}
|
||||
}
|
||||
|
||||
//new fan data
|
||||
if (jj.contains("airduct")) {
|
||||
m_air_duct_data.airducts.clear();
|
||||
m_air_duct_data.curren_duct = jj["airduct"]["cur"].get<int>();
|
||||
m_air_duct_data.ducts_ctrl.push_back(jj["airduct"]["ctrl"].get<int>());
|
||||
for (auto it_airduct = jj["airduct"]["info"].begin(); it_airduct != jj["airduct"]["info"].end(); it_airduct++) {
|
||||
AirDuct air_duct;
|
||||
air_duct.airduct_id = (*it_airduct)["id"].get<int>();
|
||||
air_duct.fans_ctrl.push_back((*it_airduct)["ctrl"].get<int>());
|
||||
for (auto it_fan = (*it_airduct)["info"].begin(); it_fan != (*it_airduct)["info"].end(); it_airduct++) {
|
||||
AirDuctFan fan;
|
||||
fan.use_new_protocol = true;
|
||||
auto type = (*it_fan)["type"].get<unsigned>();
|
||||
fan.id = std::log2(type >> 4);
|
||||
if (type & 0x01) fan.type = AIR_DOOR_TYPE;
|
||||
else if (type & 0x10) fan.type = AIR_FAN_TYPE;
|
||||
|
||||
fan.func = (*it_fan)["func"].get<int>();
|
||||
|
||||
unsigned speed = (*it_fan)["speed"].get<unsigned>();
|
||||
fan.current_speed = (speed) & 0xFFFF;
|
||||
fan.target_speed = (speed >> 16) & 0xFFFF;
|
||||
air_duct.fans_list.push_back(fan);
|
||||
}
|
||||
m_air_duct_data.airducts.push_back(air_duct);
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(trace) << "New protocol of fans, dir duct num = " << m_air_duct_data.airducts.size();
|
||||
}
|
||||
|
||||
try {
|
||||
if (jj.contains("stg")) {
|
||||
stage_list_info.clear();
|
||||
@ -3685,8 +3745,8 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
||||
nozzle_diameter = string_to_float(jj["nozzle_diameter"].get<std::string>());
|
||||
}
|
||||
|
||||
if (nozzle_diameter == 0.0f) {m_nozzle_data.nozzles[0].diameter = 0.4f;}
|
||||
else {m_nozzle_data.nozzles[0].diameter = round(nozzle_diameter * 10) / 10;}
|
||||
if (nozzle_diameter == 0.0f) {m_extder_data.extders[0].diameter = 0.4f;}
|
||||
else {m_extder_data.extders[0].diameter = round(nozzle_diameter * 10) / 10;}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3703,7 +3763,7 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
||||
else {
|
||||
if (jj["nozzle_type"].is_string()) {
|
||||
auto nozzle_type = jj["nozzle_type"].get<std::string>();
|
||||
m_nozzle_data.nozzles[0].type = nozzle_type;
|
||||
m_extder_data.extders[0].type = nozzle_type;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5260,6 +5320,34 @@ std::string MachineObject::get_string_from_fantype(FanType type)
|
||||
return "";
|
||||
}
|
||||
|
||||
void MachineObject::converse_to_duct() {
|
||||
AirDuct duct;
|
||||
duct.airduct_id = -1;
|
||||
AirDuctFan part_fan;
|
||||
part_fan.type = AIR_FAN_TYPE;
|
||||
part_fan.id = 1;
|
||||
part_fan.func = int(FAN_func_e::FAN_FUNC_PART_COOLING);
|
||||
part_fan.current_speed = cooling_fan_speed;
|
||||
duct.fans_list.push_back(part_fan);
|
||||
|
||||
AirDuctFan aux_fan;
|
||||
aux_fan.type = AIR_FAN_TYPE;
|
||||
aux_fan.id = 2;
|
||||
aux_fan.func = int(FAN_func_e::FAN_FUNC_AUX_COOLING);
|
||||
aux_fan.current_speed = big_fan1_speed;
|
||||
duct.fans_list.push_back(aux_fan);
|
||||
|
||||
AirDuctFan chamber_fan;
|
||||
chamber_fan.type = AIR_FAN_TYPE;
|
||||
chamber_fan.id = 3;
|
||||
chamber_fan.func = int(FAN_func_e::FAN_FUNC_EXHAUST);
|
||||
chamber_fan.current_speed = cooling_fan_speed;
|
||||
duct.fans_list.push_back(chamber_fan);
|
||||
this->m_air_duct_data.airducts.clear();
|
||||
this->m_air_duct_data.airducts.push_back(duct);
|
||||
this->m_air_duct_data.curren_duct = -1;
|
||||
}
|
||||
|
||||
AmsTray MachineObject::parse_vt_tray(json vtray)
|
||||
{
|
||||
auto vt_tray = AmsTray(std::to_string(VIRTUAL_TRAY_MAIN_ID));
|
||||
@ -5417,15 +5505,15 @@ void MachineObject::parse_new_info(json print)
|
||||
camera_recording_when_printing = get_flag_bits(cfg, 3);
|
||||
camera_resolution = get_flag_bits(cfg, 4) == 0 ? "720p" : "1080p";
|
||||
//liveview_local = get_flag_bits(cfg, 5); todo zhanma
|
||||
camera_timelapse = get_flag_bits(cfg, 6);
|
||||
tutk_state = get_flag_bits(cfg, 7) == 1 ? "disable" : "";
|
||||
chamber_light = get_flag_bits(cfg, 8) == 1 ? LIGHT_EFFECT::LIGHT_EFFECT_ON : LIGHT_EFFECT::LIGHT_EFFECT_OFF;
|
||||
printing_speed_lvl = (PrintingSpeedLevel)get_flag_bits(cfg, 9, 3);
|
||||
camera_timelapse = get_flag_bits(cfg, 5);
|
||||
tutk_state = get_flag_bits(cfg, 6) == 1 ? "disable" : "";
|
||||
chamber_light = get_flag_bits(cfg, 7) == 1 ? LIGHT_EFFECT::LIGHT_EFFECT_ON : LIGHT_EFFECT::LIGHT_EFFECT_OFF;
|
||||
printing_speed_lvl = (PrintingSpeedLevel)get_flag_bits(cfg, 8, 3);
|
||||
//is_support_build_plate_marker_detect = get_flag_bits(cfg, 12); todo yangcong
|
||||
|
||||
xcam_first_layer_inspector = get_flag_bits(cfg, 13);
|
||||
xcam_first_layer_inspector = get_flag_bits(cfg, 12);
|
||||
|
||||
switch (get_flag_bits(cfg, 14, 2))
|
||||
switch (get_flag_bits(cfg, 13, 2))
|
||||
{
|
||||
case 0:
|
||||
xcam_ai_monitoring_sensitivity = "never_halt";
|
||||
@ -5441,14 +5529,14 @@ void MachineObject::parse_new_info(json print)
|
||||
break;
|
||||
}
|
||||
|
||||
xcam_ai_monitoring = get_flag_bits(cfg, 16);
|
||||
xcam_auto_recovery_step_loss = get_flag_bits(cfg, 17);
|
||||
ams_calibrate_remain_flag = get_flag_bits(cfg, 18);
|
||||
ams_auto_switch_filament_flag = get_flag_bits(cfg, 19);
|
||||
xcam_allow_prompt_sound = get_flag_bits(cfg, 23);
|
||||
xcam_filament_tangle_detect = get_flag_bits(cfg, 24);
|
||||
nozzle_blob_detection_enabled = get_flag_bits(cfg, 25);
|
||||
installed_upgrade_kit = get_flag_bits(cfg, 26);
|
||||
xcam_ai_monitoring = get_flag_bits(cfg, 15);
|
||||
xcam_auto_recovery_step_loss = get_flag_bits(cfg, 16);
|
||||
ams_calibrate_remain_flag = get_flag_bits(cfg, 17);
|
||||
ams_auto_switch_filament_flag = get_flag_bits(cfg, 18);
|
||||
xcam_allow_prompt_sound = get_flag_bits(cfg, 22);
|
||||
xcam_filament_tangle_detect = get_flag_bits(cfg, 23);
|
||||
nozzle_blob_detection_enabled = get_flag_bits(cfg, 24);
|
||||
installed_upgrade_kit = get_flag_bits(cfg, 25);
|
||||
}
|
||||
|
||||
/*fun*/
|
||||
@ -5468,7 +5556,7 @@ void MachineObject::parse_new_info(json print)
|
||||
is_support_motor_noise_cali = get_flag_bits(fun, 10);
|
||||
is_support_user_preset = get_flag_bits(fun, 11);
|
||||
is_support_nozzle_blob_detection = get_flag_bits(fun, 13);
|
||||
is_support_upgrade_kit = get_flag_bits(cfg, 14);
|
||||
is_support_upgrade_kit = get_flag_bits(fun, 14);
|
||||
}
|
||||
|
||||
/*aux*/
|
||||
@ -5516,30 +5604,29 @@ void MachineObject::parse_new_info(json print)
|
||||
heatbreak_fan_speed = get_flag_bits(device["fan"].get<int>(), 12, 3);
|
||||
}
|
||||
|
||||
if (device.contains("nozzle")) {
|
||||
json const& nozzle = device["nozzle"];
|
||||
if (device.contains("extruder")) {
|
||||
json const& nozzle = device["extruder"];
|
||||
|
||||
m_nozzle_data = NozzleData();
|
||||
m_nozzle_data.current_nozzle_id = get_flag_bits(nozzle["info"].get<int>(), 0, 3);
|
||||
m_nozzle_data.target_nozzle_id = get_flag_bits(nozzle["info"].get<int>(), 4, 3);
|
||||
m_nozzle_data.total_nozzle_count = get_flag_bits(nozzle["info"].get<int>(), 8, 3);
|
||||
m_extder_data = ExtderData();
|
||||
m_extder_data.total_extder_count = get_flag_bits(nozzle["state"].get<int>(), 0, 3);
|
||||
m_extder_data.current_extder_id = get_flag_bits(nozzle["state"].get<int>(), 4, 3);
|
||||
m_extder_data.target_extder_id = get_flag_bits(nozzle["state"].get<int>(), 8, 3);
|
||||
|
||||
for (int i = 0; i < m_extder_data.total_extder_count; i++) {
|
||||
|
||||
for (int i = 0; i < m_nozzle_data.total_nozzle_count; i++) {
|
||||
|
||||
Nozzle nozzle_obj;
|
||||
Extder extder_obj;
|
||||
|
||||
std::string nozzle_id = std::to_string(i);
|
||||
if (nozzle.contains(nozzle_id)) {
|
||||
auto njon = nozzle[nozzle_id].get<json>();
|
||||
|
||||
nozzle_obj.type = DeviceManager::nozzle_type_conver(get_flag_bits(njon["info"].get<int>(), 0, 2));
|
||||
nozzle_obj.diameter = DeviceManager::nozzle_diameter_conver(get_flag_bits(njon["info"].get<int>(), 3, 3));
|
||||
nozzle_obj.ext_has_filament = get_flag_bits(njon["info"].get<int>(), 7);
|
||||
nozzle_obj.buffer_has_filament = get_flag_bits(njon["info"].get<int>(), 8);
|
||||
nozzle_obj.flow_type = get_flag_bits(njon["info"].get<int>(), 9, 2);
|
||||
nozzle_obj.temp = get_flag_bits(njon["temp"].get<int>(), 0, 15);
|
||||
nozzle_obj.target_temp = get_flag_bits(njon["temp"].get<int>(), 16, 15);
|
||||
extder_obj.type = DeviceManager::nozzle_type_conver(get_flag_bits(njon["info"].get<int>(), 0, 2));
|
||||
extder_obj.diameter = DeviceManager::nozzle_diameter_conver(get_flag_bits(njon["info"].get<int>(), 3, 3));
|
||||
extder_obj.ext_has_filament = get_flag_bits(njon["info"].get<int>(), 7);
|
||||
extder_obj.buffer_has_filament = get_flag_bits(njon["info"].get<int>(), 8);
|
||||
extder_obj.flow_type = get_flag_bits(njon["info"].get<int>(), 9, 2);
|
||||
extder_obj.temp = get_flag_bits(njon["temp"].get<int>(), 0, 15);
|
||||
extder_obj.target_temp = get_flag_bits(njon["temp"].get<int>(), 16, 15);
|
||||
|
||||
AmsSlot spre;
|
||||
spre.ams_id = std::to_string(get_flag_bits(njon["spre"].get<int>(), 0, 8));
|
||||
@ -5553,14 +5640,14 @@ void MachineObject::parse_new_info(json print)
|
||||
star.ams_id = std::to_string(get_flag_bits(njon["star"].get<int>(), 0, 8));
|
||||
star.slot_id = std::to_string(get_flag_bits(njon["star"].get<int>(), 8, 8));
|
||||
|
||||
nozzle_obj.spre = spre;
|
||||
nozzle_obj.snow = snow;
|
||||
nozzle_obj.star = star;
|
||||
nozzle_obj.ams_stat = get_flag_bits(njon["stat"].get<int>(), 0, 15);
|
||||
nozzle_obj.rfid_stat = get_flag_bits(njon["stat"].get<int>(), 16, 7);
|
||||
extder_obj.spre = spre;
|
||||
extder_obj.snow = snow;
|
||||
extder_obj.star = star;
|
||||
extder_obj.ams_stat = get_flag_bits(njon["stat"].get<int>(), 0, 15);
|
||||
extder_obj.rfid_stat = get_flag_bits(njon["stat"].get<int>(), 16, 15);
|
||||
}
|
||||
|
||||
m_nozzle_data.nozzles.push_back(nozzle_obj);
|
||||
m_extder_data.extders.push_back(extder_obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5568,26 +5655,34 @@ void MachineObject::parse_new_info(json print)
|
||||
|
||||
int MachineObject::get_flag_bits(std::string str, int start, int count)
|
||||
{
|
||||
int decimal_value = std::stoi(str, nullptr, 16);
|
||||
int mask = 0;
|
||||
for (int i = 0; i < count; i++) {
|
||||
mask += 1 << (start + i);
|
||||
}
|
||||
|
||||
int flag = (decimal_value & (mask)) >> start;
|
||||
try {
|
||||
unsigned long long decimal_value = std::stoull(str, nullptr, 16);
|
||||
unsigned long long mask = (1ULL << count) - 1;
|
||||
int flag = (decimal_value >> start) & mask;
|
||||
return flag;
|
||||
} catch (...) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int MachineObject::get_flag_bits(int num, int start, int count)
|
||||
int MachineObject::get_flag_bits(int num, int start, int count, int base)
|
||||
{
|
||||
int decimal_value = num;
|
||||
int mask = 0;
|
||||
for (int i = 0; i < count; i++) {
|
||||
mask += 1 << (start + i);
|
||||
try {
|
||||
unsigned long long mask = (1ULL << count) - 1;
|
||||
unsigned long long value;
|
||||
if (base == 10) {
|
||||
value = static_cast<unsigned long long>(num);
|
||||
} else if (base == 16) {
|
||||
value = static_cast<unsigned long long>(std::stoul(std::to_string(num), nullptr, 16));
|
||||
} else {
|
||||
throw std::invalid_argument("Unsupported base");
|
||||
}
|
||||
|
||||
int flag = (decimal_value & (mask)) >> start;
|
||||
int flag = (value >> start) & mask;
|
||||
return flag;
|
||||
} catch (...) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void MachineObject::update_filament_list()
|
||||
@ -5662,7 +5757,7 @@ void MachineObject::update_printer_preset_name()
|
||||
PresetBundle * preset_bundle = Slic3r::GUI::wxGetApp().preset_bundle;
|
||||
auto printer_model = MachineObject::get_preset_printer_model_name(this->printer_type);
|
||||
std::set<std::string> diameter_set;
|
||||
for (auto &nozzle : m_nozzle_data.nozzles) {
|
||||
for (auto &nozzle : m_extder_data.extders) {
|
||||
float diameter = nozzle.diameter;
|
||||
std::ostringstream stream;
|
||||
stream << std::fixed << std::setprecision(1) << diameter;
|
||||
@ -5695,7 +5790,10 @@ void MachineObject::check_ams_filament_valid()
|
||||
auto ams_id = ams_pair.first;
|
||||
auto &ams = ams_pair.second;
|
||||
std::ostringstream stream;
|
||||
stream << std::fixed << std::setprecision(1) << m_nozzle_data.nozzles[ams->nozzle].diameter;
|
||||
if (ams->nozzle < 0 || ams->nozzle >= m_extder_data.extders.size()) {
|
||||
return;
|
||||
}
|
||||
stream << std::fixed << std::setprecision(1) << m_extder_data.extders[ams->nozzle].diameter;
|
||||
std::string nozzle_diameter_str = stream.str();
|
||||
assert(nozzle_diameter_str.size() == 3);
|
||||
if (m_nozzle_filament_data.find(nozzle_diameter_str) == m_nozzle_filament_data.end()) {
|
||||
@ -5750,17 +5848,17 @@ void MachineObject::check_ams_filament_valid()
|
||||
|
||||
for (auto vt_tray : vt_slot) {
|
||||
int index = 255 - std::stoi(vt_tray.id);
|
||||
if (index >= m_nozzle_data.total_nozzle_count) {
|
||||
BOOST_LOG_TRIVIAL(error) << " vt_tray id map for nozzle id is not exist, index is: " << index << " nozzle count" << m_nozzle_data.total_nozzle_count;
|
||||
if (index >= m_extder_data.total_extder_count) {
|
||||
BOOST_LOG_TRIVIAL(error) << " vt_tray id map for nozzle id is not exist, index is: " << index << " nozzle count" << m_extder_data.total_extder_count;
|
||||
continue;
|
||||
}
|
||||
auto diameter = m_nozzle_data.nozzles[index].diameter;
|
||||
auto diameter = m_extder_data.extders[index].diameter;
|
||||
std::ostringstream stream;
|
||||
stream << std::fixed << std::setprecision(1) << diameter;
|
||||
std::string nozzle_diameter_str = stream.str();
|
||||
assert(nozzle_diameter_str.size() == 3);
|
||||
if (m_nozzle_filament_data.find(nozzle_diameter_str) == m_nozzle_filament_data.end()) {
|
||||
assert(false);
|
||||
//assert(false);
|
||||
continue;
|
||||
}
|
||||
auto &data = m_nozzle_filament_data[nozzle_diameter_str];
|
||||
@ -5788,7 +5886,7 @@ void MachineObject::check_ams_filament_valid()
|
||||
std::string preset_setting_id;
|
||||
PresetBundle * preset_bundle = Slic3r::GUI::wxGetApp().preset_bundle;
|
||||
std::ostringstream stream;
|
||||
stream << std::fixed << std::setprecision(1) << m_nozzle_data.nozzles[0].diameter;
|
||||
stream << std::fixed << std::setprecision(1) << m_extder_data.extders[0].diameter;
|
||||
std::string nozzle_diameter_str = stream.str();
|
||||
bool is_equation = preset_bundle->check_filament_temp_equation_by_printer_type_and_nozzle_for_mas_tray(MachineObject::get_preset_printer_model_name(
|
||||
this->printer_type),
|
||||
|
@ -136,6 +136,11 @@ enum ManualPaCaliMethod {
|
||||
PA_PATTERN,
|
||||
};
|
||||
|
||||
enum AirDuctType {
|
||||
AIR_FAN_TYPE,
|
||||
AIR_DOOR_TYPE
|
||||
};
|
||||
|
||||
|
||||
struct AmsSlot
|
||||
{
|
||||
@ -143,7 +148,7 @@ struct AmsSlot
|
||||
std::string slot_id;
|
||||
};
|
||||
|
||||
struct Nozzle
|
||||
struct Extder
|
||||
{
|
||||
std::string type; //0-hardened_steel 1-stainless_steel
|
||||
float diameter = {0.4f}; // 0-0.2mm 1-0.4mm 2-0.6 mm3-0.8mm
|
||||
@ -161,12 +166,37 @@ struct Nozzle
|
||||
int rfid_stat{0}; ;
|
||||
};
|
||||
|
||||
struct NozzleData
|
||||
struct ExtderData
|
||||
{
|
||||
int current_nozzle_id{0};
|
||||
int target_nozzle_id{0};
|
||||
int total_nozzle_count {0};
|
||||
std::vector<Nozzle> nozzles;
|
||||
int current_extder_id{0};
|
||||
int target_extder_id{0};
|
||||
int total_extder_count {0};
|
||||
std::vector<Extder> extders;
|
||||
};
|
||||
|
||||
struct AirDuctFan
|
||||
{
|
||||
//Fan and door may use the same mode_id, but they are different, they need to be distinguished by the m_type field
|
||||
AirDuctType type; //Type of part, fan or door
|
||||
bool use_new_protocol{ false };
|
||||
int id; //the id of fan or air door
|
||||
int func{ 0 }; //UI display, fan or door
|
||||
int current_speed{0};
|
||||
int target_speed{0};
|
||||
};
|
||||
|
||||
struct AirDuct
|
||||
{
|
||||
int airduct_id{ 0 }; //Determine the UI display content, click radonbutton to switch
|
||||
std::vector<bool> fans_ctrl; //Control status of each (fan) / (air door)
|
||||
std::vector<AirDuctFan> fans_list; //Fan or air door s
|
||||
};
|
||||
|
||||
struct AirDuctData
|
||||
{
|
||||
int curren_duct{0};
|
||||
std::vector<bool> ducts_ctrl; //Control status of each duct
|
||||
std::vector<AirDuct> airducts;
|
||||
};
|
||||
|
||||
struct RatingInfo {
|
||||
@ -327,6 +357,31 @@ enum HMSMessageLevel {
|
||||
HMS_MSG_LEVEL_MAX,
|
||||
};
|
||||
|
||||
|
||||
enum FAN_func_e {
|
||||
FAN_FUNC_PART_COOLING = 0,
|
||||
FAN_FUNC_AUX_COOLING,
|
||||
FAN_FUNC_EXHAUST,
|
||||
FAN_FUNC_FILTER,
|
||||
FAN_FUNC_HEATING
|
||||
};
|
||||
|
||||
enum AIR_DOOR_func_e {
|
||||
AIR_DOOR_FUNC_CHAMBER = 0,
|
||||
AIR_DOOR_FUNC_INNERLOOP,
|
||||
AIR_DOOR_FUNC_TOP
|
||||
};
|
||||
|
||||
enum AIR_DUCT_mode_e {
|
||||
AIR_DUCT_NONE = -1,
|
||||
AIR_DUCT_COOLING_FILT = 0,
|
||||
AIR_DUCT_HEATING_INTERNAL_FILT,
|
||||
AIR_DUCT_EXHAUST,
|
||||
AIR_DUCT_FULL_COOLING,
|
||||
AIR_DUCT_NUM,
|
||||
AIR_DUCT_INIT = 0xFF //Initial mode, only used within mc
|
||||
};
|
||||
|
||||
class HMSItem
|
||||
{
|
||||
public:
|
||||
@ -387,6 +442,8 @@ public:
|
||||
COOLING_FAN = 1,
|
||||
BIG_COOLING_FAN = 2,
|
||||
CHAMBER_FAN = 3,
|
||||
EXHAUST_FAN,
|
||||
FILTER_FAN,
|
||||
};
|
||||
|
||||
enum UpgradingDisplayState {
|
||||
@ -612,6 +669,10 @@ public:
|
||||
int big_fan2_speed = 0;
|
||||
uint32_t fan_gear = 0;
|
||||
|
||||
//new fan data
|
||||
AirDuctData m_air_duct_data;
|
||||
void converse_to_duct(); //Convert the data to duct type to make the newand old protocols consistent
|
||||
|
||||
/* signals */
|
||||
std::string wifi_signal;
|
||||
std::string link_th;
|
||||
@ -911,8 +972,10 @@ public:
|
||||
int command_xyz_abs();
|
||||
int command_auto_leveling();
|
||||
int command_go_home();
|
||||
int command_control_fan(FanType fan_type, bool on_off);
|
||||
int command_control_fan_val(FanType fan_type, int val);
|
||||
int command_control_fan(FanType fan_type, bool on_off); //Old protocol
|
||||
int command_control_fan_val(FanType fan_type, int val); //Old protocol
|
||||
int command_control_fan(int fan_id, bool on_off); //New protocol
|
||||
int command_control_fan_val(int fan_id, int val); //New protocol
|
||||
int command_task_abort();
|
||||
/* cancelled the job_id */
|
||||
int command_task_cancel(std::string job_id);
|
||||
@ -1035,7 +1098,7 @@ public:
|
||||
|
||||
/*for more extruder*/
|
||||
bool is_enable_np{ false };
|
||||
NozzleData m_nozzle_data;
|
||||
ExtderData m_extder_data;
|
||||
|
||||
/*vi slot data*/
|
||||
std::vector<AmsTray> vt_slot;
|
||||
@ -1044,7 +1107,7 @@ public:
|
||||
/*for parse new info*/
|
||||
void parse_new_info(json print);
|
||||
int get_flag_bits(std::string str, int start, int count = 1);
|
||||
int get_flag_bits(int num, int start, int count = 1);
|
||||
int get_flag_bits(int num, int start, int count = 1, int base = 10);
|
||||
|
||||
/* Device Filament Check */
|
||||
struct FilamentData
|
||||
|
@ -711,7 +711,7 @@ void Sidebar::priv::sync_extruder_list()
|
||||
dlg.ShowModal();
|
||||
return;
|
||||
}
|
||||
if (obj->m_nozzle_data.nozzles.size() != 2) {
|
||||
if (obj->m_extder_data.extders.size() != 2) {
|
||||
MessageDialog dlg(this->plater, _L("The currently connected printer does not have two extruders."), _L("Sync extruder infomation"), wxOK | wxICON_WARNING);
|
||||
dlg.ShowModal();
|
||||
return;
|
||||
@ -729,8 +729,8 @@ void Sidebar::priv::sync_extruder_list()
|
||||
}
|
||||
|
||||
auto printer_tab = dynamic_cast<TabPrinter *>(wxGetApp().get_tab(Preset::TYPE_PRINTER));
|
||||
printer_tab->set_extruder_volume_type(0, NozzleVolumeType(obj->m_nozzle_data.nozzles[1].flow_type));
|
||||
printer_tab->set_extruder_volume_type(1, NozzleVolumeType(obj->m_nozzle_data.nozzles[0].flow_type));
|
||||
printer_tab->set_extruder_volume_type(0, NozzleVolumeType(obj->m_extder_data.extders[1].flow_type));
|
||||
printer_tab->set_extruder_volume_type(1, NozzleVolumeType(obj->m_extder_data.extders[0].flow_type));
|
||||
int left_4 = 0, right_4 = 0, left_1 = 0, right_1 = 0;
|
||||
for (auto ams : obj->amsList) {
|
||||
// Main (first) extruder at right
|
||||
|
@ -444,6 +444,9 @@ PrinterPartsDialog::PrinterPartsDialog(wxWindow* parent)
|
||||
nozzle_type_map_tr[0] = _L("Hardened Steel");
|
||||
nozzle_type_map_tr[1] = _L("Stainless Steel");
|
||||
|
||||
nozzle_flow_map[0] = "normal flow";
|
||||
nozzle_flow_map[1] = "high flow";
|
||||
|
||||
nozzle_stainless_diameter_map[0] = 0.2;
|
||||
nozzle_stainless_diameter_map[1] = 0.4;
|
||||
|
||||
@ -452,25 +455,34 @@ PrinterPartsDialog::PrinterPartsDialog(wxWindow* parent)
|
||||
nozzle_hard_diameter_map[2] = 0.8;
|
||||
|
||||
SetBackgroundColour(*wxWHITE);
|
||||
wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
wxBoxSizer* single_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
single_panel = new wxPanel(this);
|
||||
single_panel->SetBackgroundColour(*wxWHITE);
|
||||
|
||||
wxBoxSizer* multiple_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
multiple_panel = new wxPanel(this);
|
||||
multiple_panel->SetBackgroundColour(*wxWHITE);
|
||||
|
||||
auto m_line = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1, 1), wxTAB_TRAVERSAL);
|
||||
m_line->SetBackgroundColour(wxColour(166, 169, 170));
|
||||
|
||||
/*single nozzle*/
|
||||
//nozzle type
|
||||
wxBoxSizer* line_sizer_nozzle_type = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
auto nozzle_type = new Label(this, _L("Nozzle Type"));
|
||||
auto nozzle_type = new Label(single_panel, _L("Nozzle Type"));
|
||||
nozzle_type->SetFont(Label::Body_14);
|
||||
nozzle_type->SetMinSize(wxSize(FromDIP(180), -1));
|
||||
nozzle_type->SetMaxSize(wxSize(FromDIP(180), -1));
|
||||
nozzle_type->SetForegroundColour(STATIC_TEXT_CAPTION_COL);
|
||||
nozzle_type->Wrap(-1);
|
||||
|
||||
nozzle_type_checkbox = new ComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(140), -1), 0, NULL, wxCB_READONLY);
|
||||
nozzle_type_checkbox->Append(nozzle_type_map_tr[0]);
|
||||
nozzle_type_checkbox->Append(nozzle_type_map_tr[1]);
|
||||
nozzle_type_checkbox = new ComboBox(single_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(140), -1), 0, NULL, wxCB_READONLY);
|
||||
nozzle_type_checkbox->Append(_L("Stainless Steel"));
|
||||
nozzle_type_checkbox->Append(_L("Hardened Steel"));
|
||||
nozzle_type_checkbox->SetSelection(0);
|
||||
|
||||
|
||||
@ -481,34 +493,141 @@ PrinterPartsDialog::PrinterPartsDialog(wxWindow* parent)
|
||||
|
||||
//nozzle diameter
|
||||
wxBoxSizer* line_sizer_nozzle_diameter = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto nozzle_diameter = new Label(this, _L("Nozzle Diameter"));
|
||||
auto nozzle_diameter = new Label(single_panel, _L("Nozzle Diameter"));
|
||||
nozzle_diameter->SetFont(Label::Body_14);
|
||||
nozzle_diameter->SetMinSize(wxSize(FromDIP(180), -1));
|
||||
nozzle_diameter->SetMaxSize(wxSize(FromDIP(180), -1));
|
||||
nozzle_diameter->SetForegroundColour(STATIC_TEXT_CAPTION_COL);
|
||||
nozzle_diameter->Wrap(-1);
|
||||
|
||||
nozzle_diameter_checkbox = new ComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(140), -1), 0, NULL, wxCB_READONLY);
|
||||
|
||||
nozzle_diameter_checkbox = new ComboBox(single_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(140), -1), 0, NULL, wxCB_READONLY);
|
||||
|
||||
line_sizer_nozzle_diameter->Add(nozzle_diameter, 0, wxALIGN_CENTER, 5);
|
||||
line_sizer_nozzle_diameter->Add(0, 0, 1, wxEXPAND, 5);
|
||||
line_sizer_nozzle_diameter->Add(nozzle_diameter_checkbox, 0, wxALIGN_CENTER, 5);
|
||||
|
||||
sizer->Add(m_line, 0, wxEXPAND, 0);
|
||||
sizer->Add(0, 0, 0, wxTOP, FromDIP(24));
|
||||
sizer->Add(line_sizer_nozzle_type, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, FromDIP(18));
|
||||
sizer->Add(0, 0, 0, wxTOP, FromDIP(20));
|
||||
sizer->Add(line_sizer_nozzle_diameter, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, FromDIP(18));
|
||||
sizer->Add(0, 0, 0, wxTOP, FromDIP(24));
|
||||
single_sizer->Add(m_line, 0, wxEXPAND, 0);
|
||||
single_sizer->Add(0, 0, 0, wxTOP, FromDIP(24));
|
||||
single_sizer->Add(line_sizer_nozzle_type, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, FromDIP(18));
|
||||
single_sizer->Add(0, 0, 0, wxTOP, FromDIP(20));
|
||||
single_sizer->Add(line_sizer_nozzle_diameter, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, FromDIP(18));
|
||||
single_sizer->Add(0, 0, 0, wxTOP, FromDIP(24));
|
||||
|
||||
|
||||
nozzle_type_checkbox->Connect( wxEVT_COMBOBOX, wxCommandEventHandler(PrinterPartsDialog::set_nozzle_type), NULL, this );
|
||||
nozzle_diameter_checkbox->Connect( wxEVT_COMBOBOX, wxCommandEventHandler(PrinterPartsDialog::set_nozzle_diameter), NULL, this );
|
||||
|
||||
single_panel->SetSizer(single_sizer);
|
||||
single_panel->Layout();
|
||||
single_panel->Fit();
|
||||
|
||||
/*multiple nozzle*/
|
||||
/*left*/
|
||||
auto leftTitle = new Label(multiple_panel, _L("Left Nozzle"));
|
||||
leftTitle->SetFont(::Label::Head_15);
|
||||
leftTitle->SetForegroundColour(0x2e2630);
|
||||
|
||||
wxBoxSizer *multiple_left_line_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto multiple_left_nozzle_type = new Label(multiple_panel, _L("Nozzle Type"));
|
||||
multiple_left_nozzle_type->SetFont(Label::Body_14);
|
||||
multiple_left_nozzle_type->SetMinSize(wxSize(FromDIP(80), -1));
|
||||
multiple_left_nozzle_type->SetMaxSize(wxSize(FromDIP(80), -1));
|
||||
multiple_left_nozzle_type->SetForegroundColour(STATIC_TEXT_CAPTION_COL);
|
||||
|
||||
multiple_left_nozzle_type_checkbox = new ComboBox(multiple_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(140), -1), 0, NULL, wxCB_READONLY);
|
||||
multiple_left_nozzle_type_checkbox->Append(_L("Stainless Steel"));
|
||||
multiple_left_nozzle_type_checkbox->Append(_L("Hardened Steel"));
|
||||
multiple_left_nozzle_type_checkbox->SetSelection(0);
|
||||
|
||||
auto multiple_left_nozzle_diameter = new Label(multiple_panel, _L("Nozzle Diameter"));
|
||||
multiple_left_nozzle_diameter->SetFont(Label::Body_14);
|
||||
multiple_left_nozzle_diameter->SetMinSize(wxSize(FromDIP(80), -1));
|
||||
multiple_left_nozzle_diameter->SetMaxSize(wxSize(FromDIP(80), -1));
|
||||
multiple_left_nozzle_diameter->SetForegroundColour(STATIC_TEXT_CAPTION_COL);
|
||||
multiple_left_nozzle_diameter_checkbox = new ComboBox(multiple_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(140), -1), 0, NULL, wxCB_READONLY);
|
||||
|
||||
auto multiple_left_nozzle_flow = new Label(multiple_panel, _L("Nozzle Flow"));
|
||||
multiple_left_nozzle_flow->SetFont(Label::Body_14);
|
||||
multiple_left_nozzle_flow->SetMinSize(wxSize(FromDIP(80), -1));
|
||||
multiple_left_nozzle_flow->SetMaxSize(wxSize(FromDIP(80), -1));
|
||||
multiple_left_nozzle_flow->SetForegroundColour(STATIC_TEXT_CAPTION_COL);
|
||||
multiple_left_nozzle_flow_checkbox = new ComboBox(multiple_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(140), -1), 0, NULL, wxCB_READONLY);
|
||||
|
||||
multiple_left_line_sizer->Add(multiple_left_nozzle_type, 0, wxALIGN_CENTER, 0);
|
||||
multiple_left_line_sizer->Add(0, 0, 0, wxLEFT, FromDIP(8));
|
||||
multiple_left_line_sizer->Add(multiple_left_nozzle_type_checkbox, 0, wxALIGN_CENTER, 0);
|
||||
multiple_left_line_sizer->Add(0, 0, 0, wxLEFT, FromDIP(15));
|
||||
multiple_left_line_sizer->Add(multiple_left_nozzle_diameter, 0, wxALIGN_CENTER, 0);
|
||||
multiple_left_line_sizer->Add(0, 0, 1, wxEXPAND, FromDIP(8));
|
||||
multiple_left_line_sizer->Add(multiple_left_nozzle_diameter_checkbox, 0, wxALIGN_CENTER, 0);
|
||||
multiple_left_line_sizer->Add(0, 0, 0, wxLEFT, FromDIP(15));
|
||||
multiple_left_line_sizer->Add(multiple_left_nozzle_flow, 0, wxALIGN_CENTER, 0);
|
||||
multiple_left_line_sizer->Add(0, 0, 1, wxEXPAND, FromDIP(8));
|
||||
multiple_left_line_sizer->Add(multiple_left_nozzle_flow_checkbox, 0, wxALIGN_CENTER, 0);
|
||||
|
||||
/*right*/
|
||||
auto rightTitle = new Label(multiple_panel, _L("Right Nozzle"));
|
||||
rightTitle->SetFont(::Label::Head_15);
|
||||
rightTitle->SetForegroundColour(0x2e2630);
|
||||
|
||||
wxBoxSizer *multiple_right_line_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto multiple_right_nozzle_type = new Label(multiple_panel, _L("Nozzle Type"));
|
||||
multiple_right_nozzle_type->SetFont(Label::Body_14);
|
||||
multiple_right_nozzle_type->SetMinSize(wxSize(FromDIP(80), -1));
|
||||
multiple_right_nozzle_type->SetMaxSize(wxSize(FromDIP(80), -1));
|
||||
multiple_right_nozzle_type->SetForegroundColour(STATIC_TEXT_CAPTION_COL);
|
||||
|
||||
multiple_right_nozzle_type_checkbox = new ComboBox(multiple_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(140), -1), 0, NULL, wxCB_READONLY);
|
||||
multiple_right_nozzle_type_checkbox->Append(_L("Stainless Steel"));
|
||||
multiple_right_nozzle_type_checkbox->Append(_L("Hardened Steel"));
|
||||
multiple_right_nozzle_type_checkbox->SetSelection(0);
|
||||
|
||||
auto multiple_right_nozzle_diameter = new Label(multiple_panel, _L("Nozzle Diameter"));
|
||||
multiple_right_nozzle_diameter->SetFont(Label::Body_14);
|
||||
multiple_right_nozzle_diameter->SetMinSize(wxSize(FromDIP(80), -1));
|
||||
multiple_right_nozzle_diameter->SetMaxSize(wxSize(FromDIP(80), -1));
|
||||
multiple_right_nozzle_diameter->SetForegroundColour(STATIC_TEXT_CAPTION_COL);
|
||||
multiple_right_nozzle_diameter_checkbox = new ComboBox(multiple_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(140), -1), 0, NULL, wxCB_READONLY);
|
||||
|
||||
auto multiple_right_nozzle_flow = new Label(multiple_panel, _L("Nozzle Flow"));
|
||||
multiple_right_nozzle_flow->SetFont(Label::Body_14);
|
||||
multiple_right_nozzle_flow->SetMinSize(wxSize(FromDIP(80), -1));
|
||||
multiple_right_nozzle_flow->SetMaxSize(wxSize(FromDIP(80), -1));
|
||||
multiple_right_nozzle_flow->SetForegroundColour(STATIC_TEXT_CAPTION_COL);
|
||||
multiple_right_nozzle_flow_checkbox = new ComboBox(multiple_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(140), -1), 0, NULL, wxCB_READONLY);
|
||||
|
||||
multiple_right_line_sizer->Add(multiple_right_nozzle_type, 0, wxALIGN_CENTER, 0);
|
||||
multiple_right_line_sizer->Add(0, 0, 0, wxLEFT, FromDIP(8));
|
||||
multiple_right_line_sizer->Add(multiple_right_nozzle_type_checkbox, 0, wxALIGN_CENTER, 0);
|
||||
multiple_right_line_sizer->Add(0, 0, 0, wxLEFT, FromDIP(15));
|
||||
multiple_right_line_sizer->Add(multiple_right_nozzle_diameter, 0, wxALIGN_CENTER, 0);
|
||||
multiple_right_line_sizer->Add(0, 0, 1, wxEXPAND, FromDIP(8));
|
||||
multiple_right_line_sizer->Add(multiple_right_nozzle_diameter_checkbox, 0, wxALIGN_CENTER, 0);
|
||||
multiple_right_line_sizer->Add(0, 0, 0, wxLEFT, FromDIP(15));
|
||||
multiple_right_line_sizer->Add(multiple_right_nozzle_flow, 0, wxALIGN_CENTER, 0);
|
||||
multiple_right_line_sizer->Add(0, 0, 1, wxEXPAND, FromDIP(8));
|
||||
multiple_right_line_sizer->Add(multiple_right_nozzle_flow_checkbox, 0, wxALIGN_CENTER, 0);
|
||||
|
||||
multiple_sizer->Add(0, 0, 0, wxTOP, FromDIP(40));
|
||||
multiple_sizer->Add(leftTitle, 0, wxLEFT, FromDIP(18));
|
||||
multiple_sizer->Add(multiple_left_line_sizer, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, FromDIP(18));
|
||||
multiple_sizer->Add(0, 0, 0, wxTOP, FromDIP(40));
|
||||
multiple_sizer->Add(rightTitle, 0, wxLEFT, FromDIP(18));
|
||||
multiple_sizer->Add(multiple_right_line_sizer, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, FromDIP(18));
|
||||
multiple_sizer->Add(0, 0, 0, wxTOP, FromDIP(40));
|
||||
|
||||
multiple_panel->SetSizer(multiple_sizer);
|
||||
multiple_panel->Layout();
|
||||
multiple_panel->Fit();
|
||||
|
||||
sizer->Add(single_panel, 0, wxEXPAND, 0);
|
||||
sizer->Add(multiple_panel, 0, wxEXPAND, 0);
|
||||
SetSizer(sizer);
|
||||
Layout();
|
||||
Fit();
|
||||
|
||||
single_panel->Hide();
|
||||
|
||||
wxGetApp().UpdateDlgDarkUI(this);
|
||||
}
|
||||
|
||||
@ -555,8 +674,8 @@ void PrinterPartsDialog::set_nozzle_diameter(wxCommandEvent& evt)
|
||||
auto nozzle_diameter = std::stof(nozzle_diameter_checkbox->GetStringSelection().ToStdString());
|
||||
nozzle_diameter = round(nozzle_diameter * 10) / 10;
|
||||
|
||||
obj->m_nozzle_data.nozzles[0].diameter = nozzle_diameter;
|
||||
obj->m_nozzle_data.nozzles[0].type = nozzle_type;
|
||||
obj->m_extder_data.extders[0].diameter = nozzle_diameter;
|
||||
obj->m_extder_data.extders[0].type = nozzle_type;
|
||||
|
||||
obj->command_set_printer_nozzle(nozzle_type, nozzle_diameter);
|
||||
}
|
||||
@ -580,9 +699,12 @@ bool PrinterPartsDialog::Show(bool show)
|
||||
wxGetApp().UpdateDlgDarkUI(this);
|
||||
CentreOnParent();
|
||||
|
||||
if (obj->m_extder_data.extders.size() <= 1) {
|
||||
single_panel->Show();
|
||||
multiple_panel->Hide();
|
||||
|
||||
auto type = obj->m_nozzle_data.nozzles[0].type;
|
||||
auto diameter = obj->m_nozzle_data.nozzles[0].diameter;
|
||||
auto type = obj->m_extder_data.extders[0].type;
|
||||
auto diameter = obj->m_extder_data.extders[0].diameter;
|
||||
|
||||
nozzle_type_checkbox->Clear();
|
||||
nozzle_diameter_checkbox->Clear();
|
||||
@ -594,37 +716,133 @@ bool PrinterPartsDialog::Show(bool show)
|
||||
nozzle_type_checkbox->Disable();
|
||||
nozzle_diameter_checkbox->Disable();
|
||||
return DPIDialog::Show(show);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
nozzle_type_checkbox->Enable();
|
||||
nozzle_diameter_checkbox->Enable();
|
||||
}
|
||||
|
||||
last_nozzle_type = type;
|
||||
|
||||
for (int i=0; i < nozzle_type_map.size(); i++)
|
||||
{
|
||||
nozzle_type_checkbox->Append(nozzle_type_map_tr[i]);
|
||||
if (nozzle_type_map[i] == type) {
|
||||
nozzle_type_checkbox->SetSelection(i);
|
||||
}
|
||||
for (int i = 0; i < nozzle_type_map.size(); i++) {
|
||||
nozzle_type_checkbox->Append(nozzle_type_map[i]);
|
||||
if (nozzle_type_map[i] == type) { nozzle_type_checkbox->SetSelection(i); }
|
||||
}
|
||||
|
||||
std::map<int, float> diameter_list;
|
||||
if (type == "hardened_steel") {
|
||||
diameter_list = nozzle_hard_diameter_map;
|
||||
}
|
||||
else if (type == "stainless_steel") {
|
||||
} else if (type == "stainless_steel") {
|
||||
diameter_list = nozzle_stainless_diameter_map;
|
||||
}
|
||||
|
||||
for (int i = 0; i < diameter_list.size(); i++)
|
||||
{
|
||||
nozzle_diameter_checkbox->Append( wxString::Format(_L("%.1f"), diameter_list[i]));
|
||||
if (diameter_list[i] == diameter) {
|
||||
nozzle_diameter_checkbox->SetSelection(i);
|
||||
for (int i = 0; i < diameter_list.size(); i++) {
|
||||
nozzle_diameter_checkbox->Append(wxString::Format(_L("%.1f"), diameter_list[i]));
|
||||
if (diameter_list[i] == diameter) { nozzle_diameter_checkbox->SetSelection(i); }
|
||||
}
|
||||
|
||||
} else {
|
||||
single_panel->Hide();
|
||||
multiple_panel->Show();
|
||||
|
||||
//left
|
||||
auto type = obj->m_extder_data.extders[0].type;
|
||||
auto diameter = obj->m_extder_data.extders[0].diameter;
|
||||
auto flow_type = obj->m_extder_data.extders[0].flow_type;
|
||||
|
||||
multiple_left_nozzle_type_checkbox->Clear();
|
||||
multiple_left_nozzle_diameter_checkbox->Clear();
|
||||
multiple_left_nozzle_flow_checkbox->Clear();
|
||||
|
||||
if (type.empty()) {
|
||||
multiple_left_nozzle_type_checkbox->SetValue(wxEmptyString);
|
||||
multiple_left_nozzle_diameter_checkbox->SetValue(wxEmptyString);
|
||||
multiple_left_nozzle_flow_checkbox->SetValue(wxEmptyString);
|
||||
|
||||
multiple_left_nozzle_type_checkbox->Disable();
|
||||
multiple_left_nozzle_diameter_checkbox->Disable();
|
||||
multiple_left_nozzle_flow_checkbox->Disable();
|
||||
return DPIDialog::Show(show);
|
||||
} else {
|
||||
multiple_left_nozzle_type_checkbox->Enable();
|
||||
multiple_left_nozzle_diameter_checkbox->Enable();
|
||||
multiple_left_nozzle_flow_checkbox->Enable();
|
||||
}
|
||||
|
||||
//last_nozzle_type = type;
|
||||
|
||||
for (int i = 0; i < nozzle_type_map.size(); i++) {
|
||||
multiple_left_nozzle_type_checkbox->Append(nozzle_type_map[i]);
|
||||
if (nozzle_type_map[i] == type) { multiple_left_nozzle_type_checkbox->SetSelection(i); }
|
||||
}
|
||||
|
||||
std::map<int, float> diameter_list;
|
||||
if (type == "hardened_steel") {
|
||||
diameter_list = nozzle_hard_diameter_map;
|
||||
} else if (type == "stainless_steel") {
|
||||
diameter_list = nozzle_stainless_diameter_map;
|
||||
}
|
||||
|
||||
for (int i = 0; i < diameter_list.size(); i++) {
|
||||
multiple_left_nozzle_diameter_checkbox->Append(wxString::Format(_L("%.1f"), diameter_list[i]));
|
||||
if (diameter_list[i] == diameter) { multiple_left_nozzle_diameter_checkbox->SetSelection(i); }
|
||||
}
|
||||
|
||||
for (int i = 0; i < nozzle_flow_map.size(); i++) {
|
||||
multiple_left_nozzle_flow_checkbox->Append(nozzle_flow_map[i]);
|
||||
if (i == flow_type) { multiple_left_nozzle_flow_checkbox->SetSelection(i); }
|
||||
}
|
||||
|
||||
|
||||
//right
|
||||
type = obj->m_extder_data.extders[1].type;
|
||||
diameter = obj->m_extder_data.extders[1].diameter;
|
||||
flow_type = obj->m_extder_data.extders[1].flow_type;
|
||||
|
||||
multiple_right_nozzle_type_checkbox->Clear();
|
||||
multiple_right_nozzle_diameter_checkbox->Clear();
|
||||
multiple_right_nozzle_flow_checkbox->Clear();
|
||||
|
||||
if (type.empty()) {
|
||||
multiple_right_nozzle_type_checkbox->SetValue(wxEmptyString);
|
||||
multiple_right_nozzle_diameter_checkbox->SetValue(wxEmptyString);
|
||||
multiple_right_nozzle_flow_checkbox->SetValue(wxEmptyString);
|
||||
|
||||
multiple_right_nozzle_type_checkbox->Disable();
|
||||
multiple_right_nozzle_diameter_checkbox->Disable();
|
||||
multiple_right_nozzle_flow_checkbox->Disable();
|
||||
return DPIDialog::Show(show);
|
||||
} else {
|
||||
multiple_right_nozzle_type_checkbox->Enable();
|
||||
multiple_right_nozzle_diameter_checkbox->Enable();
|
||||
multiple_right_nozzle_flow_checkbox->Enable();
|
||||
}
|
||||
|
||||
// last_nozzle_type = type;
|
||||
|
||||
for (int i = 0; i < nozzle_type_map.size(); i++) {
|
||||
multiple_right_nozzle_type_checkbox->Append(nozzle_type_map[i]);
|
||||
if (nozzle_type_map[i] == type) { multiple_right_nozzle_type_checkbox->SetSelection(i); }
|
||||
}
|
||||
|
||||
diameter_list;
|
||||
if (type == "hardened_steel") {
|
||||
diameter_list = nozzle_hard_diameter_map;
|
||||
} else if (type == "stainless_steel") {
|
||||
diameter_list = nozzle_stainless_diameter_map;
|
||||
}
|
||||
|
||||
for (int i = 0; i < diameter_list.size(); i++) {
|
||||
multiple_right_nozzle_diameter_checkbox->Append(wxString::Format(_L("%.1f"), diameter_list[i]));
|
||||
if (diameter_list[i] == diameter) { multiple_right_nozzle_diameter_checkbox->SetSelection(i); }
|
||||
}
|
||||
|
||||
for (int i = 0; i < nozzle_flow_map.size(); i++) {
|
||||
multiple_right_nozzle_flow_checkbox->Append(nozzle_flow_map[i]);
|
||||
if (i == flow_type) { multiple_right_nozzle_flow_checkbox->SetSelection(i); }
|
||||
}
|
||||
}
|
||||
Layout();
|
||||
Fit();
|
||||
}
|
||||
return DPIDialog::Show(show);
|
||||
}
|
||||
|
@ -22,10 +22,24 @@ class PrinterPartsDialog : public DPIDialog
|
||||
{
|
||||
protected:
|
||||
MachineObject* obj{ nullptr };
|
||||
|
||||
ComboBox* nozzle_type_checkbox;
|
||||
ComboBox* nozzle_diameter_checkbox;
|
||||
|
||||
ComboBox* multiple_left_nozzle_type_checkbox;
|
||||
ComboBox *multiple_left_nozzle_diameter_checkbox;
|
||||
ComboBox *multiple_left_nozzle_flow_checkbox;
|
||||
|
||||
ComboBox *multiple_right_nozzle_type_checkbox;
|
||||
ComboBox *multiple_right_nozzle_diameter_checkbox;
|
||||
ComboBox *multiple_right_nozzle_flow_checkbox;
|
||||
|
||||
wxPanel *single_panel;
|
||||
wxPanel *multiple_panel;
|
||||
|
||||
std::string last_nozzle_type;
|
||||
std::map<int, std::string> nozzle_type_map;
|
||||
std::map<int, std::string> nozzle_flow_map;
|
||||
std::map<int, wxString> nozzle_type_map_tr;
|
||||
std::map<int, float> nozzle_stainless_diameter_map;
|
||||
std::map<int, float> nozzle_hard_diameter_map;
|
||||
|
@ -1957,8 +1957,8 @@ bool SelectMachineDialog::do_ams_mapping(MachineObject *obj_)
|
||||
int filament_result = 0;
|
||||
std::vector<bool> map_opt; //four values: use_left_ams, use_right_ams, use_left_ext, use_right_ext
|
||||
if (nozzle_nums > 1){
|
||||
//get nozzle property, the nozzles are same?
|
||||
if (true/*!can_hybrid_mapping(obj_->m_nozzle_data)*/){
|
||||
//get nozzle property, the extders are same?
|
||||
if (true/*!can_hybrid_mapping(obj_->m_extder_data)*/){
|
||||
std::vector<FilamentInfo> m_ams_mapping_result_left, m_ams_mapping_result_right;
|
||||
std::vector<FilamentInfo> m_filament_left, m_filament_right;
|
||||
for (auto it = m_filaments.begin(); it != m_filaments.end(); it++){
|
||||
@ -2150,14 +2150,14 @@ bool SelectMachineDialog::get_ams_mapping_result(std::string &mapping_array_str,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SelectMachineDialog::can_hybrid_mapping(NozzleData data) {
|
||||
if (data.total_nozzle_count <= 1 || data.nozzles.size() <= 1 || !wxGetApp().preset_bundle)
|
||||
bool SelectMachineDialog::can_hybrid_mapping(ExtderData data) {
|
||||
if (data.total_extder_count <= 1 || data.extders.size() <= 1 || !wxGetApp().preset_bundle)
|
||||
return false;
|
||||
|
||||
//The default two extruders are left, right, but the order of the extruders on the machine is right, left.
|
||||
//Therefore, some adjustments need to be made.
|
||||
std::vector<std::string>flow_type_of_machine;
|
||||
for (auto it = data.nozzles.rbegin(); it != data.nozzles.rend(); it++){
|
||||
for (auto it = data.extders.rbegin(); it != data.extders.rend(); it++){
|
||||
//exist field is not updated, wait add
|
||||
//if (it->exist < 3) return false;
|
||||
std::string type_str = it->flow_type ? "Big Traffic" : "Normal";
|
||||
@ -2202,13 +2202,13 @@ void SelectMachineDialog::auto_supply_with_ext(std::vector<AmsTray> slots) {
|
||||
}
|
||||
}
|
||||
|
||||
bool SelectMachineDialog::is_nozzle_type_match(NozzleData data) {
|
||||
if (data.total_nozzle_count <= 1 || data.nozzles.size() <= 1 || !wxGetApp().preset_bundle)
|
||||
bool SelectMachineDialog::is_nozzle_type_match(ExtderData data) {
|
||||
if (data.total_extder_count <= 1 || data.extders.size() <= 1 || !wxGetApp().preset_bundle)
|
||||
return false;
|
||||
|
||||
//The default two extruders are left, right, but the order of the extruders on the machine is right, left.
|
||||
std::vector<std::string>flow_type_of_machine;
|
||||
for (auto it = data.nozzles.rbegin(); it != data.nozzles.rend(); it++) {
|
||||
for (auto it = data.extders.rbegin(); it != data.extders.rend(); it++) {
|
||||
std::string str_flow = it->flow_type ? "Big Traffic" : "Normal";
|
||||
flow_type_of_machine.push_back(str_flow);
|
||||
}
|
||||
@ -2632,9 +2632,9 @@ bool SelectMachineDialog::is_same_nozzle_diameters(std::string& tag_nozzle_type,
|
||||
for (size_t idx = 0; idx < nozzle_type->size(); ++idx)
|
||||
preset_nozzle_types[idx] = NozzleTypeEumnToStr[NozzleType(nozzle_type->values[idx])];
|
||||
|
||||
std::vector<std::string> machine_nozzle_types(obj_->m_nozzle_data.nozzles.size());
|
||||
for (size_t idx = 0; idx < obj_->m_nozzle_data.nozzles.size(); ++idx)
|
||||
machine_nozzle_types[idx] = obj_->m_nozzle_data.nozzles[idx].type;
|
||||
std::vector<std::string> machine_nozzle_types(obj_->m_extder_data.extders.size());
|
||||
for (size_t idx = 0; idx < obj_->m_extder_data.extders.size(); ++idx)
|
||||
machine_nozzle_types[idx] = obj_->m_extder_data.extders[idx].type;
|
||||
|
||||
auto used_filaments = wxGetApp().plater()->get_partplate_list().get_curr_plate()->get_used_extruders(); // 1 based
|
||||
auto filament_maps=wxGetApp().plater()->get_partplate_list().get_curr_plate()->get_filament_maps(); // 1 based
|
||||
@ -2648,13 +2648,13 @@ bool SelectMachineDialog::is_same_nozzle_diameters(std::string& tag_nozzle_type,
|
||||
std::sort(used_extruders.begin(), used_extruders.end());
|
||||
|
||||
// TODO [tao wang] : add idx mapping
|
||||
tag_nozzle_type = obj_->m_nozzle_data.nozzles[0].type;
|
||||
tag_nozzle_type = obj_->m_extder_data.extders[0].type;
|
||||
|
||||
if (opt_nozzle_diameters != nullptr) {
|
||||
for (auto i = 0; i < used_extruders.size(); i++) {
|
||||
auto extruder = used_extruders[i];
|
||||
preset_nozzle_diameters = float(opt_nozzle_diameters->get_at(extruder));
|
||||
if (preset_nozzle_diameters != obj_->m_nozzle_data.nozzles[0].diameter) {
|
||||
if (preset_nozzle_diameters != obj_->m_extder_data.extders[0].diameter) {
|
||||
is_same_nozzle_diameters = false;
|
||||
}
|
||||
}
|
||||
@ -2684,10 +2684,10 @@ bool SelectMachineDialog::is_same_nozzle_type(std::string& filament_type, std::s
|
||||
|
||||
NozzleType nozzle_type = NozzleType::ntUndefine;
|
||||
|
||||
if (obj_->m_nozzle_data.nozzles[0].type == "stainless_steel") {
|
||||
if (obj_->m_extder_data.extders[0].type == "stainless_steel") {
|
||||
nozzle_type = NozzleType::ntStainlessSteel;
|
||||
}
|
||||
else if (obj_->m_nozzle_data.nozzles[0].type == "hardened_steel") {
|
||||
else if (obj_->m_extder_data.extders[0].type == "hardened_steel") {
|
||||
nozzle_type = NozzleType::ntHardenedSteel;
|
||||
}
|
||||
|
||||
@ -2708,7 +2708,7 @@ bool SelectMachineDialog::is_same_nozzle_type(std::string& filament_type, std::s
|
||||
return is_same_nozzle_type;
|
||||
}
|
||||
else {
|
||||
tag_nozzle_type = DeviceManager::nozzle_type_conver(obj_->m_nozzle_data.nozzles[0].type);
|
||||
tag_nozzle_type = DeviceManager::nozzle_type_conver(obj_->m_extder_data.extders[0].type);
|
||||
}
|
||||
|
||||
iter++;
|
||||
@ -2897,13 +2897,13 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event)
|
||||
std::string filament_type;
|
||||
std::string tag_nozzle_type;
|
||||
|
||||
if (!obj_->m_nozzle_data.nozzles[0].type.empty() && (m_print_type == PrintFromType::FROM_NORMAL)) {
|
||||
if (!obj_->m_extder_data.extders[0].type.empty() && (m_print_type == PrintFromType::FROM_NORMAL)) {
|
||||
if (!is_same_nozzle_diameters(tag_nozzle_type, nozzle_diameter)) {
|
||||
has_slice_warnings = true;
|
||||
is_printing_block = true;
|
||||
|
||||
wxString nozzle_in_preset = wxString::Format(_L("nozzle in preset: %s %s"),nozzle_diameter, "");
|
||||
wxString nozzle_in_printer = wxString::Format(_L("nozzle memorized: %.1f %s"), obj_->m_nozzle_data.nozzles[0].diameter, "");
|
||||
wxString nozzle_in_printer = wxString::Format(_L("nozzle memorized: %.1f %s"), obj_->m_extder_data.extders[0].diameter, "");
|
||||
|
||||
confirm_text.push_back(ConfirmBeforeSendInfo(_L("Your nozzle diameter in sliced file is not consistent with memorized nozzle. If you changed your nozzle lately, please go to Device > Printer Parts to change settings.")
|
||||
+ "\n " + nozzle_in_preset
|
||||
@ -2914,9 +2914,9 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event)
|
||||
if (!is_same_nozzle_type(filament_type, tag_nozzle_type)){
|
||||
has_slice_warnings = true;
|
||||
is_printing_block = true;
|
||||
nozzle_diameter = wxString::Format("%.1f", obj_->m_nozzle_data.nozzles[0].diameter).ToStdString();
|
||||
nozzle_diameter = wxString::Format("%.1f", obj_->m_extder_data.extders[0].diameter).ToStdString();
|
||||
|
||||
wxString nozzle_in_preset = wxString::Format(_L("Printing high temperature material(%s material) with %s may cause nozzle damage"), filament_type, format_steel_name(obj_->m_nozzle_data.nozzles[0].type));
|
||||
wxString nozzle_in_preset = wxString::Format(_L("Printing high temperature material(%s material) with %s may cause nozzle damage"), filament_type, format_steel_name(obj_->m_extder_data.extders[0].type));
|
||||
confirm_text.push_back(ConfirmBeforeSendInfo(nozzle_in_preset, ConfirmBeforeSendInfo::InfoLevel::Warning));
|
||||
}
|
||||
}
|
||||
@ -3906,7 +3906,7 @@ void SelectMachineDialog::update_show_status()
|
||||
size_t nozzle_nums = full_config.option<ConfigOptionFloatsNullable>("nozzle_diameter")->values.size();
|
||||
|
||||
//the nozzle type of preset and machine are different
|
||||
if (nozzle_nums > 1 && !is_nozzle_type_match(obj_->m_nozzle_data)) {
|
||||
if (nozzle_nums > 1 && !is_nozzle_type_match(obj_->m_extder_data)) {
|
||||
show_status(PrintDialogStatus::PrintStatusNozzleMatchInvalid);
|
||||
return;
|
||||
}
|
||||
@ -4456,7 +4456,7 @@ void SelectMachineDialog::reset_and_sync_ams_list()
|
||||
size_t nozzle_nums = full_config.option<ConfigOptionFloatsNullable>("nozzle_diameter")->values.size();
|
||||
if (nozzle_nums > 1)
|
||||
{
|
||||
if (obj_ && can_hybrid_mapping(obj_->m_nozzle_data))
|
||||
if (obj_ && can_hybrid_mapping(obj_->m_extder_data))
|
||||
{
|
||||
m_mapping_popup.set_show_type(ShowType::LEFT_AND_RIGHT);
|
||||
}
|
||||
|
@ -542,9 +542,9 @@ public:
|
||||
bool Show(bool show);
|
||||
bool do_ams_mapping(MachineObject* obj_);
|
||||
bool get_ams_mapping_result(std::string& mapping_array_str, std::string& mapping_array_str2, std::string& ams_mapping_info);
|
||||
bool can_hybrid_mapping(NozzleData data);
|
||||
bool can_hybrid_mapping(ExtderData data);
|
||||
void auto_supply_with_ext(std::vector<AmsTray> slots);
|
||||
bool is_nozzle_type_match(NozzleData data);
|
||||
bool is_nozzle_type_match(ExtderData data);
|
||||
|
||||
PrintFromType get_print_type() {return m_print_type;};
|
||||
wxString format_steel_name(std::string name);
|
||||
|
@ -61,6 +61,13 @@ enum PrintingTaskType {
|
||||
NOT_CLEAR
|
||||
};
|
||||
|
||||
enum ExtruderState {
|
||||
FILLED_LOAD,
|
||||
FILLED_UNLOAD,
|
||||
EMPTY_LOAD,
|
||||
EMPTY_UNLOAD
|
||||
};
|
||||
|
||||
struct ScoreData
|
||||
{
|
||||
int rating_id;
|
||||
@ -77,6 +84,58 @@ struct ScoreData
|
||||
|
||||
typedef std::function<void(BBLModelTask* subtask)> OnGetSubTaskFn;
|
||||
|
||||
class ExtruderImage : public wxWindow
|
||||
{
|
||||
ScalableBitmap *m_pipe_filled_load;
|
||||
ScalableBitmap *m_pipe_filled_unload;
|
||||
ScalableBitmap *m_pipe_empty_load;
|
||||
ScalableBitmap *m_pipe_empty_unload;
|
||||
|
||||
ScalableBitmap *m_pipe_filled_load_unselected;
|
||||
ScalableBitmap *m_pipe_filled_unload_unselected;
|
||||
ScalableBitmap *m_pipe_empty_load_unselected;
|
||||
ScalableBitmap *m_pipe_empty_unload_unselected;
|
||||
|
||||
ScalableBitmap *m_left_extruder_active_filled;
|
||||
ScalableBitmap *m_left_extruder_active_empty;
|
||||
ScalableBitmap *m_left_extruder_unactive_filled;
|
||||
ScalableBitmap *m_left_extruder_unactive_empty;
|
||||
ScalableBitmap *m_right_extruder_active_filled;
|
||||
ScalableBitmap *m_right_extruder_active_empty;
|
||||
ScalableBitmap *m_right_extruder_unactive_filled;
|
||||
ScalableBitmap *m_right_extruder_unactive_empty;
|
||||
|
||||
ScalableBitmap *m_extruder_single_nozzle_empty_load;
|
||||
ScalableBitmap *m_extruder_single_nozzle_empty_unload;
|
||||
ScalableBitmap *m_extruder_single_nozzle_filled_load;
|
||||
ScalableBitmap *m_extruder_single_nozzle_filled_unload;
|
||||
|
||||
ExtruderState m_left_ext_state = {ExtruderState::EMPTY_LOAD};
|
||||
ExtruderState m_right_ext_state = {ExtruderState::EMPTY_LOAD};
|
||||
ExtruderState m_single_ext_state = {ExtruderState::EMPTY_LOAD};
|
||||
|
||||
public:
|
||||
void update(int nozzle_num, int nozzle_id);
|
||||
void update(ExtruderState right_state, ExtruderState left_state);
|
||||
void msw_rescale();
|
||||
void setExtruderCount(int nozzle_num);
|
||||
void setExtruderUsed(std::string loc);
|
||||
void paintEvent(wxPaintEvent &evt);
|
||||
|
||||
void render(wxDC &dc);
|
||||
bool m_show_state = {false};
|
||||
int m_nozzle_num = 1;
|
||||
int current_nozzle_idx = 0;
|
||||
std::string current_nozzle_loc = "";
|
||||
wxColour m_colour;
|
||||
|
||||
string m_file_name;
|
||||
bool m_ams_loading{false};
|
||||
void doRender(wxDC &dc);
|
||||
ExtruderImage(wxWindow *parent, wxWindowID id, int nozzle_num, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize);
|
||||
~ExtruderImage();
|
||||
};
|
||||
|
||||
class ScoreDialog : public GUI::DPIDialog
|
||||
{
|
||||
public:
|
||||
@ -343,6 +402,9 @@ protected:
|
||||
ScalableButton *m_button_pause_resume;
|
||||
ScalableButton *m_button_abort;
|
||||
Button * m_button_clean;
|
||||
wxSimplebook* m_extruder_book;
|
||||
std::vector<ExtruderImage *> m_extruderImage;
|
||||
SwitchBoard * m_left_right_btn_panel;
|
||||
|
||||
wxStaticText * m_text_tasklist_caption;
|
||||
|
||||
@ -357,6 +419,8 @@ protected:
|
||||
StaticLine * m_line_nozzle;
|
||||
TempInput* m_tempCtrl_nozzle;
|
||||
int m_temp_nozzle_timeout{ 0 };
|
||||
TempInput* m_tempCtrl_nozzle_deputy;
|
||||
int m_temp_nozzle_deputy_timeout{ 0 };
|
||||
TempInput * m_tempCtrl_bed;
|
||||
int m_temp_bed_timeout {0};
|
||||
TempInput * m_tempCtrl_chamber;
|
||||
@ -368,8 +432,11 @@ protected:
|
||||
FanSwitchButton *m_switch_printing_fan;
|
||||
int m_switch_printing_fan_timeout{0};
|
||||
FanSwitchButton *m_switch_cham_fan;
|
||||
FanSwitchButton *m_switch_fan;
|
||||
int m_switch_cham_fan_timeout{0};
|
||||
wxPanel* m_switch_block_fan;
|
||||
int m_nozzle_num{ 0 };
|
||||
int m_current_nozzle_id{ 0 };
|
||||
|
||||
float m_fixed_aspect_ratio{1.8};
|
||||
|
||||
@ -379,12 +446,13 @@ protected:
|
||||
Button * m_bpButton_z_1;
|
||||
Button * m_bpButton_z_down_1;
|
||||
Button * m_bpButton_z_down_10;
|
||||
Button * m_button_unload;
|
||||
//Button * m_button_unload;
|
||||
wxStaticText * m_staticText_z_tip;
|
||||
wxStaticText * m_staticText_e;
|
||||
Label * m_extruder_label;
|
||||
Button * m_bpButton_e_10;
|
||||
Button * m_bpButton_e_down_10;
|
||||
StaticLine * m_temp_extruder_line;
|
||||
wxPanel * m_temp_temp_line;
|
||||
wxPanel * m_temp_extruder_line;
|
||||
wxBoxSizer* m_ams_list;
|
||||
wxStaticText * m_ams_debug;
|
||||
bool m_show_ams_group{false};
|
||||
@ -393,6 +461,7 @@ protected:
|
||||
StaticBox* m_ams_control_box;
|
||||
wxStaticBitmap *m_ams_extruder_img;
|
||||
wxStaticBitmap* m_bitmap_extruder_img;
|
||||
|
||||
wxPanel * m_panel_separator_right;
|
||||
wxPanel * m_panel_separotor_bottom;
|
||||
wxGridBagSizer *m_tasklist_info_sizer{nullptr};
|
||||
@ -449,7 +518,7 @@ public:
|
||||
wxBoxSizer *create_temp_control(wxWindow *parent);
|
||||
wxBoxSizer *create_misc_control(wxWindow *parent);
|
||||
wxBoxSizer *create_axis_control(wxWindow *parent);
|
||||
wxBoxSizer *create_bed_control(wxWindow *parent);
|
||||
wxPanel *create_bed_control(wxWindow *parent);
|
||||
wxBoxSizer *create_extruder_control(wxWindow *parent);
|
||||
|
||||
void reset_temp_misc_control();
|
||||
|
@ -2426,7 +2426,7 @@ AMSControl::AMSControl(wxWindow *parent, wxWindowID id, const wxPoint &pos, cons
|
||||
parse_object(obj);
|
||||
}
|
||||
|
||||
m_nozzle_data.total_nozzle_count = 1;
|
||||
m_extder_data.total_extder_count = 1;
|
||||
SetBackgroundColour(*wxWHITE);
|
||||
// normal mode
|
||||
Freeze();
|
||||
@ -2595,7 +2595,7 @@ AMSControl::AMSControl(wxWindow *parent, wxWindowID id, const wxPoint &pos, cons
|
||||
|
||||
|
||||
/*option mid*/
|
||||
m_extruder = new AMSextruder(m_amswin, wxID_ANY, m_nozzle_data.total_nozzle_count, wxDefaultPosition, AMS_EXTRUDER_SIZE);
|
||||
m_extruder = new AMSextruder(m_amswin, wxID_ANY, m_extder_data.total_extder_count, wxDefaultPosition, AMS_EXTRUDER_SIZE);
|
||||
m_sizer_option_mid->Add( m_extruder, 0, wxALIGN_CENTER, 0 );
|
||||
|
||||
|
||||
@ -2978,7 +2978,7 @@ std::string AMSControl::GetCurrentCan(std::string amsid)
|
||||
}
|
||||
|
||||
bool AMSControl::IsAmsInRightPanel(std::string ams_id) {
|
||||
if (m_nozzle_data.total_nozzle_count == 2){
|
||||
if (m_extder_data.total_extder_count == 2){
|
||||
if (m_ams_item_list.find(ams_id) != m_ams_item_list.end() && m_ams_item_list[ams_id]->m_info.nozzle_id == MAIN_NOZZLE_ID){
|
||||
return true;
|
||||
}
|
||||
@ -3429,10 +3429,10 @@ void AMSControl::CreateAmsDoubleNozzle()
|
||||
auto right_init_mode = findFirstMode(AMSPanelPos::RIGHT_PANEL);
|
||||
|
||||
|
||||
m_down_road->UpdateLeft(m_nozzle_data.total_nozzle_count, left_init_mode);
|
||||
m_down_road->UpdateRight(m_nozzle_data.total_nozzle_count, right_init_mode);
|
||||
m_down_road->UpdateLeft(m_extder_data.total_extder_count, left_init_mode);
|
||||
m_down_road->UpdateRight(m_extder_data.total_extder_count, right_init_mode);
|
||||
|
||||
m_extruder->updateNozzleNum(m_nozzle_data.total_nozzle_count);
|
||||
m_extruder->updateNozzleNum(m_extder_data.total_extder_count);
|
||||
|
||||
m_current_show_ams_left = m_item_ids[DEPUTY_NOZZLE_ID].size() > 0 ? m_item_ids[DEPUTY_NOZZLE_ID][0] : "";
|
||||
m_current_show_ams_right = m_item_ids[MAIN_NOZZLE_ID].size() > 0 ? m_item_ids[MAIN_NOZZLE_ID][0] : "";
|
||||
@ -3699,12 +3699,12 @@ std::vector<AMSinfo> AMSControl::GenerateSimulateData() {
|
||||
}
|
||||
|
||||
|
||||
void AMSControl::UpdateAms(std::vector<AMSinfo> ams_info, std::vector<AMSinfo>ext_info, NozzleData data, std::string dev_id, bool is_reset, bool test)
|
||||
void AMSControl::UpdateAms(std::vector<AMSinfo> ams_info, std::vector<AMSinfo>ext_info, ExtderData data, std::string dev_id, bool is_reset, bool test)
|
||||
{
|
||||
if (!test){
|
||||
// update item
|
||||
bool fresh = false;
|
||||
if (m_ams_info.size() == ams_info.size() && m_nozzle_data.total_nozzle_count == data.total_nozzle_count && m_dev_id == dev_id){
|
||||
if (m_ams_info.size() == ams_info.size() && m_extder_data.total_extder_count == data.total_extder_count && m_dev_id == dev_id){
|
||||
for (int i = 0; i < m_ams_info.size(); i++){
|
||||
if (m_ams_info[i].ams_id != ams_info[i].ams_id){
|
||||
fresh = true;
|
||||
@ -3718,11 +3718,11 @@ void AMSControl::UpdateAms(std::vector<AMSinfo> ams_info, std::vector<AMSinfo>ex
|
||||
m_ams_info = ams_info;
|
||||
m_ext_info.clear();
|
||||
m_ext_info = ext_info;
|
||||
m_nozzle_data = data;
|
||||
m_extder_data = data;
|
||||
m_dev_id = dev_id;
|
||||
if (fresh){
|
||||
ClearAms();
|
||||
if (m_nozzle_data.total_nozzle_count >= 2){
|
||||
if (m_extder_data.total_extder_count >= 2){
|
||||
CreateAmsDoubleNozzle();
|
||||
}else{
|
||||
CreateAmsSingleNozzle();
|
||||
@ -3799,10 +3799,10 @@ void AMSControl::UpdateAms(std::vector<AMSinfo> ams_info, std::vector<AMSinfo>ex
|
||||
m_ext_info[0].nozzle_id = MAIN_NOZZLE_ID;
|
||||
m_ext_info[1].ams_id = std::to_string(VIRTUAL_TRAY_DEPUTY_ID);
|
||||
m_ext_info[1].nozzle_id = DEPUTY_NOZZLE_ID;
|
||||
m_nozzle_data = data;
|
||||
m_extder_data = data;
|
||||
if (fresh){
|
||||
ClearAms();
|
||||
if (m_nozzle_data.total_nozzle_count >= 2) {
|
||||
if (m_extder_data.total_extder_count >= 2) {
|
||||
CreateAmsDoubleNozzle();
|
||||
}
|
||||
else {
|
||||
@ -3942,7 +3942,7 @@ void AMSControl::createAmsPanel(wxSimplebook* parent, int& idx, std::vector<AMSi
|
||||
book_sizer->Add(ams1, 0, wxLEFT, (book_panel->GetSize().x - ams1->GetSize().x) / 2);
|
||||
}
|
||||
else{
|
||||
auto ext_image = new AMSExtImage(book_panel, pos, &m_nozzle_data);
|
||||
auto ext_image = new AMSExtImage(book_panel, pos, &m_extder_data);
|
||||
book_sizer->Add(ams1, 0, wxLEFT, FromDIP(30));
|
||||
book_sizer->Add(ext_image, 0, wxEXPAND | wxLEFT, FromDIP(30));
|
||||
m_ext_image_list[infos[0].ams_id] = ext_image;
|
||||
@ -3969,7 +3969,7 @@ void AMSControl::createAmsPanel(wxSimplebook* parent, int& idx, std::vector<AMSi
|
||||
void AMSControl::AddAms(AMSinfo info, AMSPanelPos pos)
|
||||
{
|
||||
AmsItem* ams_item;
|
||||
if (m_nozzle_data.total_nozzle_count > 1){
|
||||
if (m_extder_data.total_extder_count > 1){
|
||||
if (info.nozzle_id == MAIN_NOZZLE_ID){
|
||||
createAms(m_simplebook_ams_right, m_right_page_index, info, AMSPanelPos::RIGHT_PANEL);
|
||||
}
|
||||
@ -3977,7 +3977,7 @@ void AMSControl::AddAms(AMSinfo info, AMSPanelPos pos)
|
||||
createAms(m_simplebook_ams_left, m_left_page_index, info, AMSPanelPos::LEFT_PANEL);
|
||||
}
|
||||
}
|
||||
else if (m_nozzle_data.total_nozzle_count == 1){
|
||||
else if (m_extder_data.total_extder_count == 1){
|
||||
createAms(m_simplebook_ams_left, m_left_page_index, info, AMSPanelPos::LEFT_PANEL);
|
||||
}
|
||||
m_simplebook_ams_left->Layout();
|
||||
@ -4009,7 +4009,7 @@ void AMSControl::AddAms(std::vector<AMSinfo>single_info, AMSPanelPos pos) {
|
||||
if (single_info.size() <= 0){
|
||||
return;
|
||||
}
|
||||
if (m_nozzle_data.total_nozzle_count == 2) {
|
||||
if (m_extder_data.total_extder_count == 2) {
|
||||
if (single_info[0].nozzle_id == MAIN_NOZZLE_ID) {
|
||||
createAmsPanel(m_simplebook_ams_right, m_right_page_index, single_info, AMSPanelPos::RIGHT_PANEL);
|
||||
}
|
||||
@ -4017,7 +4017,7 @@ void AMSControl::AddAms(std::vector<AMSinfo>single_info, AMSPanelPos pos) {
|
||||
createAmsPanel(m_simplebook_ams_left, m_left_page_index, single_info, AMSPanelPos::LEFT_PANEL);
|
||||
}
|
||||
}
|
||||
else if (m_nozzle_data.total_nozzle_count == 1) {
|
||||
else if (m_extder_data.total_extder_count == 1) {
|
||||
if (pos == AMSPanelPos::RIGHT_PANEL) {
|
||||
createAmsPanel(m_simplebook_ams_right, m_right_page_index, single_info, AMSPanelPos::RIGHT_PANEL);
|
||||
}
|
||||
@ -4166,12 +4166,12 @@ void AMSControl::SwitchAms(std::string ams_id)
|
||||
pos == AMSPanelPos::LEFT_PANEL ? m_simplebook_ams_left->SetSelection(item->m_selection) : m_simplebook_ams_right->SetSelection(item->m_selection);
|
||||
if (item->m_info.cans.size() == GENERIC_AMS_SLOT_NUM) {
|
||||
if (item->m_info.ams_type == AMSModel::AMS_LITE) {
|
||||
pos == AMSPanelPos::LEFT_PANEL ? m_down_road->UpdateLeft(m_nozzle_data.total_nozzle_count, AMSRoadShowMode::AMS_ROAD_MODE_AMS_LITE)
|
||||
: m_down_road->UpdateRight(m_nozzle_data.total_nozzle_count, AMSRoadShowMode::AMS_ROAD_MODE_AMS_LITE);
|
||||
pos == AMSPanelPos::LEFT_PANEL ? m_down_road->UpdateLeft(m_extder_data.total_extder_count, AMSRoadShowMode::AMS_ROAD_MODE_AMS_LITE)
|
||||
: m_down_road->UpdateRight(m_extder_data.total_extder_count, AMSRoadShowMode::AMS_ROAD_MODE_AMS_LITE);
|
||||
}
|
||||
else {
|
||||
pos == AMSPanelPos::LEFT_PANEL ? m_down_road->UpdateLeft(m_nozzle_data.total_nozzle_count, AMSRoadShowMode::AMS_ROAD_MODE_FOUR)
|
||||
: m_down_road->UpdateRight(m_nozzle_data.total_nozzle_count, AMSRoadShowMode::AMS_ROAD_MODE_FOUR);
|
||||
pos == AMSPanelPos::LEFT_PANEL ? m_down_road->UpdateLeft(m_extder_data.total_extder_count, AMSRoadShowMode::AMS_ROAD_MODE_FOUR)
|
||||
: m_down_road->UpdateRight(m_extder_data.total_extder_count, AMSRoadShowMode::AMS_ROAD_MODE_FOUR);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -4182,8 +4182,8 @@ void AMSControl::SwitchAms(std::string ams_id)
|
||||
break;
|
||||
}
|
||||
}
|
||||
pos == AMSPanelPos::LEFT_PANEL ? m_down_road->UpdateLeft(m_nozzle_data.total_nozzle_count, mode)
|
||||
: m_down_road->UpdateRight(m_nozzle_data.total_nozzle_count, mode);
|
||||
pos == AMSPanelPos::LEFT_PANEL ? m_down_road->UpdateLeft(m_extder_data.total_extder_count, mode)
|
||||
: m_down_road->UpdateRight(m_extder_data.total_extder_count, mode);
|
||||
if (pos == AMSPanelPos::LEFT_PANEL){
|
||||
m_down_road->UpdatePassRoad(item->m_info.current_can_id, AMSPanelPos::LEFT_PANEL, -1, AMSPassRoadSTEP::AMS_ROAD_STEP_NONE);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ protected:
|
||||
//std::map<std::string, AmsItem*> m_ams_extra_item_list;
|
||||
//std::map<std::string, Ams*> m_ams_list;
|
||||
|
||||
NozzleData m_nozzle_data;
|
||||
ExtderData m_extder_data;
|
||||
std::string m_dev_id;
|
||||
std::vector<std::vector<std::string>> m_item_ids{ {}, {} };
|
||||
std::vector<std::pair<string, string>> pair_id;
|
||||
@ -164,7 +164,7 @@ public:
|
||||
void CreateAmsDoubleNozzle();
|
||||
void CreateAmsSingleNozzle();
|
||||
void ClearAms();
|
||||
void UpdateAms(std::vector<AMSinfo> ams_info, std::vector<AMSinfo> ext_info, NozzleData data, std::string dev_id, bool is_reset = true, bool test = false);
|
||||
void UpdateAms(std::vector<AMSinfo> ams_info, std::vector<AMSinfo> ext_info, ExtderData data, std::string dev_id, bool is_reset = true, bool test = false);
|
||||
std::vector<AMSinfo> GenerateSimulateData();
|
||||
|
||||
void AddAms(AMSinfo info, AMSPanelPos pos = AMSPanelPos::LEFT_PANEL);
|
||||
|
@ -527,7 +527,7 @@ AMSextruderImage::~AMSextruderImage() {}
|
||||
Description:AMSExtImage upon ext lib
|
||||
**************************************************/
|
||||
|
||||
AMSExtImage::AMSExtImage(wxWindow* parent, AMSPanelPos ext_pos, NozzleData *data, wxWindowID id, const wxPoint& pos)
|
||||
AMSExtImage::AMSExtImage(wxWindow* parent, AMSPanelPos ext_pos, ExtderData *data, wxWindowID id, const wxPoint& pos)
|
||||
{
|
||||
if (data == nullptr){
|
||||
wxWindow::Create(parent, id, pos, AMS_HUMIDITY_SIZE);
|
||||
@ -538,7 +538,7 @@ AMSExtImage::AMSExtImage(wxWindow* parent, AMSPanelPos ext_pos, NozzleData *data
|
||||
|
||||
SetBackgroundColour(StateColor::darkModeColorFor(AMS_CONTROL_DEF_LIB_BK_COLOUR));
|
||||
m_ext_pos = ext_pos;
|
||||
if (data != nullptr) m_nozzle_data = data;
|
||||
if (data != nullptr) m_extder_data = data;
|
||||
|
||||
m_ams_ext_left = ScalableBitmap(this, "ext_image_left", 98);
|
||||
m_ams_ext_right = ScalableBitmap(this, "ext_image_right", 98);
|
||||
@ -595,13 +595,13 @@ void AMSExtImage::doRender(wxDC& dc)
|
||||
auto size = GetSize();
|
||||
dc.SetPen(*wxTRANSPARENT_PEN);
|
||||
//dc.DrawRectangle(0, FromDIP(5), size.x, size.y - FromDIP(5) - FromDIP(2));
|
||||
if (m_nozzle_data == nullptr){
|
||||
if (m_extder_data == nullptr){
|
||||
if (m_ext_show) {
|
||||
dc.DrawBitmap(m_ams_ext.bmp(), wxPoint((size.x - m_ams_ext.GetBmpSize().x) / 2, 0));
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (m_nozzle_data->total_nozzle_count < 2) {
|
||||
if (m_extder_data->total_extder_count < 2) {
|
||||
dc.DrawBitmap(m_ams_ext_single_nozzle.bmp(), wxPoint((size.x - m_ams_ext_right.GetBmpSize().x) / 2, (size.y - m_ams_ext_right.GetBmpSize().y) / 2));
|
||||
}
|
||||
else {
|
||||
|
@ -299,7 +299,7 @@ class AMSExtImage : public wxWindow
|
||||
{
|
||||
private:
|
||||
bool m_ext_show = true;
|
||||
NozzleData* m_nozzle_data = nullptr;
|
||||
ExtderData* m_extder_data = nullptr;
|
||||
AMSPanelPos m_ext_pos;
|
||||
public:
|
||||
void msw_rescale();
|
||||
@ -312,7 +312,7 @@ public:
|
||||
ScalableBitmap m_ams_ext_right;
|
||||
ScalableBitmap m_ams_ext_single_nozzle;
|
||||
void doRender(wxDC& dc);
|
||||
AMSExtImage(wxWindow* parent, AMSPanelPos ext_pos = AMSPanelPos::RIGHT_PANEL, NozzleData *data = nullptr,
|
||||
AMSExtImage(wxWindow* parent, AMSPanelPos ext_pos = AMSPanelPos::RIGHT_PANEL, ExtderData *data = nullptr,
|
||||
wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition);
|
||||
~AMSExtImage();
|
||||
};
|
||||
|
@ -279,7 +279,26 @@ void FanSwitchButton::render(wxDC& dc)
|
||||
ScalableBitmap& icon = GetValue() ? m_on : m_off;
|
||||
|
||||
//int content_height = icon.GetBmpHeight() + textSize.y + m_padding;
|
||||
int content_height = m_padding;
|
||||
|
||||
wxPoint pt = wxPoint(FromDIP(10), (size.y - icon.GetBmpHeight()) / 2);
|
||||
|
||||
if (icon.bmp().IsOk()) {
|
||||
dc.DrawBitmap(icon.bmp(), pt);
|
||||
pt.x += icon.GetBmpWidth() + FromDIP(9);
|
||||
}
|
||||
|
||||
wxString fan_txt = "Fan";
|
||||
dc.SetFont(::Label::Head_15);
|
||||
pt.y = FromDIP(9);
|
||||
dc.DrawText(fan_txt, pt);
|
||||
pt.y = size.y / 2 + FromDIP(3);
|
||||
wxString fan_num_txt = GetLabel();
|
||||
dc.SetFont(::Label::Body_11);
|
||||
dc.DrawText(fan_num_txt, pt);
|
||||
|
||||
|
||||
//int content_height = icon.GetBmpHeight() + textSize.y + m_padding;
|
||||
/*int content_height = m_padding;
|
||||
|
||||
wxPoint pt = wxPoint((size.x - icon.GetBmpWidth()) / 2, (size.y - content_height) / 2);
|
||||
|
||||
@ -322,7 +341,7 @@ void FanSwitchButton::render(wxDC& dc)
|
||||
|
||||
pt.x = (size.x - dc.GetTextExtent(speed).x) / 2;
|
||||
pt.y += FromDIP(1);
|
||||
dc.DrawText(speed, pt);
|
||||
dc.DrawText(speed, pt);*/
|
||||
}
|
||||
|
||||
void FanSwitchButton::Rescale()
|
||||
|
@ -155,3 +155,122 @@ void SwitchButton::update()
|
||||
{
|
||||
SetBitmap((GetValue() ? m_on : m_off).bmp());
|
||||
}
|
||||
|
||||
SwitchBoard::SwitchBoard(wxWindow *parent, wxString leftL, wxString right, wxSize size)
|
||||
: wxWindow(parent, wxID_ANY, wxDefaultPosition, size)
|
||||
{
|
||||
#ifdef __WINDOWS__
|
||||
SetDoubleBuffered(true);
|
||||
#endif //__WINDOWS__
|
||||
|
||||
SetBackgroundColour(*wxWHITE);
|
||||
leftLabel = leftL;
|
||||
rightLabel = right;
|
||||
|
||||
SetMinSize(size);
|
||||
SetMaxSize(size);
|
||||
|
||||
Bind(wxEVT_PAINT, &SwitchBoard::paintEvent, this);
|
||||
Bind(wxEVT_LEFT_DOWN, &SwitchBoard::on_left_down, this);
|
||||
|
||||
Bind(wxEVT_ENTER_WINDOW, [this](auto &e) { SetCursor(wxCURSOR_HAND); });
|
||||
Bind(wxEVT_LEAVE_WINDOW, [this](auto &e) { SetCursor(wxCURSOR_ARROW); });
|
||||
}
|
||||
|
||||
void SwitchBoard::updateState(wxString target)
|
||||
{
|
||||
if (target.empty()) {
|
||||
switch_left = false;
|
||||
switch_right = false;
|
||||
} else {
|
||||
if (target == "left") {
|
||||
switch_left = true;
|
||||
switch_right = false;
|
||||
} else if (target == "right") {
|
||||
switch_left = false;
|
||||
switch_right = true;
|
||||
}
|
||||
}
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void SwitchBoard::paintEvent(wxPaintEvent &evt)
|
||||
{
|
||||
wxPaintDC dc(this);
|
||||
render(dc);
|
||||
}
|
||||
|
||||
void SwitchBoard::render(wxDC &dc)
|
||||
{
|
||||
#ifdef __WXMSW__
|
||||
wxSize size = GetSize();
|
||||
wxMemoryDC memdc;
|
||||
wxBitmap bmp(size.x, size.y);
|
||||
memdc.SelectObject(bmp);
|
||||
memdc.Blit({0, 0}, size, &dc, {0, 0});
|
||||
|
||||
{
|
||||
wxGCDC dc2(memdc);
|
||||
doRender(dc2);
|
||||
}
|
||||
|
||||
memdc.SelectObject(wxNullBitmap);
|
||||
dc.DrawBitmap(bmp, 0, 0);
|
||||
#else
|
||||
doRender(dc);
|
||||
#endif
|
||||
}
|
||||
|
||||
void SwitchBoard::doRender(wxDC &dc)
|
||||
{
|
||||
dc.SetPen(*wxTRANSPARENT_PEN);
|
||||
dc.SetBrush(wxBrush(0xeeeeee));
|
||||
dc.DrawRoundedRectangle(0, 0, GetSize().x, GetSize().y, 8);
|
||||
|
||||
/*left*/
|
||||
if (switch_left) {
|
||||
dc.SetBrush(wxBrush(wxColour(0, 174, 66)));
|
||||
dc.DrawRoundedRectangle(0, 0, GetSize().x / 2, GetSize().y, 8);
|
||||
}
|
||||
|
||||
auto left_txt_size = dc.GetTextExtent(leftLabel);
|
||||
dc.SetFont(::Label::Body_13);
|
||||
if (switch_left) {
|
||||
dc.SetTextForeground(*wxWHITE);
|
||||
} else {
|
||||
dc.SetTextForeground(0x333333);
|
||||
}
|
||||
|
||||
dc.DrawText(leftLabel, wxPoint((GetSize().x / 2 - left_txt_size.x) / 2, (GetSize().y - left_txt_size.y) / 2));
|
||||
|
||||
/*right*/
|
||||
if (switch_right) {
|
||||
dc.SetBrush(wxBrush(wxColour(0, 174, 66)));
|
||||
dc.DrawRoundedRectangle(GetSize().x / 2, 0, GetSize().x / 2, GetSize().y, 8);
|
||||
}
|
||||
|
||||
auto right_txt_size = dc.GetTextExtent(rightLabel);
|
||||
dc.SetFont(::Label::Body_13);
|
||||
if (switch_right) {
|
||||
dc.SetTextForeground(*wxWHITE);
|
||||
} else {
|
||||
dc.SetTextForeground(0x333333);
|
||||
}
|
||||
dc.DrawText(rightLabel, wxPoint((GetSize().x / 2 - left_txt_size.x) / 2 + GetSize().x / 2, (GetSize().y - right_txt_size.y) / 2));
|
||||
|
||||
}
|
||||
|
||||
void SwitchBoard::on_left_down(wxMouseEvent &evt)
|
||||
{
|
||||
auto pos = ClientToScreen(evt.GetPosition());
|
||||
auto rect = ClientToScreen(wxPoint(0, 0));
|
||||
|
||||
if (pos.x > 0 && pos.x < rect.x + GetSize().x / 2) {
|
||||
switch_left = true;
|
||||
switch_right = false;
|
||||
} else {
|
||||
switch_left = false;
|
||||
switch_right = true;
|
||||
}
|
||||
Refresh();
|
||||
}
|
@ -5,6 +5,8 @@
|
||||
#include "StateColor.hpp"
|
||||
|
||||
#include <wx/tglbtn.h>
|
||||
#include "Label.hpp"
|
||||
#include "Button.hpp"
|
||||
|
||||
class SwitchButton : public wxBitmapToggleButton
|
||||
{
|
||||
@ -40,4 +42,23 @@ private:
|
||||
StateColor thumb_color;
|
||||
};
|
||||
|
||||
class SwitchBoard : public wxWindow
|
||||
{
|
||||
public:
|
||||
SwitchBoard(wxWindow *parent = NULL, wxString leftL = "", wxString right = "", wxSize size = wxDefaultSize);
|
||||
wxString leftLabel;
|
||||
wxString rightLabel;
|
||||
|
||||
void updateState(wxString target);
|
||||
|
||||
bool switch_left{false};
|
||||
bool switch_right{false};
|
||||
|
||||
public:
|
||||
void paintEvent(wxPaintEvent &evt);
|
||||
void render(wxDC &dc);
|
||||
void doRender(wxDC &dc);
|
||||
void on_left_down(wxMouseEvent &evt);
|
||||
};
|
||||
|
||||
#endif // !slic3r_GUI_SwitchButton_hpp_
|
||||
|
@ -31,11 +31,12 @@ TempInput::TempInput()
|
||||
SetFont(Label::Body_12);
|
||||
}
|
||||
|
||||
TempInput::TempInput(wxWindow *parent, int type, wxString text, wxString label, wxString normal_icon, wxString actice_icon, const wxPoint &pos, const wxSize &size, long style)
|
||||
TempInput::TempInput(wxWindow *parent, int type, wxString text, TempInputType input_type, wxString label, wxString normal_icon, wxString actice_icon, const wxPoint &pos, const wxSize &size, long style)
|
||||
: TempInput()
|
||||
{
|
||||
actice = false;
|
||||
temp_type = type;
|
||||
m_input_type = input_type;
|
||||
Create(parent, text, label, normal_icon, actice_icon, pos, size, style);
|
||||
}
|
||||
|
||||
@ -120,6 +121,8 @@ void TempInput::Create(wxWindow *parent, wxString text, wxString label, wxString
|
||||
text_ctrl->SetForegroundColour(StateColor::darkModeColorFor(*wxBLACK));
|
||||
if (!normal_icon.IsEmpty()) { this->normal_icon = ScalableBitmap(this, normal_icon.ToStdString(), 16); }
|
||||
if (!actice_icon.IsEmpty()) { this->actice_icon = ScalableBitmap(this, actice_icon.ToStdString(), 16); }
|
||||
this->left_icon = ScalableBitmap(this, "L", 16);
|
||||
this->right_icon = ScalableBitmap(this, "R", 16);
|
||||
this->degree_icon = ScalableBitmap(this, "degree", 16);
|
||||
messureSize();
|
||||
}
|
||||
@ -194,6 +197,10 @@ void TempInput::SetCurrTemp(wxString temp)
|
||||
}
|
||||
}
|
||||
|
||||
void TempInput::SetCurrType(TempInputType type) {
|
||||
m_input_type = type;
|
||||
}
|
||||
|
||||
void TempInput::Warning(bool warn, WarningType type)
|
||||
{
|
||||
warning_mode = warn;
|
||||
@ -294,6 +301,8 @@ void TempInput::Rescale()
|
||||
{
|
||||
if (this->normal_icon.bmp().IsOk()) this->normal_icon.msw_rescale();
|
||||
if (this->degree_icon.bmp().IsOk()) this->degree_icon.msw_rescale();
|
||||
if (this->left_icon.bmp().IsOk()) this->left_icon.msw_rescale();
|
||||
if (this->right_icon.bmp().IsOk()) this->right_icon.msw_rescale();
|
||||
messureSize();
|
||||
}
|
||||
|
||||
@ -326,6 +335,7 @@ void TempInput::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
wxWindow::DoSetSize(x, y, width, height, sizeFlags);
|
||||
if (sizeFlags & wxSIZE_USE_EXISTING) return;
|
||||
|
||||
padding_left = FromDIP(10);
|
||||
auto left = padding_left;
|
||||
wxClientDC dc(this);
|
||||
if (normal_icon.bmp().IsOk()) {
|
||||
@ -336,6 +346,11 @@ void TempInput::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
// interval
|
||||
left += 9;
|
||||
|
||||
if (m_input_type == TEMP_OF_MAIN_NOZZLE_TYPE || m_input_type == TEMP_OF_DEPUTY_NOZZLE_TYPE) {
|
||||
wxSize szIcon = left_icon.GetBmpSize();
|
||||
left += szIcon.x + 3;
|
||||
}
|
||||
|
||||
// label
|
||||
dc.SetFont(::Label::Head_14);
|
||||
labelSize = dc.GetMultiLineTextExtent(wxWindow::GetLabel());
|
||||
@ -389,21 +404,53 @@ void TempInput::render(wxDC &dc)
|
||||
|
||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||
// start draw
|
||||
padding_left = FromDIP(10);
|
||||
wxPoint pt = {padding_left, 0};
|
||||
wxSize szIcon;
|
||||
if (normal_icon.bmp().IsOk()) szIcon = normal_icon.GetBmpSize();
|
||||
else if (actice_icon.bmp().IsOk()) szIcon = actice_icon.GetBmpSize();
|
||||
|
||||
if (m_input_type != TEMP_OF_DEPUTY_NOZZLE_TYPE) {
|
||||
if (actice_icon.bmp().IsOk() && actice) {
|
||||
wxSize szIcon = actice_icon.GetBmpSize();
|
||||
szIcon = actice_icon.GetBmpSize();
|
||||
pt.y = (size.y - szIcon.y) / 2;
|
||||
dc.DrawBitmap(actice_icon.bmp(), pt);
|
||||
pt.x += szIcon.x + 9;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
actice = false;
|
||||
}
|
||||
|
||||
if (normal_icon.bmp().IsOk() && !actice) {
|
||||
wxSize szIcon = normal_icon.GetBmpSize();
|
||||
szIcon = normal_icon.GetBmpSize();
|
||||
pt.y = (size.y - szIcon.y) / 2;
|
||||
dc.DrawBitmap(normal_icon.bmp(), pt);
|
||||
}
|
||||
}
|
||||
|
||||
pt.x += szIcon.x + 9;
|
||||
if (left_icon.bmp().IsOk() && m_input_type == TEMP_OF_DEPUTY_NOZZLE_TYPE){
|
||||
wxSize szIcon = left_icon.GetBmpSize();
|
||||
pt.y = (size.y - szIcon.y) / 2;
|
||||
dc.DrawBitmap(left_icon.bmp(), pt);
|
||||
|
||||
dc.SetFont(::Label::Body_12);
|
||||
auto sepSize = dc.GetMultiLineTextExtent(wxString("L"));
|
||||
dc.SetTextForeground(*wxWHITE);
|
||||
dc.SetTextBackground(*wxWHITE);
|
||||
dc.DrawText(wxString("L"), pt.x + (szIcon.x - sepSize.x) / 2, (size.y - sepSize.y) / 2);
|
||||
pt.x += szIcon.x + 3;
|
||||
}
|
||||
|
||||
if (right_icon.bmp().IsOk() && m_input_type == TEMP_OF_MAIN_NOZZLE_TYPE) {
|
||||
wxSize szIcon = right_icon.GetBmpSize();
|
||||
pt.y = (size.y - szIcon.y) / 2;
|
||||
dc.DrawBitmap(right_icon.bmp(), pt);
|
||||
|
||||
dc.SetFont(::Label::Body_12);
|
||||
auto sepSize = dc.GetMultiLineTextExtent(wxString("L"));
|
||||
dc.SetTextForeground(*wxWHITE);
|
||||
dc.SetTextBackground(*wxWHITE);
|
||||
dc.DrawText(wxString("R"), pt.x + (szIcon.x - sepSize.x) / 2, (size.y - sepSize.y) / 2);
|
||||
pt.x += szIcon.x + 3;
|
||||
}
|
||||
|
||||
// label
|
||||
@ -472,6 +519,12 @@ void TempInput::messureMiniSize()
|
||||
// interval
|
||||
width += 9;
|
||||
|
||||
if (m_input_type == TEMP_OF_MAIN_NOZZLE_TYPE || m_input_type == TEMP_OF_DEPUTY_NOZZLE_TYPE) {
|
||||
wxSize szIcon = left_icon.GetBmpSize();
|
||||
width += szIcon.x;
|
||||
}
|
||||
width += 3;
|
||||
|
||||
// label
|
||||
dc.SetFont(::Label::Head_14);
|
||||
labelSize = dc.GetMultiLineTextExtent(wxWindow::GetLabel());
|
||||
@ -526,6 +579,12 @@ void TempInput::messureSize()
|
||||
// interval
|
||||
width += 9;
|
||||
|
||||
if (m_input_type == TEMP_OF_MAIN_NOZZLE_TYPE || m_input_type == TEMP_OF_DEPUTY_NOZZLE_TYPE) {
|
||||
wxSize szIcon = left_icon.GetBmpSize();
|
||||
width += szIcon.x;
|
||||
}
|
||||
width += 3;
|
||||
|
||||
// label
|
||||
dc.SetFont(::Label::Head_14);
|
||||
labelSize = dc.GetMultiLineTextExtent(wxWindow::GetLabel());
|
||||
|
@ -8,6 +8,12 @@
|
||||
|
||||
wxDECLARE_EVENT(wxCUSTOMEVT_SET_TEMP_FINISH, wxCommandEvent);
|
||||
|
||||
enum TempInputType {
|
||||
TEMP_OF_MAIN_NOZZLE_TYPE,
|
||||
TEMP_OF_DEPUTY_NOZZLE_TYPE,
|
||||
TEMP_OF_NORMAL_TYPE
|
||||
};
|
||||
|
||||
class TempInput : public wxNavigationEnabled<StaticBox>
|
||||
{
|
||||
bool hover;
|
||||
@ -18,6 +24,9 @@ class TempInput : public wxNavigationEnabled<StaticBox>
|
||||
ScalableBitmap actice_icon;
|
||||
ScalableBitmap degree_icon;
|
||||
|
||||
ScalableBitmap left_icon;
|
||||
ScalableBitmap right_icon;
|
||||
|
||||
StateColor label_color;
|
||||
StateColor text_color;
|
||||
|
||||
@ -27,6 +36,7 @@ class TempInput : public wxNavigationEnabled<StaticBox>
|
||||
int max_temp = 0;
|
||||
int min_temp = 0;
|
||||
bool warning_mode = false;
|
||||
TempInputType m_input_type;
|
||||
|
||||
int padding_left = 0;
|
||||
static const int TempInputWidth = 200;
|
||||
@ -43,6 +53,7 @@ public:
|
||||
TempInput(wxWindow * parent,
|
||||
int type,
|
||||
wxString text,
|
||||
TempInputType input_type,
|
||||
wxString label = "",
|
||||
wxString normal_icon = "",
|
||||
wxString actice_icon = "",
|
||||
@ -73,6 +84,7 @@ public:
|
||||
|
||||
void SetCurrTemp(int temp);
|
||||
void SetCurrTemp(wxString temp);
|
||||
void SetCurrType(TempInputType type);
|
||||
|
||||
bool AllisNum(std::string str);
|
||||
void SetFinish();
|
||||
|
@ -113,9 +113,9 @@ static bool is_same_nozzle_diameters(const DynamicPrintConfig &full_config, cons
|
||||
for (size_t idx = 0; idx < opt_nozzle_diameters->size(); ++idx)
|
||||
config_nozzle_diameters[idx] = opt_nozzle_diameters->values[idx];
|
||||
|
||||
std::vector<float> machine_nozzle_diameters(obj->m_nozzle_data.nozzles.size());
|
||||
for (size_t idx = 0; idx < obj->m_nozzle_data.nozzles.size(); ++idx)
|
||||
machine_nozzle_diameters[idx] = obj->m_nozzle_data.nozzles[idx].diameter;
|
||||
std::vector<float> machine_nozzle_diameters(obj->m_extder_data.extders.size());
|
||||
for (size_t idx = 0; idx < obj->m_extder_data.extders.size(); ++idx)
|
||||
machine_nozzle_diameters[idx] = obj->m_extder_data.extders[idx].diameter;
|
||||
|
||||
if (config_nozzle_diameters.size() != machine_nozzle_diameters.size()) {
|
||||
wxString nozzle_in_preset = wxString::Format(_L("nozzle size in preset: %d"), config_nozzle_diameters.size());
|
||||
@ -147,9 +147,9 @@ static bool is_same_nozzle_type(const DynamicPrintConfig &full_config, const Mac
|
||||
|
||||
NozzleType nozzle_type = NozzleType::ntUndefine;
|
||||
|
||||
if (obj->m_nozzle_data.nozzles[0].type == "stainless_steel") {
|
||||
if (obj->m_extder_data.extders[0].type == "stainless_steel") {
|
||||
nozzle_type = NozzleType::ntStainlessSteel;
|
||||
} else if (obj->m_nozzle_data.nozzles[0].type == "hardened_steel") {
|
||||
} else if (obj->m_extder_data.extders[0].type == "hardened_steel") {
|
||||
nozzle_type = NozzleType::ntHardenedSteel;
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ static bool is_same_nozzle_type(const DynamicPrintConfig &full_config, const Mac
|
||||
if (abs(filament_nozzle_hrc) > abs(printer_nozzle_hrc)) {
|
||||
BOOST_LOG_TRIVIAL(info) << "filaments hardness mismatch: printer_nozzle_hrc = " << printer_nozzle_hrc << ", filament_nozzle_hrc = " << filament_nozzle_hrc;
|
||||
std::string filament_type = full_config.opt_string("filament_type", 0);
|
||||
error_msg = wxString::Format(_L("*Printing %s material with %s may cause nozzle damage"), filament_type, to_wstring_name(obj->m_nozzle_data.nozzles[0].type));
|
||||
error_msg = wxString::Format(_L("*Printing %s material with %s may cause nozzle damage"), filament_type, to_wstring_name(obj->m_extder_data.extders[0].type));
|
||||
error_msg += "\n";
|
||||
|
||||
MessageDialog msg_dlg(nullptr, error_msg, wxEmptyString, wxICON_WARNING | wxOK | wxCANCEL);
|
||||
@ -192,7 +192,7 @@ static bool check_nozzle_diameter_and_type(const DynamicPrintConfig &full_config
|
||||
}
|
||||
|
||||
// P1P/S
|
||||
if (obj->m_nozzle_data.nozzles[0].type.empty())
|
||||
if (obj->m_extder_data.extders[0].type.empty())
|
||||
return true;
|
||||
|
||||
if (!is_same_nozzle_diameters(full_config, obj, error_msg))
|
||||
|