{"id":326283,"date":"2021-07-11T21:00:07","date_gmt":"2021-07-11T21:00:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=326283"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=326283","title":{"rendered":"Slicer: \u043d\u0430\u0440\u0435\u0437\u043a\u0430 \u0442\u0432\u0435\u0440\u0434\u043e\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u043e\u0434 \u0440\u0430\u0441\u043a\u0440\u043e\u0439"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\"><iframe id=\"60eb562a920526a288c7e149\" src=\"https:\/\/embedd.srv.habr.com\/iframe\/60eb562a920526a288c7e149\" class=\"embed_video embed__content\" allowfullscreen=\"true\"><\/iframe><\/p>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442. \u041a\u0440\u0430\u0441\u0438\u0432\u0430\u044f \u0444\u044d\u0448\u043d \u043c\u0435\u0431\u0435\u043b\u044c, \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u044b \u0440\u043e\u0441\u043a\u043e\u0448\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u044c\u0435\u0440 &#8212; \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u044b\u043b\u044c \u0432 \u0433\u043b\u0430\u0437\u0430 \u0432\u0430\u0448\u0438\u043c \u0433\u043e\u0441\u0442\u044f\u043c \u0438 \u043f\u0440\u043e\u0441\u043b\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438. \u041d\u043e \u043a\u0430\u043a \u0432\u0441\u0435 \u044d\u0442\u043e \u0440\u0430\u0437\u0434\u043e\u0431\u044b\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0438\u043f\u043e\u0442\u0435\u043a\u0430 \u0438 \u0431\u044e\u0434\u0436\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d? <\/p>\n<p>\u042d\u0442\u0438\u043c\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u044f \u0438 \u0437\u0430\u0434\u0430\u043b\u0441\u044f, <a href=\"https:\/\/habr.com\/ru\/post\/531482\/\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043b\u0438\u0447\u043d\u044b\u0439 CNC \u0441\u0442\u0430\u043d\u043e\u043a<\/a>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0435\u0435, \u044f \u0443\u0432\u0438\u0434\u0435\u043b \u043d\u0430 Pinterest \u0432\u0441\u044f\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u043e\u0434\u043d\u044b\u0435 \u0448\u0442\u0443\u043a\u0438 \u0442\u0438\u043f\u0430 \u044d\u0442\u043e\u0439: <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f7e\/ff2\/f93\/f7eff2f93bf2eea83f55b8ca76e8f906.png\" alt=\"\u0441\u0435\u0431\u0435\u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 - 3 \u043a\u043e\u043f\u0435\u0439\u043a\u0438\" title=\"\u0441\u0435\u0431\u0435\u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 - 3 \u043a\u043e\u043f\u0435\u0439\u043a\u0438\" width=\"640\" height=\"640\"><figcaption>\u0441\u0435\u0431\u0435\u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 &#8212; 3 \u043a\u043e\u043f\u0435\u0439\u043a\u0438<\/figcaption><\/figure>\n<p>\u0412\u043e\u0441\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043a\u0440\u0430\u0441\u043e\u0442\u0443 \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0432\u043e\u043b\u043d\u044b, \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u0438\u0437 \u0448\u043a\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u0443\u0440\u0441\u0430 y=sin(x), \u043f\u0440\u0430\u0432\u0434\u0430 \u044f \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043b \u0435\u0435, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u0435, \u0438 \u0441\u043f\u0443\u0441\u0442\u044f \u043f\u0430\u0440\u0443 \u0447\u0430\u0441\u043e\u0432 \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430, \u043a\u0430\u043a \u044f \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0443\u0432\u0438\u0434\u0435\u043b \u044f\u0437\u044b\u043a ruby, \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 SketchUp \u0443 \u043c\u0435\u043d\u044f \u043e\u0444\u043e\u0440\u043c\u0438\u043b\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0430\u0437):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/562\/270\/e87\/562270e8783f2e5ca837c32e32526e04.png\" alt=\"\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0443\u0436\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 SketchUp, \u043e\u043d\u0438 \u043f\u043b\u0435\u0432\u0430\u0442\u044c \u0445\u043e\u0442\u0435\u043b\u0438 \u043d\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c\" title=\"\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0443\u0436\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 SketchUp, \u043e\u043d\u0438 \u043f\u043b\u0435\u0432\u0430\u0442\u044c \u0445\u043e\u0442\u0435\u043b\u0438 \u043d\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c\" width=\"1920\" height=\"1080\"><figcaption>\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0443\u0436\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 SketchUp, \u043e\u043d\u0438 \u043f\u043b\u0435\u0432\u0430\u0442\u044c \u0445\u043e\u0442\u0435\u043b\u0438 \u043d\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c<\/figcaption><\/figure>\n<p>\u041d\u043e, \u0435\u0441\u043b\u0438 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e\u0431 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432, \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043a\u0430\u043a-\u0442\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7a5\/377\/a4e\/7a5377a4e35ab389d56f451c615f9705.png\" alt=\"\u044d\u0442\u043e \u043c\u0435\u0431\u0435\u043b\u044c, \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0435\u043d\u044b?..\" title=\"\u044d\u0442\u043e \u043c\u0435\u0431\u0435\u043b\u044c, \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0435\u043d\u044b?..\" width=\"1000\" height=\"1000\"><figcaption>\u044d\u0442\u043e \u043c\u0435\u0431\u0435\u043b\u044c, \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0435\u043d\u044b?..<\/figcaption><\/figure>\n<p>\u0417\u0434\u0435\u0441\u044c \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u043a\u0430\u043a \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c 3D \u043e\u0431\u044a\u0435\u043a\u0442 \u0432 \u043a\u0430\u0440\u043a\u0430\u0441 \u0438\u0437 \u043b\u0438\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430, \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0442\u044b\u043a\u0443\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u0435\u0437 \u043a\u0440\u0435\u043f\u0435\u0436\u0430, \u043f\u0430\u0437 \u0432 \u043f\u0430\u0437? \u041d\u0435 \u0441\u0435\u043a\u0440\u0435\u0442, \u0447\u0442\u043e \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u0438\u0433\u0440\u0443\u0448\u0435\u043a \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0435\u0448\u0438\u043b\u0438 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/730\/109\/d41\/730109d4198387c6de6ec4d6a53975b2.png\" alt=\"\u043d\u0430\u0438\u0432\u043d\u044b\u0439 \u0431\u0430\u0439\u0435\u0441\u043e\u0432\u0441\u043a\u0438\u0439 \u043e\u043b\u0435\u043d\u044c\" title=\"\u043d\u0430\u0438\u0432\u043d\u044b\u0439 \u0431\u0430\u0439\u0435\u0441\u043e\u0432\u0441\u043a\u0438\u0439 \u043e\u043b\u0435\u043d\u044c\" width=\"1500\" height=\"998\"><figcaption>\u043d\u0430\u0438\u0432\u043d\u044b\u0439 \u0431\u0430\u0439\u0435\u0441\u043e\u0432\u0441\u043a\u0438\u0439 \u043e\u043b\u0435\u043d\u044c<\/figcaption><\/figure>\n<p>\u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u043c\u043d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0441\u043e\u043a\u043e\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043b\u0430\u043f\u0448\u0435\u043a\u043e\u0434, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 &#171;coder-nazi&#187; \u043d\u0430\u043a\u0438\u0434\u0430\u044e\u0442 \u043c\u043d\u0435 \u043c\u0438\u043d\u0443\u0441\u043e\u0432 \u0432 \u043a\u0430\u0440\u043c\u0443, \u0434\u0443\u043c\u0430\u044f \u0447\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0435\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f. \u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0432\u044b \u044d\u0442\u043e \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u043e\u0442\u0432\u043b\u0435\u043a\u0438\u0442\u0435\u0441\u044c \u043e\u0442 \u0434\u0435\u0442\u0441\u043a\u0438\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432 \u0438 \u0432\u0437\u0433\u043b\u044f\u043d\u0438\u0442\u0435, \u0447\u0442\u043e <a href=\"https:\/\/www.drive2.ru\/l\/147474\/\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0433\u0443\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u043b\u043a\u043e\u0432\u044b\u0435 \u0440\u0435\u0431\u044f\u0442\u0430<\/a> \u0432 \u0431\u043e\u043b\u0435\u0435 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0445 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430\u0445:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/71d\/3c0\/97d\/71d3c097d57f6d90a8c036ef8d12eb26.png\" width=\"960\" height=\"720\"><figcaption><\/figcaption><\/figure>\n<p>       \u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0435\u0433\u043e \u0432\u0435\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434! \u0418\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 FreeCad.<\/p>\n<pre><code>App.ActiveDocument.addObject(\"Part::Sphere\",\"Sphere\") App.ActiveDocument.ActiveObject.Label = \"Sphere\" s_offset = 200 App.ActiveDocument.Sphere.Radius = s_offset #App.ActiveDocument.Sphere.Placement = App.Placement(App.Vector(500,500,500),App.Rotation(App.Vector(0,0,1),0))\t App.ActiveDocument.recompute()   def isEmpty(sh): \tif sh == None: \t\treturn True \tif sh.Shape.BoundBox.ZMin == sys.float_info.max and sh.Shape.BoundBox.ZMax == -sys.float_info.max: \t\treturn True \treturn False   def slice(name): \tif name == \"\": \t\tname = \"Sphere\" \tsx = 1310 \tsy = 1510  \toffset = 10000  \trHeigth = 1400 \trThickness = 4 \trLength = 1500  \tstepx = 80 \tstepy = 80   \tdx = 10 \tdy = 10  \tmx = {} \tmy = {} \t \tn = 0\t\t \tcopy =  FreeCAD.ActiveDocument.copyObject(FreeCAD.activeDocument().getObject(name),False) \tcopy.Placement = App.Placement(App.Vector(s_offset,offset+s_offset,s_offset),App.Rotation(App.Vector(0,0,1),0))\t\t \twhile dx &lt; sx: \t\tbox = App.ActiveDocument.addObject(\"Part::Box\",\"Box\"+str(n)) \t\tbox.Length=rThickness \t\tbox.Width=rLength \t\tbox.Height=rHeigth \t\tbox.Placement=App.Placement(App.Vector(dx,offset,0),App.Rotation(App.Vector(0,0,1),0))\t  \t\tcommon = App.activeDocument().addObject(\"Part::MultiCommon\",\"CommonX\"+str(n)) \t\tcommon.Shapes = [copy,box] \t\t#common.Placement=App.Placement(App.Vector(0,0,0),App.Rotation(App.Vector(0,0,1),0))\t \t\t \t\t#copy.Visibility=False \t\t#box.Visibility=False \t\t \t\t#common.ShapeColor=copy.ShapeColor \t\t#common.DisplayMode=copy.DisplayMode \t\tmx[n] = common \t\t \t\tdx = dx + stepx \t\tn = n + 1 \t \tcolx = n \tn = 0 \twhile dy &lt; sy: \t\tbox = App.ActiveDocument.addObject(\"Part::Box\",\"Box\"+str(n)) \t\tbox.Length=rLength \t\tbox.Width=rThickness \t\tbox.Height=rHeigth \t\tbox.Placement=App.Placement(App.Vector(0,offset+dy,0),App.Rotation(App.Vector(0,0,1),0))\t  \t\tcommon = App.activeDocument().addObject(\"Part::MultiCommon\",\"CommonY\"+str(n)) \t\tcommon.Shapes = [copy,box] \t\t#common.Placement=App.Placement(App.Vector(0,0,0),App.Rotation(App.Vector(0,0,1),0))\t \t\t \t\t#copy.Visibility=False \t\t#box.Visibility=False\t\t \t\t#common.ShapeColor=copy.ShapeColor \t\t#common.DisplayMode=copy.DisplayMode \t\tmy[n] = common \t\t \t\tdy = dy + stepy \t\tn = n + 1 \tcoly = n \tprint(\"!!!---\") \tApp.ActiveDocument.recompute() \tinter = {} \tfor i in range(0,colx): \t\tfor j in range(0,coly): \t\t\tif not (isEmpty(mx[i]) or isEmpty(my[j])): \t\t\t\tcommon = App.activeDocument().addObject(\"Part::MultiCommon\",\"ComX\"+str(i)+\"Y\"+str(j)) \t\t\t\tcommon.Shapes = [mx[i],my[j]]\t\t\t \t\t\t\tinter[(i,j)] = common \t\t\t\t#print(str(i)+\" \"+ str(j)+\" \" + str(common.Shape.BoundBox.ZMax)+\" \"+str(common.Shape.BoundBox.ZMax)) \t \tApp.ActiveDocument.recompute()\t \tfor i in range(0,colx): \t\tfor j in range(0,coly): \t\t\tif not isEmpty(inter.get((i,j))): \t\t\t\tcom = inter.get((i,j))\t\t\t\t \t\t\t\td = (com.Shape.BoundBox.ZMax - com.Shape.BoundBox.ZMin)\/2   \t\t\t\t \t\t\t\tbox = App.ActiveDocument.addObject(\"Part::Box\",\"Box\"+str(n)) \t\t\t\tbox.Length= com.Shape.BoundBox.XMax - com.Shape.BoundBox.XMin \t\t\t\tbox.Width= com.Shape.BoundBox.YMax - com.Shape.BoundBox.YMin \t\t\t\tbox.Height=d+rThickness\/2 \t\t\t\tbox.Placement=App.Placement(App.Vector(com.Shape.BoundBox.XMin,com.Shape.BoundBox.YMin,com.Shape.BoundBox.ZMin),App.Rotation(App.Vector(0,0,1),0))\t \t\t\t\t \t\t\t\tbox1 = App.ActiveDocument.copyObject(box, False)  \t\t\t\tbox1.Placement=App.Placement(App.Vector(com.Shape.BoundBox.XMin,com.Shape.BoundBox.YMin,com.Shape.BoundBox.ZMin+d-rThickness\/2),App.Rotation(App.Vector(0,0,1),0))\t \t\t\t\t \t\t\t\tcom2 = App.activeDocument().addObject(\"Part::MultiCommon\",\"com2_\") \t\t\t\tcom2.Shapes = [com,box] \t\t\t\t \t\t\t\tcom3 = App.activeDocument().addObject(\"Part::MultiCommon\",\"com3_\") \t\t\t\tcom3.Shapes = [com,box1] \t\t\t\t \t\t\t\tcomX = App.activeDocument().addObject(\"Part::Cut\",\"CutX\"+str(i)) \t\t\t\tcomX.Base = mx[i] \t\t\t\tcomX.Tool = com2 \t\t\t\tmx[i] = comX\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\tcomY = App.activeDocument().addObject(\"Part::Cut\",\"CutY\"+str(j)) \t\t\t\tcomY.Base = my[j] \t\t\t\tcomY.Tool = com3 \t\t\t\tmy[j] = comY \t\t\t\t\t\t\t\t\t\t\t \t\t\t\t#print(str(i)+\" \"+ str(j))\t\t \tApp.ActiveDocument.recompute() \tfor i in range(0,colx): \t\tif not (isEmpty(mx[i])): \t\t\tmx[i].Placement=App.Placement(App.Vector(stepx*i,20000,0),App.Rotation(App.Vector(0,1,0),90))\t \tfor j in range(0,coly): \t\tif not (isEmpty(my[j])): \t\t\tmy[j].Placement=App.Placement(App.Vector(20000,stepy*j,0),App.Rotation(App.Vector(1,0,0),90))\t\t\t\t\t\t\t\t \t#App.ActiveDocument.addObject('Part::Feature','Line002').Shape=App.ActiveDocument.Line002.Shape.removeSplitter() \t#App.ActiveDocument.Common.Shape.BoundBox.ZMax\t \tApp.ActiveDocument.recompute() \tx1=rThickness \ty1=rThickness \tyMax = 0 \t#from typing import Dict, List \tall = list()#List[DocumentObject]  \tfor i in range(0,colx): \t\tif not (isEmpty(mx[i])): \t\t\tif (x1+(mx[i].Shape.BoundBox.XMax-mx[i].Shape.BoundBox.XMin)) &gt; sx: \t\t\t\tx1 = 0  \t\t\t\ty1 = yMax+rThickness*3 \t\t\tx=mx[i].Shape.BoundBox.XMin \t\t\ty=mx[i].Shape.BoundBox.YMin \t\t\tz=mx[i].Shape.BoundBox.ZMin\t \t\t\tmx[i].Placement.move(FreeCAD.Base.Vector(-x+x1+rThickness*3,-y+y1,-z))\t\t\t \t\t\tx1=mx[i].Shape.BoundBox.XMax \t\t\tif (mx[i].Shape.BoundBox.YMax&gt;yMax): \t\t\t\tyMax = mx[i].Shape.BoundBox.YMax \t\t\tall.append(App.activeDocument().getObject(mx[i].Name)) \tfor j in range(0,coly): \t\tif not (isEmpty(my[j])): \t\t\tif (x1+(my[j].Shape.BoundBox.XMax-my[j].Shape.BoundBox.XMin)) &gt; sx: \t\t\t\tx1 = 0  \t\t\t\ty1 = yMax+rThickness*3\t\t \t\t\tx=my[j].Shape.BoundBox.XMin \t\t\ty=my[j].Shape.BoundBox.YMin \t\t\tz=my[j].Shape.BoundBox.ZMin \t\t\tmy[j].Placement.move(FreeCAD.Base.Vector(-x+x1+rThickness*3,-y+y1,-z)) \t\t\t#App.ActiveDocument.recompute() \t\t\tx1=my[j].Shape.BoundBox.XMax \t\t\t#print \"--\"+str(x1) \t\t\t#y1=my[j].Shape.BoundBox.YMax \t\t\tif (my[j].Shape.BoundBox.YMax&gt;yMax): \t\t\t\tyMax = my[j].Shape.BoundBox.YMax \t\t\tall.append(App.activeDocument().getObject(my[j].Name)) \t#print all \tGui.activeDocument().getObject(name).Visibility=False \tApp.activeDocument().addObject(\"Part::Compound\",\"Compound\") \tApp.activeDocument().Compound.Links = all \tApp.ActiveDocument.recompute() \treturn \"\"    slice(\"\")    <\/code><\/pre>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0444\u0435\u0440\u0430 (App.ActiveDocument.addObject(&#171;Part::Sphere&#187;,&#187;Sphere&#187;)) <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dca\/865\/4ee\/dca8654eef9cecdca147eb8445c276c5.png\" width=\"867\" height=\"707\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435, \u043e\u043d\u0430 \u043d\u0430\u0440\u0435\u0437\u0430\u0435\u0442\u0441\u044f \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0440\u0435\u0448\u0435\u0442\u043a\u043e\u0439 \u0440\u0430\u0441\u0441\u0435\u043a\u0430\u044e\u0449\u0438\u0445 Box&#8217;\u043e\u0432:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ac5\/141\/636\/ac5141636e4c76f966211008fe5b54d0.png\" width=\"932\" height=\"694\"><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0435\u0435 &#8212; \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0435 \u0432\u044b\u0441\u043e\u0442\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0443 \u043f\u0440\u043e\u0434\u043e\u043b\u044c\u043d\u044b\u0445 \u0438 \u043f\u043e\u043f\u0435\u0440\u0435\u0447\u043d\u044b\u0445 \u0440\u0435\u0431\u0435\u0440 \u0432\u044b\u0440\u0435\u0437\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u0437. \u0422\u0430\u043a \u043a\u0430\u043a \u0443 \u043c\u0435\u043d\u044f \u0444\u0440\u0435\u0437\u0435\u0440, \u0430 \u043d\u0435 \u043b\u0430\u0437\u0435\u0440\u043d\u044b\u0439 \u0441\u0442\u0430\u043d\u043e\u043a, \u043f\u0430\u0437\u044b \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c, \u0438\u043d\u0430\u0447\u0435 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0440\u0430\u0434\u0438\u0443\u0441\u0430 \u0444\u0440\u0435\u0437\u044b \u043f\u0440\u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0435 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0430\u0437\u044b \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c\u0438. \u041d\u043e \u0440\u0435\u0431\u0440\u0430 \u0435\u0449\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0430 \u043b\u0438\u0441\u0442\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/739\/8e6\/484\/7398e648414cfd7f96d00a419a816d19.png\" width=\"1380\" height=\"735\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e compaund&#8217;\u0430 \u0438\u0437 \u0432\u0441\u0435\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u043a\u0430. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0441\u043c\u043e\u0433 (\u043c\u043e\u0436\u0435\u0442, \u043a\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Job, \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0444\u0440\u0435\u0437\u044b, \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u0445. \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e profile (\u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c &#171;\u041f\u0435\u0440\u0435\u043c\u044b\u0447\u043a\u0438 \u0434\u043b\u044f \u0443\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0435&#187;, \u0438\u043d\u0430\u0447\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u0440\u0430\u0437\u0431\u0440\u043e\u0441\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0442 \u043b\u0438\u0441\u0442\u0430):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f5f\/687\/0ce\/f5f6870cece7bcd84a5b0080fddecf9b.png\" width=\"1188\" height=\"652\"><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0442\u0441\u044e\u0434\u0430 \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c G-\u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u043a\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cf3\/d63\/c79\/cf3d63c797cb45504e9007940ae9da8c.png\" width=\"602\" height=\"532\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0438\u0434\u0435\u043e-\u0432\u0435\u0440\u0441\u0438\u044f: <\/p>\n<p><iframe id=\"60eb5a7cf2fa57a26f179f7e\" src=\"https:\/\/embedd.srv.habr.com\/iframe\/60eb5a7cf2fa57a26f179f7e\" class=\"embed_video embed__content\" allowfullscreen=\"true\"><\/iframe><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/567176\/\"> https:\/\/habr.com\/ru\/post\/567176\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\"><iframe id=\"60eb562a920526a288c7e149\" src=\"https:\/\/embedd.srv.habr.com\/iframe\/60eb562a920526a288c7e149\" class=\"embed_video embed__content\" allowfullscreen=\"true\"><\/iframe><\/p>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442. \u041a\u0440\u0430\u0441\u0438\u0432\u0430\u044f \u0444\u044d\u0448\u043d \u043c\u0435\u0431\u0435\u043b\u044c, \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u044b \u0440\u043e\u0441\u043a\u043e\u0448\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u044c\u0435\u0440 &#8212; \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u044b\u043b\u044c \u0432 \u0433\u043b\u0430\u0437\u0430 \u0432\u0430\u0448\u0438\u043c \u0433\u043e\u0441\u0442\u044f\u043c \u0438 \u043f\u0440\u043e\u0441\u043b\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438. \u041d\u043e \u043a\u0430\u043a \u0432\u0441\u0435 \u044d\u0442\u043e \u0440\u0430\u0437\u0434\u043e\u0431\u044b\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0438\u043f\u043e\u0442\u0435\u043a\u0430 \u0438 \u0431\u044e\u0434\u0436\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d? <\/p>\n<p>\u042d\u0442\u0438\u043c\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u044f \u0438 \u0437\u0430\u0434\u0430\u043b\u0441\u044f, <a href=\"https:\/\/habr.com\/ru\/post\/531482\/\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043b\u0438\u0447\u043d\u044b\u0439 CNC \u0441\u0442\u0430\u043d\u043e\u043a<\/a>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0435\u0435, \u044f \u0443\u0432\u0438\u0434\u0435\u043b \u043d\u0430 Pinterest \u0432\u0441\u044f\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u043e\u0434\u043d\u044b\u0435 \u0448\u0442\u0443\u043a\u0438 \u0442\u0438\u043f\u0430 \u044d\u0442\u043e\u0439: <\/p>\n<figure class=\"full-width\"><figcaption>\u0441\u0435\u0431\u0435\u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 &#8212; 3 \u043a\u043e\u043f\u0435\u0439\u043a\u0438<\/figcaption><\/figure>\n<p>\u0412\u043e\u0441\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043a\u0440\u0430\u0441\u043e\u0442\u0443 \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0432\u043e\u043b\u043d\u044b, \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u0438\u0437 \u0448\u043a\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u0443\u0440\u0441\u0430 y=sin(x), \u043f\u0440\u0430\u0432\u0434\u0430 \u044f \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043b \u0435\u0435, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u0435, \u0438 \u0441\u043f\u0443\u0441\u0442\u044f \u043f\u0430\u0440\u0443 \u0447\u0430\u0441\u043e\u0432 \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430, \u043a\u0430\u043a \u044f \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0443\u0432\u0438\u0434\u0435\u043b \u044f\u0437\u044b\u043a ruby, \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 SketchUp \u0443 \u043c\u0435\u043d\u044f \u043e\u0444\u043e\u0440\u043c\u0438\u043b\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0430\u0437):<\/p>\n<figure class=\"full-width\"><figcaption>\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0443\u0436\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 SketchUp, \u043e\u043d\u0438 \u043f\u043b\u0435\u0432\u0430\u0442\u044c \u0445\u043e\u0442\u0435\u043b\u0438 \u043d\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c<\/figcaption><\/figure>\n<p>\u041d\u043e, \u0435\u0441\u043b\u0438 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e\u0431 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432, \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043a\u0430\u043a-\u0442\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442:<\/p>\n<figure class=\"full-width\"><figcaption>\u044d\u0442\u043e \u043c\u0435\u0431\u0435\u043b\u044c, \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0435\u043d\u044b?..<\/figcaption><\/figure>\n<p>\u0417\u0434\u0435\u0441\u044c \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u043a\u0430\u043a \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c 3D \u043e\u0431\u044a\u0435\u043a\u0442 \u0432 \u043a\u0430\u0440\u043a\u0430\u0441 \u0438\u0437 \u043b\u0438\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430, \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0442\u044b\u043a\u0443\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u0435\u0437 \u043a\u0440\u0435\u043f\u0435\u0436\u0430, \u043f\u0430\u0437 \u0432 \u043f\u0430\u0437? \u041d\u0435 \u0441\u0435\u043a\u0440\u0435\u0442, \u0447\u0442\u043e \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u0438\u0433\u0440\u0443\u0448\u0435\u043a \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0435\u0448\u0438\u043b\u0438 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443:<\/p>\n<figure class=\"full-width\"><figcaption>\u043d\u0430\u0438\u0432\u043d\u044b\u0439 \u0431\u0430\u0439\u0435\u0441\u043e\u0432\u0441\u043a\u0438\u0439 \u043e\u043b\u0435\u043d\u044c<\/figcaption><\/figure>\n<p>\u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u043c\u043d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0441\u043e\u043a\u043e\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043b\u0430\u043f\u0448\u0435\u043a\u043e\u0434, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 &#171;coder-nazi&#187; \u043d\u0430\u043a\u0438\u0434\u0430\u044e\u0442 \u043c\u043d\u0435 \u043c\u0438\u043d\u0443\u0441\u043e\u0432 \u0432 \u043a\u0430\u0440\u043c\u0443, \u0434\u0443\u043c\u0430\u044f \u0447\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0435\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f. \u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0432\u044b \u044d\u0442\u043e \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u043e\u0442\u0432\u043b\u0435\u043a\u0438\u0442\u0435\u0441\u044c \u043e\u0442 \u0434\u0435\u0442\u0441\u043a\u0438\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432 \u0438 \u0432\u0437\u0433\u043b\u044f\u043d\u0438\u0442\u0435, \u0447\u0442\u043e <a href=\"https:\/\/www.drive2.ru\/l\/147474\/\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0433\u0443\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u043b\u043a\u043e\u0432\u044b\u0435 \u0440\u0435\u0431\u044f\u0442\u0430<\/a> \u0432 \u0431\u043e\u043b\u0435\u0435 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0445 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430\u0445:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>       \u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0435\u0433\u043e \u0432\u0435\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434! \u0418\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 FreeCad.<\/p>\n<pre><code>App.ActiveDocument.addObject(\"Part::Sphere\",\"Sphere\") App.ActiveDocument.ActiveObject.Label = \"Sphere\" s_offset = 200 App.ActiveDocument.Sphere.Radius = s_offset #App.ActiveDocument.Sphere.Placement = App.Placement(App.Vector(500,500,500),App.Rotation(App.Vector(0,0,1),0))\t App.ActiveDocument.recompute()   def isEmpty(sh): \tif sh == None: \t\treturn True \tif sh.Shape.BoundBox.ZMin == sys.float_info.max and sh.Shape.BoundBox.ZMax == -sys.float_info.max: \t\treturn True \treturn False   def slice(name): \tif name == \"\": \t\tname = \"Sphere\" \tsx = 1310 \tsy = 1510  \toffset = 10000  \trHeigth = 1400 \trThickness = 4 \trLength = 1500  \tstepx = 80 \tstepy = 80   \tdx = 10 \tdy = 10  \tmx = {} \tmy = {} \t \tn = 0\t\t \tcopy =  FreeCAD.ActiveDocument.copyObject(FreeCAD.activeDocument().getObject(name),False) \tcopy.Placement = App.Placement(App.Vector(s_offset,offset+s_offset,s_offset),App.Rotation(App.Vector(0,0,1),0))\t\t \twhile dx &lt; sx: \t\tbox = App.ActiveDocument.addObject(\"Part::Box\",\"Box\"+str(n)) \t\tbox.Length=rThickness \t\tbox.Width=rLength \t\tbox.Height=rHeigth \t\tbox.Placement=App.Placement(App.Vector(dx,offset,0),App.Rotation(App.Vector(0,0,1),0))\t  \t\tcommon = App.activeDocument().addObject(\"Part::MultiCommon\",\"CommonX\"+str(n)) \t\tcommon.Shapes = [copy,box] \t\t#common.Placement=App.Placement(App.Vector(0,0,0),App.Rotation(App.Vector(0,0,1),0))\t \t\t \t\t#copy.Visibility=False \t\t#box.Visibility=False \t\t \t\t#common.ShapeColor=copy.ShapeColor \t\t#common.DisplayMode=copy.DisplayMode \t\tmx[n] = common \t\t \t\tdx = dx + stepx \t\tn = n + 1 \t \tcolx = n \tn = 0 \twhile dy &lt; sy: \t\tbox = App.ActiveDocument.addObject(\"Part::Box\",\"Box\"+str(n)) \t\tbox.Length=rLength \t\tbox.Width=rThickness \t\tbox.Height=rHeigth \t\tbox.Placement=App.Placement(App.Vector(0,offset+dy,0),App.Rotation(App.Vector(0,0,1),0))\t  \t\tcommon = App.activeDocument().addObject(\"Part::MultiCommon\",\"CommonY\"+str(n)) \t\tcommon.Shapes = [copy,box] \t\t#common.Placement=App.Placement(App.Vector(0,0,0),App.Rotation(App.Vector(0,0,1),0))\t \t\t \t\t#copy.Visibility=False \t\t#box.Visibility=False\t\t \t\t#common.ShapeColor=copy.ShapeColor \t\t#common.DisplayMode=copy.DisplayMode \t\tmy[n] = common \t\t \t\tdy = dy + stepy \t\tn = n + 1 \tcoly = n \tprint(\"!!!---\") \tApp.ActiveDocument.recompute() \tinter = {} \tfor i in range(0,colx): \t\tfor j in range(0,coly): \t\t\tif not (isEmpty(mx[i]) or isEmpty(my[j])): \t\t\t\tcommon = App.activeDocument().addObject(\"Part::MultiCommon\",\"ComX\"+str(i)+\"Y\"+str(j)) \t\t\t\tcommon.Shapes = [mx[i],my[j]]\t\t\t \t\t\t\tinter[(i,j)] = common \t\t\t\t#print(str(i)+\" \"+ str(j)+\" \" + str(common.Shape.BoundBox.ZMax)+\" \"+str(common.Shape.BoundBox.ZMax)) \t \tApp.ActiveDocument.recompute()\t \tfor i in range(0,colx): \t\tfor j in range(0,coly): \t\t\tif not isEmpty(inter.get((i,j))): \t\t\t\tcom = inter.get((i,j))\t\t\t\t \t\t\t\td = (com.Shape.BoundBox.ZMax - com.Shape.BoundBox.ZMin)\/2   \t\t\t\t \t\t\t\tbox = App.ActiveDocument.addObject(\"Part::Box\",\"Box\"+str(n)) \t\t\t\tbox.Length= com.Shape.BoundBox.XMax - com.Shape.BoundBox.XMin \t\t\t\tbox.Width= com.Shape.BoundBox.YMax - com.Shape.BoundBox.YMin \t\t\t\tbox.Height=d+rThickness\/2 \t\t\t\tbox.Placement=App.Placement(App.Vector(com.Shape.BoundBox.XMin,com.Shape.BoundBox.YMin,com.Shape.BoundBox.ZMin),App.Rotation(App.Vector(0,0,1),0))\t \t\t\t\t \t\t\t\tbox1 = App.ActiveDocument.copyObject(box, False)  \t\t\t\tbox1.Placement=App.Placement(App.Vector(com.Shape.BoundBox.XMin,com.Shape.BoundBox.YMin,com.Shape.BoundBox.ZMin+d-rThickness\/2),App.Rotation(App.Vector(0,0,1),0))\t \t\t\t\t \t\t\t\tcom2 = App.activeDocument().addObject(\"Part::MultiCommon\",\"com2_\") \t\t\t\tcom2.Shapes = [com,box] \t\t\t\t \t\t\t\tcom3 = App.activeDocument().addObject(\"Part::MultiCommon\",\"com3_\") \t\t\t\tcom3.Shapes = [com,box1] \t\t\t\t \t\t\t\tcomX = App.activeDocument().addObject(\"Part::Cut\",\"CutX\"+str(i)) \t\t\t\tcomX.Base = mx[i] \t\t\t\tcomX.Tool = com2 \t\t\t\tmx[i] = comX\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\tcomY = App.activeDocument().addObject(\"Part::Cut\",\"CutY\"+str(j)) \t\t\t\tcomY.Base = my[j] \t\t\t\tcomY.Tool = com3 \t\t\t\tmy[j] = comY \t\t\t\t\t\t\t\t\t\t\t \t\t\t\t#print(str(i)+\" \"+ str(j))\t\t \tApp.ActiveDocument.recompute() \tfor i in range(0,colx): \t\tif not (isEmpty(mx[i])): \t\t\tmx[i].Placement=App.Placement(App.Vector(stepx*i,20000,0),App.Rotation(App.Vector(0,1,0),90))\t \tfor j in range(0,coly): \t\tif not (isEmpty(my[j])): \t\t\tmy[j].Placement=App.Placement(App.Vector(20000,stepy*j,0),App.Rotation(App.Vector(1,0,0),90))\t\t\t\t\t\t\t\t \t#App.ActiveDocument.addObject('Part::Feature','Line002').Shape=App.ActiveDocument.Line002.Shape.removeSplitter() \t#App.ActiveDocument.Common.Shape.BoundBox.ZMax\t \tApp.ActiveDocument.recompute() \tx1=rThickness \ty1=rThickness \tyMax = 0 \t#from typing import Dict, List \tall = list()#List[DocumentObject]  \tfor i in range(0,colx): \t\tif not (isEmpty(mx[i])): \t\t\tif (x1+(mx[i].Shape.BoundBox.XMax-mx[i].Shape.BoundBox.XMin)) &gt; sx: \t\t\t\tx1 = 0  \t\t\t\ty1 = yMax+rThickness*3 \t\t\tx=mx[i].Shape.BoundBox.XMin \t\t\ty=mx[i].Shape.BoundBox.YMin \t\t\tz=mx[i].Shape.BoundBox.ZMin\t \t\t\tmx[i].Placement.move(FreeCAD.Base.Vector(-x+x1+rThickness*3,-y+y1,-z))\t\t\t \t\t\tx1=mx[i].Shape.BoundBox.XMax \t\t\tif (mx[i].Shape.BoundBox.YMax&gt;yMax): \t\t\t\tyMax = mx[i].Shape.BoundBox.YMax \t\t\tall.append(App.activeDocument().getObject(mx[i].Name)) \tfor j in range(0,coly): \t\tif not (isEmpty(my[j])): \t\t\tif (x1+(my[j].Shape.BoundBox.XMax-my[j].Shape.BoundBox.XMin)) &gt; sx: \t\t\t\tx1 = 0  \t\t\t\ty1 = yMax+rThickness*3\t\t \t\t\tx=my[j].Shape.BoundBox.XMin \t\t\ty=my[j].Shape.BoundBox.YMin \t\t\tz=my[j].Shape.BoundBox.ZMin \t\t\tmy[j].Placement.move(FreeCAD.Base.Vector(-x+x1+rThickness*3,-y+y1,-z)) \t\t\t#App.ActiveDocument.recompute() \t\t\tx1=my[j].Shape.BoundBox.XMax \t\t\t#print \"--\"+str(x1) \t\t\t#y1=my[j].Shape.BoundBox.YMax \t\t\tif (my[j].Shape.BoundBox.YMax&gt;yMax): \t\t\t\tyMax = my[j].Shape.BoundBox.YMax \t\t\tall.append(App.activeDocument().getObject(my[j].Name)) \t#print all \tGui.activeDocument().getObject(name).Visibility=False \tApp.activeDocument().addObject(\"Part::Compound\",\"Compound\") \tApp.activeDocument().Compound.Links = all \tApp.ActiveDocument.recompute() \treturn \"\"    slice(\"\")    <\/code><\/pre>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0444\u0435\u0440\u0430 (App.ActiveDocument.addObject(&#171;Part::Sphere&#187;,&#187;Sphere&#187;)) <\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435, \u043e\u043d\u0430 \u043d\u0430\u0440\u0435\u0437\u0430\u0435\u0442\u0441\u044f \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0440\u0435\u0448\u0435\u0442\u043a\u043e\u0439 \u0440\u0430\u0441\u0441\u0435\u043a\u0430\u044e\u0449\u0438\u0445 Box&#8217;\u043e\u0432:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0435\u0435 &#8212; \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0435 \u0432\u044b\u0441\u043e\u0442\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0443 \u043f\u0440\u043e\u0434\u043e\u043b\u044c\u043d\u044b\u0445 \u0438 \u043f\u043e\u043f\u0435\u0440\u0435\u0447\u043d\u044b\u0445 \u0440\u0435\u0431\u0435\u0440 \u0432\u044b\u0440\u0435\u0437\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u0437. \u0422\u0430\u043a \u043a\u0430\u043a \u0443 \u043c\u0435\u043d\u044f \u0444\u0440\u0435\u0437\u0435\u0440, \u0430 \u043d\u0435 \u043b\u0430\u0437\u0435\u0440\u043d\u044b\u0439 \u0441\u0442\u0430\u043d\u043e\u043a, \u043f\u0430\u0437\u044b \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c, \u0438\u043d\u0430\u0447\u0435 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0440\u0430\u0434\u0438\u0443\u0441\u0430 \u0444\u0440\u0435\u0437\u044b \u043f\u0440\u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0435 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0430\u0437\u044b \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c\u0438. \u041d\u043e \u0440\u0435\u0431\u0440\u0430 \u0435\u0449\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0430 \u043b\u0438\u0441\u0442\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e compaund&#8217;\u0430 \u0438\u0437 \u0432\u0441\u0435\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u043a\u0430. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0441\u043c\u043e\u0433 (\u043c\u043e\u0436\u0435\u0442, \u043a\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Job, \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0444\u0440\u0435\u0437\u044b, \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u0445. \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e profile (\u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c &#171;\u041f\u0435\u0440\u0435\u043c\u044b\u0447\u043a\u0438 \u0434\u043b\u044f \u0443\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0435&#187;, \u0438\u043d\u0430\u0447\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u0440\u0430\u0437\u0431\u0440\u043e\u0441\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0442 \u043b\u0438\u0441\u0442\u0430):<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0442\u0441\u044e\u0434\u0430 \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c G-\u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u043a\u0430:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0438\u0434\u0435\u043e-\u0432\u0435\u0440\u0441\u0438\u044f: <\/p>\n<p><iframe id=\"60eb5a7cf2fa57a26f179f7e\" src=\"https:\/\/embedd.srv.habr.com\/iframe\/60eb5a7cf2fa57a26f179f7e\" class=\"embed_video embed__content\" allowfullscreen=\"true\"><\/iframe><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/567176\/\"> https:\/\/habr.com\/ru\/post\/567176\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-326283","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=326283"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326283\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=326283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=326283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=326283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}