Skip to content

Commit e544ebf

Browse files
committed
fix doctest
1 parent 64d070f commit e544ebf

File tree

3 files changed

+7
-22
lines changed

3 files changed

+7
-22
lines changed

docs/userguide/basics.model.rst

-2
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ Elements
5555

5656
Elements are defined by the nodes they connect to and a section.
5757

58-
5958
>>>
6059

61-
6260
Parts
6361
=====

src/compas_fea2/UI/viewer/__init__.py

-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
"""
2-
********************************************************************************
3-
Viewer
4-
********************************************************************************
5-
6-
.. currentmodule:: compas_fea2.UI.viewer
7-
8-
.. autosummary::
9-
:toctree: generated/
10-
11-
FEA2Viewer
12-
13-
"""
14-
151
from .viewer import FEA2Viewer
162
from .shapes import (
173
_BCShape,

src/compas_fea2/UI/viewer/viewer.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
from compas.geometry import Translation
1212
from compas.geometry import Vector
1313
from compas.geometry import sum_vectors
14-
from compas_view2.app import App
15-
from compas_view2.objects import Collection
16-
from compas_view2.shapes import Arrow
17-
from compas_view2.shapes import Text
1814

1915
from compas_fea2.model.bcs import FixedBC
2016
from compas_fea2.model.bcs import PinnedBC
@@ -26,8 +22,13 @@
2622
from compas_fea2.UI.viewer.shapes import PinBCShape
2723
from compas_fea2.UI.viewer.shapes import RollerBCShape
2824

29-
# def hextorgb(hex):
30-
# return tuple(i / 255 for i in hex_to_rgb(hex))
25+
try:
26+
from compas_view2.app import App # type: ignore
27+
from compas_view2.objects import Collection # type: ignore
28+
from compas_view2.shapes import Arrow # type: ignore
29+
from compas_view2.shapes import Text # type: ignore
30+
except Exception:
31+
pass
3132

3233

3334
class FEA2Viewer:

0 commit comments

Comments
 (0)