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

Class History

cadquery/occ_impl/shapes.py:5675–5703  ·  view source on GitHub ↗

Operation history.

Source from the content-addressed store, hash-verified

5673
5674
5675class History:
5676 """
5677 Operation history.
5678 """
5679
5680 ops: list[Op]
5681 opDict: dict[str, Op]
5682
5683 def __init__(self) -> None:
5684
5685 self.ops = []
5686 self.opDict = dict()
5687
5688 def __getitem__(self, ix: int | str) -> Op:
5689
5690 if isinstance(ix, str):
5691 return self.opDict[ix]
5692 else:
5693 return self.ops[ix]
5694
5695 def pop(self) -> Op:
5696
5697 return self.ops.pop()
5698
5699 def append(self, op: Op, name: str | None = None) -> None:
5700
5701 self.ops.append(op)
5702 if name:
5703 self.opDict[name] = op
5704
5705
5706BuilderType: TypeAlias = (

Callers 11

test_sewingFunction · 0.90
test_solidFunction · 0.90
test_imprintFunction · 0.90
test_imprint_errorFunction · 0.90
test_history_boolFunction · 0.90
test_history_extrudeFunction · 0.90
test_history_sweepFunction · 0.90
test_history_loftFunction · 0.90
test_history_offsetFunction · 0.90
sweepFunction · 0.85
loftFunction · 0.85

Calls

no outgoing calls

Tested by 9

test_sewingFunction · 0.72
test_solidFunction · 0.72
test_imprintFunction · 0.72
test_imprint_errorFunction · 0.72
test_history_boolFunction · 0.72
test_history_extrudeFunction · 0.72
test_history_sweepFunction · 0.72
test_history_loftFunction · 0.72
test_history_offsetFunction · 0.72