Slices current solid at the given height. :param height: height to slice at (default: 0) :raises ValueError: if no solids or compounds are found :return: a CQ object with the resulting face(s).
(self: T, height: float = 0.0)
| 4313 | return self._combineWithBase(r, combine, clean) |
| 4314 | |
| 4315 | def section(self: T, height: float = 0.0) -> T: |
| 4316 | """ |
| 4317 | Slices current solid at the given height. |
| 4318 | |
| 4319 | :param height: height to slice at (default: 0) |
| 4320 | :raises ValueError: if no solids or compounds are found |
| 4321 | :return: a CQ object with the resulting face(s). |
| 4322 | """ |
| 4323 | |
| 4324 | solidRef = self.findSolid(searchStack=True, searchParents=True) |
| 4325 | |
| 4326 | plane = Face.makePlane( |
| 4327 | basePnt=self.plane.origin + self.plane.zDir * height, dir=self.plane.zDir |
| 4328 | ) |
| 4329 | |
| 4330 | r = solidRef.intersect(plane) |
| 4331 | |
| 4332 | return self.newObject([r]) |
| 4333 | |
| 4334 | def toPending(self: T) -> T: |
| 4335 | """ |