{"id":184,"date":"2021-07-04T17:26:59","date_gmt":"2021-07-04T09:26:59","guid":{"rendered":"https:\/\/www.nxpcb.com\/?p=184"},"modified":"2021-07-04T17:35:38","modified_gmt":"2021-07-04T09:35:38","slug":"cam%e8%b5%84%e6%96%99%e9%92%bb%e5%ad%94%e7%b3%bb%e6%95%b0%e8%ae%be%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/www.nxpcb.com\/?p=184","title":{"rendered":"CAM\u8d44\u6599\u94bb\u5b54\u7cfb\u6570\u8bbe\u7f6e"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>CAM\u5728\u5236\u4f5c\u5de5\u5177\u4e2d\uff0c\u56e0\u751f\u4ea7\u5de5\u827a\u9700\u8981\u8003\u8651\u7269\u7406\u7279\u6027\uff0c\u9700\u8981\u63d0\u524d\u9884\u8bbe\u6da8\u7f29\u7cfb\u6570\u3002\u5176\u4e2d\u94bb\u5b54\u4e3a\u4e86\u51cf\u5c11\u94bb\u5b54\u6570\u91cf\uff0c\u9700\u8981\u4ee5\u4e07\u5206\u4e4b\u51e0\u7684\u63cf\u8ff0<\/p><\/blockquote>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/udgNWtFxpM0X4zoW5yEpRnflrxVqXPp5oCHAYnzPGcB5icBicPUat6nJwA4NylIaiceFcSu43qXoMjlolyTEVfLRQ\/640?wx_fmt=png\" alt=\"\"\/><\/figure>\n\n\n\n<p>CAM\u5728\u4f5c\u4e1a\u4e2d\uff0c\u7ecf\u5e38\u9047\u5230\u5fd8\u8bb0\u4fee\u6539\u677f\u8fb9\u7cfb\u6570\uff0c\u6362\u7b97\u9519\u8bef\u7b49\u70e6\u607c\uff0c\u672c\u6587\u4ee5\u89e3\u51b3\u6b64\u70e6\u607c\u63a2\u8ba8\u5982\u4f55\u89e3\u51b3\u8fd9\u4e9b\u9700\u6c42\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">01 \u5b9e\u73b0\u539f\u7406<\/h2>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u4ee5ODB++\u683c\u5f0f\u5b58\u50a8\u7684Genesis\u8f6f\u4ef6\u4e2d\uff0c\u4f7f\u7528.comment\u5c5e\u6027\uff08\u53ef\u4ee5\u81ea\u884c\u6dfb\u52a0\u81ea\u5b9a\u4e49\u7684\u5c5e\u6027\uff09\uff0c\u914d\u5408line hooks \u5728output\u65f6\u8ba1\u7b97\u94bb\u5b54\u683c\u5f0f\u7cfb\u6570\u5e76\u66f4\u65b0.comment\u5c5e\u6027\u503c\uff0c\u5b9e\u73b0\u52a8\u6001\u7684\u6548\u679c\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">02 \u4fee\u6539\u6d41\u7a0b<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/udgNWtFxpM0X4zoW5yEpRnflrxVqXPp51M4ajRLLYnOWqnYCHmxLqhKbpSjBzuDKibUicagrOpxc6uUnODr2mKzQ\/640?wx_fmt=png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">03 \u8bbe\u7f6ehooks<\/h2>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; \u8fd9\u91cc\u4ee5\u8bbe\u7f6eoutput_layer_set.pre\u8f93\u51fa\u94bb\u5b54\u4e3a\u4f8b\u8bf4\u660e\uff0c\u5176\u4ed6\u7684\u5b9e\u73b0\u65b9\u5f0f\u53ef\u4ee5\u6269\u5c55\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/csh\n#File Name: output_layer_set.pre\n#Written  : Alex(wangge@nengxingtech.com)\n#Date     : Jun26.2021\n#Ver      : 1.0\n#\u7a0b\u5e8f\u7528\u4e8e\u4fee\u6539\u8f93\u51fa\u65f6\u76f8\u5173\u5230\u53d8\u91cf\n\u200b\n#\u83b7\u53d6\u7cfb\u7edf\u4f20\u9012\u7684\u53c2\u6570\nsource $1\n\u200b\n#\u6839\u636e\u5c42\u540d\u5224\u65ad\u662f\u5426\u4e3a\u94bb\u5b54\u5c42\nif($lnVAL&#91;1] == 'drl') then\n  \n  #\u8ba1\u7b97x\u6da8\u7f29\u503c\n  set inputscalex = `echo \"scale=0; $lnVAL&#91;4] * 100000\" | bc | awk -F '.' '{print $1}'`\n  if ($inputscalex &gt; 100000 ) then\n    set scalex = `echo \"scale=3; ($inputscalex - 100000) * 0.1\" | bc`\n  else if ($inputscalex &lt; 100000 ) then\n    set scalex = `echo \"scale=3; (100000 - $inputscalex) * 0.1\" | bc`\n    set scalex = -${scalex}\n  else\n    set scalex = 0\n  endif\n  \n  #\u8ba1\u7b97y\u6da8\u7f29\u503c\n  set inputscaley = `echo \"scale=0; $lnVAL&#91;5] * 100000\" | bc | awk -F '.' '{print $1}'`\n  if ($inputscaley &gt; 100000 ) then\n    set scaley = `echo \"scale=3; ($inputscaley - 100000) * 0.1\" | bc`\n  else if ($inputscaley &lt; 100000 ) then\n    set scaley = `echo \"scale=3; (100000 - $inputscaley) * 0.1\" | bc`\n    set scaley = -${scaley}\n  else\n    set scaley = 0\n  endif\n  \n  #\u7ec4\u5408\u6da8\u7f29\u503c\u63cf\u8ff0\n  set drlscale = \"X${scalex}Y${scaley}\"\n  \n  #\u8bbe\u7f6e\u94bb\u5b54\u6da8\u7f29\u503c\u5230\u5c42\u7684\u53d8\u91cf\n  COM set_attribute, type=layer,job=$JOB,name1=$STEP,name2=$lnVAL&#91;1],\\\n             name3=,attribute=.comment,value=$drlscale\nendif\n\u200b\n#\u9000\u51fa\u7a0b\u5e8f\nexit<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">04 \u8bbe\u7f6e\u94bb\u5b54\u5c42\u7cfb\u6570\u53d8\u91cf<\/h2>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; \u5728Panel\u5c01\u8fb9\u7684\u65f6\u5019\u6dfb\u52a0\u94bb\u5b54\u5b57\u9ea6\u5230\u7559\u8fb9\uff0c\u6216\u8005\u624b\u52a8\u6dfb\u52a0\u4e5f\u53ef\u4ee5\u3002\u8fd9\u91cc\u4ee5.comment\u4e3e\u4f8b\u8bf4\u660e\uff0c\u53ef\u4ee5\u6dfb\u52a0\u81ea\u5b9a\u4e49\u53d8\u91cf\u3002\u521d\u6b21\u6dfb\u52a0\u7684\u65f6\u5019\u6ca1\u6709\u8bbe\u7f6e\u53d8\u91cf\u4f1a\u6ca1\u6709\u663e\u793a\uff0c\u53ea\u9700\u8981\u6dfb\u52a0\u4f4d\u7f6e\u51c6\u786e\u5c31\u53ef\u4ee5\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/udgNWtFxpM0X4zoW5yEpRnflrxVqXPp5sYsRuuEPic1icQVbwlYRkUGN8lv7kNHco7BvLL6dfaT5wQmHr4KCKOAg\/640?wx_fmt=png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">05 \u8f93\u51fa\u6d4b\u8bd5<\/h2>\n\n\n\n<p>&nbsp; &nbsp;\u5728output\u754c\u9762\u8f93\u51fa\u7684\u65f6\u5019\u8f93\u5165\u8f93\u51fa\u7cfb\u6570\uff0c\u6267\u884c\u8f93\u51fa\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/udgNWtFxpM0X4zoW5yEpRnflrxVqXPp5VLQcckWbUuLyyGibUqXtuakxBWXIAxX2vkPFQVHThOjsOmxDe9zsqPw\/640?wx_fmt=png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u53cd\u8bfb\u56degenesis\u8fdb\u884c\u786e\u8ba4\u3002<\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/udgNWtFxpM0X4zoW5yEpRnflrxVqXPp5bt5ibn5iaesWoNF2YzzxD54QwRKv7Kwtxf6JyhgZha1GUGpUE7JVUZibQ\/640?wx_fmt=png\">\u200b<\/p>\n\n\n\n<p>\u5982\u4e0a\u56fe\u6240\u793a\uff0c\u7cfb\u6570\u5df2\u7ecf\u53d8\u4e3a\u4e07\u5206\u4e4b\u51e0\u7684\u94bb\u5b54\u683c\u5f0f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"qua-blog-post-description\"> CAM\u5728\u5236\u4f5c\u5de5\u5177\u4e2d\uff0c\u56e0\u751f\u4ea7\u5de5\u827a\u9700\u8981\u8003\u8651\u7269\u7406\u7279\u6027\uff0c\u9700\u8981\u63d0\u524d\u9884\u8bbe\u6da8\u7f29\u7cfb\u6570\u3002\u5176\u4e2d\u94bb\u5b54\u4e3a\u4e86\u51cf\u5c11\u94bb\u5b54\u6570\u91cf\uff0c\u9700\u8981\u4ee5\u4e07\u5206\u4e4b\u51e0\u7684\u63cf\u8ff0\u3002<\/p>\n","protected":false},"author":1,"featured_media":176,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-184","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-autocam"],"_links":{"self":[{"href":"https:\/\/www.nxpcb.com\/index.php?rest_route=\/wp\/v2\/posts\/184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nxpcb.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nxpcb.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nxpcb.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nxpcb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=184"}],"version-history":[{"count":3,"href":"https:\/\/www.nxpcb.com\/index.php?rest_route=\/wp\/v2\/posts\/184\/revisions"}],"predecessor-version":[{"id":194,"href":"https:\/\/www.nxpcb.com\/index.php?rest_route=\/wp\/v2\/posts\/184\/revisions\/194"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.nxpcb.com\/index.php?rest_route=\/wp\/v2\/media\/176"}],"wp:attachment":[{"href":"https:\/\/www.nxpcb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nxpcb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nxpcb.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}