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

Method makeCone

cadquery/occ_impl/shapes.py:4211–4233  ·  view source on GitHub ↗

Make a cone with given radii and height By default pnt=Vector(0,0,0), dir=Vector(0,0,1) and angle=360

(
        cls,
        radius1: float,
        radius2: 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

4209
4210 @classmethod
4211 def makeCone(
4212 cls,
4213 radius1: float,
4214 radius2: float,
4215 height: float,
4216 pnt: VectorLike = Vector(0, 0, 0),
4217 dir: VectorLike = Vector(0, 0, 1),
4218 angleDegrees: float = 360,
4219 ) -> Solid:
4220 """
4221 Make a cone with given radii and height
4222 By default pnt=Vector(0,0,0),
4223 dir=Vector(0,0,1) and angle=360
4224 """
4225 return cls(
4226 BRepPrimAPI_MakeCone(
4227 gp_Ax2(Vector(pnt).toPnt(), Vector(dir).toDir()),
4228 radius1,
4229 radius2,
4230 height,
4231 radians(angleDegrees),
4232 ).Shape()
4233 )
4234
4235 @classmethod
4236 def makeCylinder(

Callers 2

cskHoleMethod · 0.80
testConeMethod · 0.80

Calls 3

VectorClass · 0.85
toPntMethod · 0.80
toDirMethod · 0.80

Tested by 1

testConeMethod · 0.64