Test other planes other than the normal ones (XY, YZ)
(self)
| 3077 | self.assertEqual(6, s.faces().size()) |
| 3078 | |
| 3079 | def testPlanes(self): |
| 3080 | """ |
| 3081 | Test other planes other than the normal ones (XY, YZ) |
| 3082 | """ |
| 3083 | # ZX plane |
| 3084 | s = Workplane(Plane.ZX()) |
| 3085 | result = ( |
| 3086 | s.rect(2.0, 4.0) |
| 3087 | .extrude(0.5) |
| 3088 | .faces(">Z") |
| 3089 | .workplane() |
| 3090 | .rect(1.5, 3.5, forConstruction=True) |
| 3091 | .vertices() |
| 3092 | .cskHole(0.125, 0.25, 82, depth=None) |
| 3093 | ) |
| 3094 | self.saveModel(result) |
| 3095 | |
| 3096 | # YX plane |
| 3097 | s = Workplane(Plane.YX()) |
| 3098 | result = ( |
| 3099 | s.rect(2.0, 4.0) |
| 3100 | .extrude(0.5) |
| 3101 | .faces(">Z") |
| 3102 | .workplane() |
| 3103 | .rect(1.5, 3.5, forConstruction=True) |
| 3104 | .vertices() |
| 3105 | .cskHole(0.125, 0.25, 82, depth=None) |
| 3106 | ) |
| 3107 | self.saveModel(result) |
| 3108 | |
| 3109 | # YX plane |
| 3110 | s = Workplane(Plane.YX()) |
| 3111 | result = ( |
| 3112 | s.rect(2.0, 4.0) |
| 3113 | .extrude(0.5) |
| 3114 | .faces(">Z") |
| 3115 | .workplane() |
| 3116 | .rect(1.5, 3.5, forConstruction=True) |
| 3117 | .vertices() |
| 3118 | .cskHole(0.125, 0.25, 82, depth=None) |
| 3119 | ) |
| 3120 | self.saveModel(result) |
| 3121 | |
| 3122 | # ZY plane |
| 3123 | s = Workplane(Plane.ZY()) |
| 3124 | result = ( |
| 3125 | s.rect(2.0, 4.0) |
| 3126 | .extrude(0.5) |
| 3127 | .faces(">Z") |
| 3128 | .workplane() |
| 3129 | .rect(1.5, 3.5, forConstruction=True) |
| 3130 | .vertices() |
| 3131 | .cskHole(0.125, 0.25, 82, depth=None) |
| 3132 | ) |
| 3133 | self.saveModel(result) |
| 3134 | |
| 3135 | # front plane |
| 3136 | s = Workplane(Plane.front()) |