MCPcopy Index your code
hub / github.com/CadQuery/cadquery / makeCylinder

Method makeCylinder

cadquery/occ_impl/shapes.py:4236–4256  ·  view source on GitHub ↗

makeCylinder(radius,height,[pnt,dir,angle]) -- Make a cylinder with a given radius and height By default pnt=Vector(0,0,0),dir=Vector(0,0,1) and angle=360

(
        cls,
        radius: float,
        height: float,
        pnt: VectorLike = Vector(0, 0, 0),
        dir: VectorLike = Vector(0, 0, 1),
        angleDegrees: float = 360,
    )

Source from the content-addressed store, hash-verified

4234
4235 @classmethod
4236 def makeCylinder(
4237 cls,
4238 radius: float,
4239 height: float,
4240 pnt: VectorLike = Vector(0, 0, 0),
4241 dir: VectorLike = Vector(0, 0, 1),
4242 angleDegrees: float = 360,
4243 ) -> Solid:
4244 """
4245 makeCylinder(radius,height,[pnt,dir,angle]) --
4246 Make a cylinder with a given radius and height
4247 By default pnt=Vector(0,0,0),dir=Vector(0,0,1) and angle=360
4248 """
4249 return cls(
4250 BRepPrimAPI_MakeCylinder(
4251 gp_Ax2(Vector(pnt).toPnt(), Vector(dir).toDir()),
4252 radius,
4253 height,
4254 radians(angleDegrees),
4255 ).Shape()
4256 )
4257
4258 @classmethod
4259 def makeTorus(

Callers 8

cboreHoleMethod · 0.80
cskHoleMethod · 0.80
holeMethod · 0.80
cylinderMethod · 0.80
testBasicBoundingBoxMethod · 0.80
testMatrixOfInertiaMethod · 0.80
cylindersMethod · 0.80
cylindersMethod · 0.80

Calls 3

VectorClass · 0.85
toPntMethod · 0.80
toDirMethod · 0.80

Tested by 4

testBasicBoundingBoxMethod · 0.64
testMatrixOfInertiaMethod · 0.64
cylindersMethod · 0.64
cylindersMethod · 0.64