{"id":483,"date":"2022-08-30T18:32:46","date_gmt":"2022-08-30T18:32:46","guid":{"rendered":"https:\/\/mechied.com\/?post_type=portfolio&#038;p=483"},"modified":"2022-08-31T23:06:31","modified_gmt":"2022-08-31T23:06:31","slug":"auto-kaizen","status":"publish","type":"portfolio","link":"https:\/\/mechied.com\/index.php\/portfolio\/auto-kaizen\/","title":{"rendered":"Auto-Kaizen"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"309\" src=\"https:\/\/mechied.com\/wp-content\/uploads\/2022\/08\/layoutTest_drawer_1-500x309.png\" alt=\"\" class=\"wp-image-484\" srcset=\"https:\/\/mechied.com\/wp-content\/uploads\/2022\/08\/layoutTest_drawer_1-500x309.png 500w, https:\/\/mechied.com\/wp-content\/uploads\/2022\/08\/layoutTest_drawer_1-300x185.png 300w, https:\/\/mechied.com\/wp-content\/uploads\/2022\/08\/layoutTest_drawer_1-768x475.png 768w, https:\/\/mechied.com\/wp-content\/uploads\/2022\/08\/layoutTest_drawer_1-400x247.png 400w, https:\/\/mechied.com\/wp-content\/uploads\/2022\/08\/layoutTest_drawer_1-600x371.png 600w, https:\/\/mechied.com\/wp-content\/uploads\/2022\/08\/layoutTest_drawer_1-800x495.png 800w, https:\/\/mechied.com\/wp-content\/uploads\/2022\/08\/layoutTest_drawer_1.png 1006w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Auto-Kaizen is a Python tool for automatically creating <a href=\"https:\/\/www.google.com\/search?q=kaizen+foam&amp;rlz=1C1GCEA_enUS957US957&amp;sxsrf=ALiCzsbK6PyCy5u6SbNo_4ls-rHEt0OD_g:1652149952273&amp;source=lnms&amp;tbm=isch&amp;sa=X&amp;sqi=2&amp;ved=2ahUKEwjpg5WY8tP3AhVDgRoKHSlLAvQQ_AUoA3oECAEQBQ&amp;biw=1680&amp;bih=939&amp;dpr=1\" data-type=\"URL\" data-id=\"https:\/\/www.google.com\/search?q=kaizen+foam&amp;rlz=1C1GCEA_enUS957US957&amp;sxsrf=ALiCzsbK6PyCy5u6SbNo_4ls-rHEt0OD_g:1652149952273&amp;source=lnms&amp;tbm=isch&amp;sa=X&amp;sqi=2&amp;ved=2ahUKEwjpg5WY8tP3AhVDgRoKHSlLAvQQ_AUoA3oECAEQBQ&amp;biw=1680&amp;bih=939&amp;dpr=1\">kaizen foam tool layouts<\/a> using a mySQL driven tool database.  Kaizen foam layouts are inserts for tool drawers where each tool has a designated cutout to keep inventory organized. I made this for practice working with SQL databases.  The project github is <a href=\"https:\/\/github.com\/daleshort\/auto_kaizen\" data-type=\"URL\" data-id=\"https:\/\/github.com\/daleshort\/auto_kaizen\">here<\/a>. The tool data is initially stored in excel spreadsheets but then transferred to the database. Database queries are then used to pull the correct data to create a DXF file of the tool layout for each drawer.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>tools.xlsx is a spreadsheet of tools<\/li><li>manufacturers.xslx is a mapping of manufacturer numbers to manufacturer names<\/li><li>drawers.xlsx stores the drawer numbers and dimensions<\/li><li>drawer_to_tools.xlsx stores what tools are in what drawer<\/li><li>profiles.xlsx is a sheet of profile numbers mapped to file locations of a DXF graphic outline of that tool.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">tool_mgr.py is the main script. It calls sql_mgr.py which creates the database pytools and tables that match the excel files (a mySQL database must be available to the script). tool_mgr.py then queries the database for a list of drawers and then for each drawer executes a SQL query that returns a list of tool profile DXF files that should be added to the particular drawer layout. The dxf_combiner.py then arranges the profiles into a single DXF file to be used as the foam insert artwork for that drawer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I used <a href=\"https:\/\/www.w3schools.com\/python\/python_mysql_getstarted.asp\" data-type=\"URL\" data-id=\"https:\/\/www.w3schools.com\/python\/python_mysql_getstarted.asp\">this tutorial<\/a> for setting up the mySQL database and my-sql-connector. This script also uses <a href=\"https:\/\/github.com\/mozman\/ezdxf\" data-type=\"URL\" data-id=\"https:\/\/github.com\/mozman\/ezdxf\">ezdxf<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python tool for automatically creating kaizen foam tool layouts using a mySQL driven tool database<\/p>\n","protected":false},"author":1,"featured_media":484,"menu_order":6,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"_vp_format_video_url":"","_vp_image_focal_point":[],"footnotes":""},"portfolio_category":[7,14],"portfolio_tag":[],"class_list":["post-483","portfolio","type-portfolio","status-publish","format-standard","has-post-thumbnail","hentry","portfolio_category-python","portfolio_category-sql"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mechied.com\/index.php\/wp-json\/wp\/v2\/portfolio\/483","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mechied.com\/index.php\/wp-json\/wp\/v2\/portfolio"}],"about":[{"href":"https:\/\/mechied.com\/index.php\/wp-json\/wp\/v2\/types\/portfolio"}],"author":[{"embeddable":true,"href":"https:\/\/mechied.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":3,"href":"https:\/\/mechied.com\/index.php\/wp-json\/wp\/v2\/portfolio\/483\/revisions"}],"predecessor-version":[{"id":488,"href":"https:\/\/mechied.com\/index.php\/wp-json\/wp\/v2\/portfolio\/483\/revisions\/488"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mechied.com\/index.php\/wp-json\/wp\/v2\/media\/484"}],"wp:attachment":[{"href":"https:\/\/mechied.com\/index.php\/wp-json\/wp\/v2\/media?parent=483"}],"wp:term":[{"taxonomy":"portfolio_category","embeddable":true,"href":"https:\/\/mechied.com\/index.php\/wp-json\/wp\/v2\/portfolio_category?post=483"},{"taxonomy":"portfolio_tag","embeddable":true,"href":"https:\/\/mechied.com\/index.php\/wp-json\/wp\/v2\/portfolio_tag?post=483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}