Creates a 2D offset wire. :param d: thickness. Negative thickness denotes offset to inside. :param kind: offset kind. Use "arc" for rounded and "intersection" for sharp edges (default: "arc") :param forConstruction: Should the result be added to pending wires?
(
self: T,
d: float,
kind: Literal["arc", "intersection", "tangent"] = "arc",
forConstruction: bool = False,
)
| 4344 | return self |
| 4345 | |
| 4346 | def offset2D( |
| 4347 | self: T, |
| 4348 | d: float, |
| 4349 | kind: Literal["arc", "intersection", "tangent"] = "arc", |
| 4350 | forConstruction: bool = False, |
| 4351 | ) -> T: |
| 4352 | """ |
| 4353 | Creates a 2D offset wire. |
| 4354 | |
| 4355 | :param d: thickness. Negative thickness denotes offset to inside. |
| 4356 | :param kind: offset kind. Use "arc" for rounded and "intersection" for sharp edges (default: "arc") |
| 4357 | :param forConstruction: Should the result be added to pending wires? |
| 4358 | |
| 4359 | :return: CQ object with resulting wire(s). |
| 4360 | """ |
| 4361 | |
| 4362 | ws = self._consolidateWires() |
| 4363 | rv = list(chain.from_iterable(w.offset2D(d, kind) for w in ws)) |
| 4364 | |
| 4365 | self.ctx.pendingEdges = [] |
| 4366 | if forConstruction: |
| 4367 | for wire in rv: |
| 4368 | wire.forConstruction = True |
| 4369 | self.ctx.pendingWires = [] |
| 4370 | else: |
| 4371 | self.ctx.pendingWires = rv |
| 4372 | |
| 4373 | return self.newObject(rv) |
| 4374 | |
| 4375 | def _locs(self: T) -> List[Location]: |
| 4376 | """ |