openjscad-aurora-webapp

Форк
0
28 строк · 891.0 Байт
1
// title: Hull() 
2
// author: Rene K. Mueller
3
// license: MIT License
4
// date: 2013/04/18
5

6
function showHull() {
7
   var o = Array.prototype.slice.call(arguments);
8
   return union(     // -- we have to extrude all, in order to union (we can't mix CAG and CSG)
9
      linear_extrude({height: 0.1},union(o)).translate([20,0,0]),    // flat single
10
      linear_extrude({height: 0.1},hull(o)).translate([-10,0,0]),    // flat convex hulled
11
      linear_extrude({height: 10},     // convex hulled extruded
12
         hull(o)).translate([-40,0,0])
13
   );
14
}
15

16
function main() {
17
   return [
18
      showHull(
19
         circle({r: 8, center: true}).translate([0,20,0]), 
20
         circle({r: 8, center: true})
21
      ).translate([-20,-20,0]),
22
      
23
      showHull(
24
         circle({r: 8, center: true}).translate([-15,10,0]),
25
         square({size: [10,10], center: true})
26
      ).translate([-20,30,0])
27
   ];
28
}
29

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.