OCC.Display.WebGl.x3dom_renderer module¶
-
class
HTMLBody
(x3d_shapes, axes_plane, axes_plane_zoom_factor=1.0)¶ Bases:
object
x3d_shapes is a list that contains uid for each shape
-
get_str
()¶
-
-
class
HTMLHeader
(bg_gradient_color1='#ced7de', bg_gradient_color2='#808080')¶ Bases:
object
-
get_str
()¶
-
-
class
X3DExporter
(shape, vertex_shader, fragment_shader, export_edges, color, specular_color, shininess, transparency, line_color, line_width, mesh_quality)¶ Bases:
object
A class for exporting a TopoDS_Shape to an x3d file
-
compute
()¶
-
to_x3dfile_string
(shape_id)¶
-
write_to_file
(filename, shape_id)¶
-
-
class
X3DomRenderer
(path=None, display_axes_plane=True, axes_plane_zoom_factor=1.0)¶ Bases:
object
-
DisplayShape
(shape, vertex_shader=None, fragment_shader=None, export_edges=False, color=(0.65, 0.65, 0.7), specular_color=(0.2, 0.2, 0.2), shininess=0.9, transparency=0.0, line_color=(0, 0.0, 0.0), line_width=2.0, mesh_quality=1.0)¶ Adds a shape to the rendering buffer. This class computes the x3d file
-
generate_html_file
(axes_plane, axes_plane_zoom_factor)¶ Generate the HTML file to be rendered wy the web browser axes_plane: a boolean, telles wether or not display axes
-
render
(addr='localhost', server_port=8080, open_webbrowser=False)¶ Call the render() method to display the X3D scene.
-
-
export_edge_to_indexed_lineset
(edge_point_set)¶
-
indexed_lineset_to_x3d_string
(str_linesets, header=True, footer=True, ils_id=0)¶ takes an str_lineset, coming for instance from export_curve_to_ils, and export to an X3D string
-
spinning_cursor
()¶