From 51373fbc35cc4ce1bcfad8640b6a7ec6226d5046 Mon Sep 17 00:00:00 2001 From: Ruben Date: Tue, 12 Jan 2021 18:49:36 +0100 Subject: [PATCH] Fix split docs --- cadquery/cq.py | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/cadquery/cq.py b/cadquery/cq.py index da0bc02d4..bf406d1aa 100644 --- a/cadquery/cq.py +++ b/cadquery/cq.py @@ -232,21 +232,22 @@ def _collectProperty(self, propName: str) -> List[CQObject]: def split(self, keepTop: bool = False, keepBottom: bool = False) -> "Workplane": """ - Splits a solid on the stack into two parts, optionally keeping the separate parts. - - :param boolean keepTop: True to keep the top, False or None to discard it - :param boolean keepBottom: True to keep the bottom, False or None to discard it - :raises: ValueError if keepTop and keepBottom are both false. - :raises: ValueError if there is not a solid in the current stack or the parent chain - :returns: CQ object with the desired objects on the stack. - - The most common operation splits a solid and keeps one half. This sample creates - split bushing:: - - #drill a hole in the side - c = Workplane().box(1,1,1).faces(">Z").workplane().circle(0.25).cutThruAll()F - #now cut it in half sideways - c.faces(">Y").workplane(-0.5).split(keepTop=True) + Splits a solid on the stack into two parts, optionally keeping the separate parts. + + :param boolean keepTop: True to keep the top, False or None to discard it + :param boolean keepBottom: True to keep the bottom, False or None to discard it + :raises: ValueError if keepTop and keepBottom are both false. + :raises: ValueError if there is not a solid in the current stack or the parent chain + :returns: CQ object with the desired objects on the stack. + + The most common operation splits a solid and keeps one half. This sample creates + split bushing:: + + # drill a hole in the side + c = Workplane().box(1,1,1).faces(">Z").workplane().circle(0.25).cutThruAll() + + # now cut it in half sideways + c = c.faces(">Y").workplane(-0.5).split(keepTop=True) """ solid = self.findSolid()