donalffons / opencascade.js-examples

example repository for opencascade.js

Home Page:https://ocjs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BRepTools, read a brep file

JoseGR-C opened this issue · comments

Hello.
I'm doing some test in the java script wrapper and I'd like to open a brep file that I've created in the python wrapper. I can open it in python and CAD Assistant so i think that the file is ok.
In js I'm trying to:

      const stepShape = new oc.TopoDS_Shape();
      const builder = new oc.BRep_Builder();
      const reader = oc.BRepTools.Read_2(stepShape,"myShape.brep",new oc.BRep_Builder(),new oc.Message_ProgressRange_1());

But my stepShape always is empty. What I'm doing wrong?
Thanks