Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2015 +/- ##
=======================================
Coverage 95.00% 95.00%
=======================================
Files 30 30
Lines 8742 8749 +7
Branches 1298 1298
=======================================
+ Hits 8305 8312 +7
Misses 289 289
Partials 148 148 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
lorenzncode
left a comment
There was a problem hiding this comment.
There is one issue with jupyter_tools.:
I tested a fix like this:
def display(shape):
payload: List[Dict[str, Any]] = []
if isinstance(shape, Shape):
shape_faces, shape_edges = toString(shape)
payload.append(
dict(
shape=shape_edges,
color=(0.0, 0.0, 0.0, 1.0),
position=[0, 0, 0],
orientation=[0, 0, 0],
)
)
payload.append(
dict(
shape=shape_faces,
color=DEFAULT_COLOR + (1,),
position=[0, 0, 0],
orientation=[0, 0, 0],
)
)
elif isinstance(shape, Assembly):
payload = toJSON(shape)
else:
raise ValueError(f"Type {type(shape)} is not supported")
code = TEMPLATE.format(data=dumps(payload), element="element", ratio=0.5)
return Javascript(code)|
Thanks for the catch @lorenzncode ! Fixed now. BTW: in the long term we might need to go for your approach to be able to color individual faces. Do you know if there is a way to serialize the mapping in vtk and deserialize in vtk.js? |
Thanks @adam-urbanczyk ! Regarding the mapping, I don't know. I have not tested something like that yet. |
Solves #1998