Closed flolu closed 2 years ago
N11opencascade6handleI18Poly_TriangulationEE
is the mangled type name. You can use a Demangler to get the original type name by prepending _Z
, i.e. _ZN11opencascade6handleI18Poly_TriangulationEE
. This gives you opencascade::handle<Poly_Triangulation>
. That type has already been explicitly defined here in OCCT with a macro that defines it as Handle_Poly_Triangulation
. To make template types usable in JS, the template argument has to be resolved by using a typedef.
Long story short: I think you need to add - symbol: Handle_Poly_Triangulation
.
If you ever need to use template types that haven't been defined in OCCT in a similar way, check the full build - it contains a typedef for Handle_IMeshTools_Context
.
Thank you so much for your quick response! This worked.
But what about 18NCollection_Array1I13Poly_TriangleE
?
The demangler outputs: NCollection_Array1<Poly_Triangle>
, but the symbol NCollection_Array1_Poly_Triangle
does not exist. NCollection_Array_Poly_Triangle
does not exist, either.
I've also tried BRepMesh_Triangulator
as defined here in OCCT. But I still get the error: UnboundTypeError: Cannot call Poly_Triangulation.Triangles due to unbound types: 18NCollection_Array1I13Poly_TriangleE
But what about 18NCollection_Array1I13Poly_TriangleE?
That is typedef'd here as Poly_Array1OfTriangle
.
The type can also be seen in typescript definitions (opencascade.d.ts
via npm) and the reference docs.
Thank you so much!
I'm using the following code from openCascadeHelper.js
But the third line throws the following error:
Which bindings am I missing? Is there a list of all available bindings? Note: the code works fine with the full build.
This is my current custom build file: