X3DOM plot issue: dolfin.cpp.io.X3DOM: No constructor defined!

Issue #1074 new
yang zhou created an issue

As discussed in https://fenicsproject.discourse.group/t/x3dom-plots-jupyter/639/2, the syntax to plot with X3DOM should be modified from

HTML(X3DOM().html(mesh))

to

HTML(X3DOM.html(mesh)

Since

from dolfin import *

print(type(X3DOM))
print(type(X3DOM()))

gives error:TypeError: dolfin.cpp.io.X3DOM: No constructor defined!

This bug also exists in plotting.py from line 317:

def _plot_x3dom(obj, kwargs):
    if not isinstance(obj, _x3dom_plottable_types):
        cpp.warning("Don't know how to plot type %s." % type(obj))
        return

    x3dom = dolfin.X3DOM()
    out = x3dom.html(obj)

    return out 

where the x3dom = dolfin.X3DOM() should be replaced with x3dom = dolfin.X3DOM ?

The TypeError mentioned above arises when plotting with parameter backend = 'x3dom' specified.

Dolfin version: 2019.1.0

Comments (0)

  1. Log in to comment