Closed flolu closed 2 years ago
Hello, how did you do ?
I can't find an Opencascade.js code working for this one :(, only pythonocc-core
Hey @gabrielgriesser. I'm sorry. I only used this with pythonocc-core and I have never checked if it is also available in Opencascade.js. I recommend you to create a new issue in this repository. Maybe someone from the creators know how to access the IdentLabel
Thank you for your answer @flolu
I used your code with the opencascade.js library, but the function DownCast
in line item = StepRepr_RepresentationItem.DownCast(item)
cannot be found in this library.
I presume that this function has not been imported yet.
Here is my code
let anExplorer = new oc.TopExp_Explorer_2(shape, oc.TopAbs_ShapeEnum.TopAbs_FACE, oc.TopAbs_ShapeEnum.TopAbs_SHAPE);
for (anExplorer.Init(shape, oc.TopAbs_ShapeEnum.TopAbs_FACE, oc.TopAbs_ShapeEnum.TopAbs_FACE); anExplorer.More(); anExplorer.Next()) {
let item = transferReader.EntityFromShapeResult(anExplorer.Current(), 4);
console.log("ITEM : " + model.get().IdentLabel(item));
// print only 0
}
@donalffons have you some tips on it ?
I'm using the following code to read a STEP file:
And let's suppose this data is inside my STEP file:
How can I read the ID's of the
ADVANCED_FACE
instances? (#417
,#418
and#419
)Maybe it is possible with a
XSControl_TransferReader
(reader.WS().get().TransferReader().get()
), but I couldn't make it work.