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

Method _repr_javascript_

cadquery/cq.py:4424–4434  ·  view source on GitHub ↗

Special method for rendering current object in a jupyter notebook

(self)

Source from the content-addressed store, hash-verified

4422 return self.newObject(rv)
4423
4424 def _repr_javascript_(self) -> Any:
4425 """
4426 Special method for rendering current object in a jupyter notebook
4427 """
4428
4429 if type(self.val()) is Vector:
4430 return "&lt {} &gt".format(self.__repr__()[1:-1])
4431 else:
4432 return Compound.makeCompound(
4433 _selectShapes(self.objects)
4434 )._repr_javascript_()
4435
4436 def __getitem__(self: T, item: Union[int, Sequence[int], slice]) -> T:
4437

Callers 1

test_repr_javascriptMethod · 0.45

Calls 4

valMethod · 0.95
_selectShapesFunction · 0.85
makeCompoundMethod · 0.80
__repr__Method · 0.45

Tested by 1

test_repr_javascriptMethod · 0.36