{"id":765,"date":"2021-06-08T13:29:28","date_gmt":"2021-06-08T05:29:28","guid":{"rendered":"http:\/\/124.244.86.40:8080\/wordpress\/?p=765"},"modified":"2021-06-08T13:29:28","modified_gmt":"2021-06-08T05:29:28","slug":"babylon-js-extrudeshape-%e5%8c%af%e5%87%ba%e6%88%90-stl-%e4%b9%8b%e5%be%8c%e5%87%ba%e7%8f%be%e4%b8%8d%e6%ad%a3%e5%b8%b8-face-data-%e7%9a%84%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%a1%88","status":"publish","type":"post","link":"https:\/\/imuslab.com\/wordpress\/2021\/06\/08\/babylon-js-extrudeshape-%e5%8c%af%e5%87%ba%e6%88%90-stl-%e4%b9%8b%e5%be%8c%e5%87%ba%e7%8f%be%e4%b8%8d%e6%ad%a3%e5%b8%b8-face-data-%e7%9a%84%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%a1%88\/","title":{"rendered":"Babylon.js ExtrudeShape \u532f\u51fa\u6210 STL \u4e4b\u5f8c\u51fa\u73fe\u4e0d\u6b63\u5e38 face data \u7684\u89e3\u6c7a\u65b9\u6848"},"content":{"rendered":"\n<p>\u5728\u958b\u767c aPrint \u7cfb\u7d71\u7684\u6642\u5019\uff0c\u5176\u4e2d\u4e00\u500b\u529f\u80fd\u662f\u4f7f\u7528 CSG \u628a\u5169\u500b Mesh \u7d44\u5408\u6210\u4e00\u500b\u5bb9\u5668\u3002\u53ef\u662f\u5728\u7d44\u5408\u532f\u51fa\u4e4b\u5f8c\u537b\u51fa\u73fe face data \u91cd\u758a\u7684\u60c5\u6cc1\uff08\u4e5f\u6709\u4eba\u6703\u628a\u5b83\u53eb\u505a z-fighting \u6216\u662f invalid normal \uff09<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"750\" src=\"http:\/\/124.244.86.40:8080\/wordpress\/wp-content\/uploads\/2021\/06\/2021-06-08_12-32-29-1024x750.png\" alt=\"\" class=\"wp-image-766\" srcset=\"https:\/\/imuslab.com\/wordpress\/wp-content\/uploads\/2021\/06\/2021-06-08_12-32-29-1024x750.png 1024w, https:\/\/imuslab.com\/wordpress\/wp-content\/uploads\/2021\/06\/2021-06-08_12-32-29-300x220.png 300w, https:\/\/imuslab.com\/wordpress\/wp-content\/uploads\/2021\/06\/2021-06-08_12-32-29-768x563.png 768w, https:\/\/imuslab.com\/wordpress\/wp-content\/uploads\/2021\/06\/2021-06-08_12-32-29.png 1036w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>\u5728 Windows \u7684 3D viewer \u4e2d\u53ef\u4ee5\u770b\u5230\u5168\u90e8\u9762\u90fd\u6709\u4e00\u4e9b\u554f\u984c<\/figcaption><\/figure>\n\n\n\n<p>\u9019\u500b\u6211\u7814\u7a76\u4e86\u4e00\u6bb5\u6642\u9593\uff0c\u767c\u73fe\u9019\u662f\u8ddf extrude \u6a21\u578b\u7684\u6642\u5019\u7684\u8a2d\u5b9a\u6709\u95dc\u3002\u4e00\u822c\u4f86\u8aaa\uff0c\u70ba\u4e86\u907f\u514d\u6a21\u578b\u5728\u80cc\u9762\u51fa\u73fe\u7834\u5716\uff0c\u6240\u4ee5\u5728 render \u7684\u6642\u5019\u4e5f\u6703\u628a rendering face \u8a2d\u6210\u96d9\u9762\u3002\u4ee5\u4e0b\u70ba\u5176\u4e2d\u4e00\u500b\u4f8b\u5b50<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>BABYLON.MeshBuilder.ExtrudeShape(\"container-outerwall\", {\n                shape: externalBorder,\n                path: &#91;extrusionStart,extrusionEnd],\n                cap: BABYLON.Mesh.CAP_ALL,\n                sideOrientation: BABYLON.Mesh.DOUBLESIDE\n            }, scene);<\/code><\/pre>\n\n\n\n<p>\u53ef\u662f\u9019\u6a23\u5728 CSG \u8655\u7406\u7684\u6642\u5019\u537b\u6703\u51fa\u73fe\u554f\u984c\uff0c\u6211\u61f7\u7591\u662f\u8207 Mesh.CAPALL \u7684\u8a2d\u5b9a\u6709\u95dc\uff0c\u53ef\u662f\u6211\u4e26\u6c92\u6709\u6df1\u5165\u7814\u7a76\u662f\u4e0d\u662f CAP_ALL \u8a2d\u5b9a\u4e86\u4e4b\u5f8c\u5c31\u4e0d\u80fd\u4f7f\u7528 DOUBLESIDE \u7684\u8a2d\u5b9a\u3002<\/p>\n\n\n\n<p>\u7136\u800c\u5728\u628asideOrientation \u6539\u6210 FONTSIDE \u4e4b\u5f8c\u554f\u984c\u5c31\u89e3\u6c7a\u4e86\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>BABYLON.MeshBuilder.ExtrudeShape(\"container-outerwall\", {\n                shape: externalBorder,\n                path: &#91;extrusionStart,extrusionEnd],\n                cap: BABYLON.Mesh.CAP_ALL,\n                sideOrientation: BABYLON.Mesh.FRONTSIDE\n            }, scene);<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"755\" src=\"http:\/\/124.244.86.40:8080\/wordpress\/wp-content\/uploads\/2021\/06\/2021-06-08_12-32-46-1024x755.png\" alt=\"\" class=\"wp-image-767\" srcset=\"https:\/\/imuslab.com\/wordpress\/wp-content\/uploads\/2021\/06\/2021-06-08_12-32-46-1024x755.png 1024w, https:\/\/imuslab.com\/wordpress\/wp-content\/uploads\/2021\/06\/2021-06-08_12-32-46-300x221.png 300w, https:\/\/imuslab.com\/wordpress\/wp-content\/uploads\/2021\/06\/2021-06-08_12-32-46-768x567.png 768w, https:\/\/imuslab.com\/wordpress\/wp-content\/uploads\/2021\/06\/2021-06-08_12-32-46.png 1037w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u6240\u4ee5\u7d50\u8ad6\u5c31\u662f\u5982\u679c\u4f60\u8981\u9032\u884c CSG \u64cd\u4f5c\u7684\u8a71 sideOrientation \u4e0d\u8981\u8a2d\u6210 DOUBLESIDE \u5c31\u5c0d\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u958b\u767c aPrint \u7cfb\u7d71\u7684\u6642\u5019\uff0c\u5176\u4e2d\u4e00\u500b\u529f\u80fd\u662f\u4f7f\u7528 CSG \u628a\u5169\u500b Mesh \u7d44\u5408\u6210\u4e00\u500b\u5bb9\u5668\u3002\u53ef\u662f\u5728\u7d44\u5408\u532f\u51fa\u4e4b\u5f8c\u537b\u51fa\u73fe face data \u91cd\u758a\u7684\u60c5\u6cc1\uff08\u4e5f\u6709\u4eba\u6703\u628a\u5b83\u53eb\u505a z-fighting \u6216\u662f invalid normal \uff09 \u9019\u500b\u6211\u7814\u7a76\u4e86\u4e00\u6bb5\u6642\u9593\uff0c\u767c\u73fe\u9019\u662f\u8ddf extrude \u6a21\u578b\u7684\u6642\u5019\u7684\u8a2d\u5b9a\u6709\u95dc\u3002\u4e00\u822c\u4f86\u8aaa\uff0c\u70ba\u4e86\u907f\u514d\u6a21\u578b\u5728\u80cc\u9762\u51fa\u73fe\u7834\u5716\uff0c\u6240\u4ee5\u5728 render \u7684\u6642\u5019\u4e5f\u6703\u628a rendering face \u8a2d\u6210\u96d9\u9762\u3002\u4ee5\u4e0b\u70ba\u5176\u4e2d\u4e00\u500b\u4f8b\u5b50 \u53ef\u662f\u9019\u6a23\u5728 CSG \u8655\u7406\u7684\u6642\u5019\u537b\u6703\u51fa\u73fe\u554f\u984c\uff0c\u6211\u61f7\u7591\u662f\u8207 Mesh.CAPALL \u7684\u8a2d\u5b9a\u6709\u95dc\uff0c\u53ef\u662f\u6211\u4e26\u6c92\u6709\u6df1\u5165\u7814\u7a76\u662f\u4e0d\u662f CAP_ALL \u8a2d\u5b9a\u4e86\u4e4b\u5f8c\u5c31\u4e0d\u80fd\u4f7f\u7528 DOUBLESIDE \u7684\u8a2d\u5b9a\u3002 \u7136\u800c\u5728\u628asideOrientation \u6539\u6210 FONTSIDE \u4e4b\u5f8c\u554f\u984c\u5c31\u89e3\u6c7a\u4e86\u3002 \u6240\u4ee5\u7d50\u8ad6\u5c31\u662f\u5982\u679c\u4f60\u8981\u9032\u884c CSG \u64cd\u4f5c\u7684\u8a71 sideOrientation \u4e0d\u8981\u8a2d\u6210 DOUBLESIDE \u5c31\u5c0d\u4e86\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[104,3],"tags":[],"class_list":["post-765","post","type-post","status-publish","format-standard","hentry","category-bug-tips","category-instructions-and-information"],"_links":{"self":[{"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/posts\/765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/comments?post=765"}],"version-history":[{"count":1,"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/posts\/765\/revisions"}],"predecessor-version":[{"id":768,"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/posts\/765\/revisions\/768"}],"wp:attachment":[{"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/media?parent=765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/categories?post=765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/tags?post=765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}