Skip to content

Latest commit

 

History

History
88 lines (62 loc) · 1.64 KB

File metadata and controls

88 lines (62 loc) · 1.64 KB

布尔操作

English

boolean 库

用法

boolean.union({obj1, obj2, obj3,...........});
  • 第一个参数
    • table 类型
      • 表示参数该布尔运算的对象。

table 内的对象可以为 d3object 也可为 user_define_obj

例子

shoulder_screw1 = $shoulder_screw( "english", 1/2, length = 20 )$;
test.code(shoulder_screw1);
cube1 = d3object.cube({10, 10, 10}, true);
union1 = boolean.union({cube1, shoulder_screw11});

与非

boolean 库

用法

boolean.difference({obj1, obj2, obj3,...........});
  • 第一个参数
    • table 类型
      • 表示参数该布尔运算的对象。

table 内的对象可以为 d3object 也可为 user_define_obj

例子

shoulder_screw1 = $shoulder_screw( "english", 1/2, length = 20 )$;
shoulder_screw1.code(shoulder_screw1);
cylinder1 = d3object.cylinder({h = 10, r = 5}, true);
difference1 = boolean.difference({cylinder1, shoulder_screw1});

boolean 库

用法

boolean.intersection({obj1, obj2, obj3,...........});
  • 第一个参数
    • table 类型
      • 表示参数该布尔运算的对象。

table 内的对象可以为 d3object 也可为 user_define_obj

例子

sphere1 = d3object.sphere({h = 10, d = 5});
intersection1 = boolean.intersection({sphere1, shoulder_screw1});
print(code(intersection1));