Make the OCC bottle example.
(self)
| 2079 | r.largestDimension() |
| 2080 | |
| 2081 | def testOccBottle(self): |
| 2082 | """ |
| 2083 | Make the OCC bottle example. |
| 2084 | """ |
| 2085 | |
| 2086 | L = 20.0 |
| 2087 | w = 6.0 |
| 2088 | t = 3.0 |
| 2089 | |
| 2090 | s = Workplane(Plane.XY()) |
| 2091 | # draw half the profile of the bottle |
| 2092 | p = ( |
| 2093 | s.center(-L / 2.0, 0) |
| 2094 | .vLine(w / 2.0) |
| 2095 | .threePointArc((L / 2.0, w / 2.0 + t), (L, w / 2.0)) |
| 2096 | .vLine(-w / 2.0) |
| 2097 | .mirrorX() |
| 2098 | .extrude(30.0, True) |
| 2099 | ) |
| 2100 | |
| 2101 | # make the neck |
| 2102 | p.faces(">Z").workplane().circle(3.0).extrude( |
| 2103 | 2.0, True |
| 2104 | ) # .edges().fillet(0.05) |
| 2105 | |
| 2106 | # make a shell |
| 2107 | p.faces(">Z").shell(0.3) |
| 2108 | self.saveModel(p) |
| 2109 | |
| 2110 | def testSplineShape(self): |
| 2111 | """ |
nothing calls this directly
no test coverage detected