pythonocc-core icon indicating copy to clipboard operation
pythonocc-core copied to clipboard

same code not working in threejs render

Open bahadiraraz opened this issue 3 years ago • 0 comments

from OCC.Display.WebGl import threejs_renderer
from OCC.Core.gp import gp_Pnt, gp_Dir
from OCC.Core.Geom import Geom_Line
from OCC.Core.BRepBuilderAPI import BRepBuilderAPI_MakeEdge
from OCC.Display.SimpleGui import init_display
display, start_display, add_menu, add_function_to_menu = init_display()
p1 = gp_Pnt(5,5,5)
line_dir = gp_Dir(2,2,7)
my_line = Geom_Line(p1, line_dir).Lin()
my_line = BRepBuilderAPI_MakeEdge(my_line)
my_line.Build()
my_line = my_line.Shape()
display.DisplayShape(my_line)
display.View_Iso()
display.FitAll()
start_display()


my_ren = threejs_renderer.ThreejsRenderer()

p1 = gp_Pnt(5,5,5)
line_dir = gp_Dir(2,2,7)
my_line = Geom_Line(p1, line_dir).Lin()
my_line = BRepBuilderAPI_MakeEdge(my_line)
my_line.Build()
my_line = my_line.Shape()
my_ren.DisplayShape(my_line)

three js renders not working even though the two codes are the same.

bahadiraraz avatar Apr 28 '22 14:04 bahadiraraz