Skip to content

Commit

Permalink
Removed cyclic import
Browse files Browse the repository at this point in the history
  • Loading branch information
gumyr committed Jul 18, 2023
1 parent 702296f commit d2d5422
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/build123d/jupyter_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

from vtkmodules.vtkIOXML import vtkXMLPolyDataWriter

from build123d.topology import Shape
# from build123d.topology import Shape

DEFAULT_COLOR = [1, 0.8, 0, 1]

Expand Down Expand Up @@ -181,7 +181,10 @@


def to_vtkpoly_string(
shape: Shape, tolerance: float = 1e-3, angular_tolerance: float = 0.1
# shape: Shape, tolerance: float = 1e-3, angular_tolerance: float = 0.1
shape: "Shape",
tolerance: float = 1e-3,
angular_tolerance: float = 0.1,
) -> str:
writer = vtkXMLPolyDataWriter()
writer.SetWriteToOutputString(True)
Expand All @@ -194,7 +197,8 @@ def to_vtkpoly_string(
def display(shape):
payload: List[Dict[str, Any]] = []

if isinstance(shape, Shape):
# if isinstance(shape, Shape):
if hasattr(shape, "wrapped"): # Is a "Shape"
payload.append(
dict(
shape=to_vtkpoly_string(shape),
Expand Down

0 comments on commit d2d5422

Please sign in to comment.