MCPcopy
hub / github.com/CadQuery/cadquery / revolve

Method revolve

cadquery/occ_impl/shapes.py:4515–4547  ·  view source on GitHub ↗

Attempt to revolve the list of wires into a solid in the provided direction :param outerWire: the outermost wire :param innerWires: a list of inner wires :param angleDegrees: the angle to revolve through. :type angleDegrees: float, anything less than 360 deg

(
        cls,
        outerWire: Wire,
        innerWires: list[Wire],
        angleDegrees: Real,
        axisStart: VectorLike,
        axisEnd: VectorLike,
    )

Source from the content-addressed store, hash-verified

4513 @mypyclassmethod
4514 @multimethod
4515 def revolve(
4516 cls,
4517 outerWire: Wire,
4518 innerWires: list[Wire],
4519 angleDegrees: Real,
4520 axisStart: VectorLike,
4521 axisEnd: VectorLike,
4522 ) -> Solid:
4523 """
4524 Attempt to revolve the list of wires into a solid in the provided direction
4525
4526 :param outerWire: the outermost wire
4527 :param innerWires: a list of inner wires
4528 :param angleDegrees: the angle to revolve through.
4529 :type angleDegrees: float, anything less than 360 degrees will leave the shape open
4530 :param axisStart: the start point of the axis of rotation
4531 :param axisEnd: the end point of the axis of rotation
4532 :return: a Solid object
4533
4534 The wires must not intersect
4535
4536 * all wires must be closed
4537 * there cannot be any intersecting or self-intersecting wires
4538 * wires must be listed from outside in
4539 * more than one levels of nesting is not supported reliably
4540 * the wire(s) that you're revolving cannot be centered
4541
4542 This method will attempt to sort the wires, but there is much work remaining to make this method
4543 reliable.
4544 """
4545 face = Face.makeFromWires(outerWire, innerWires)
4546
4547 return cls.revolve(face, angleDegrees, axisStart, axisEnd)
4548
4549 @classmethod
4550 @multimethod

Callers

nothing calls this directly

Calls 4

toPntMethod · 0.95
toDirMethod · 0.95
VectorClass · 0.85
makeFromWiresMethod · 0.45

Tested by

no test coverage detected