
Tue, 05/06/2025 - 18:02
Hello,
I updated to the latest master branch, and am trying to save STEP files as GLTF, which would would include the edges (as was implemented here). The way I'm doing this is by opening the document, meshing with BRepMesh_IncrementalMesh
, then saving with RWGltf_CafWriter::Perform
.
I tried opening the resulting GLTF in the same online viewer linked in the issue, but I don't see any edges (see attached picture)
Is there some parameter that needs to be set for this to work? Is it on by default? Is there some constraint on when this can be used?
I'm attaching a binary, draco compressed file I produced with the latest master (7aa8558)
Attachments:
Tue, 05/06/2025 - 18:54
Hello, could you please share the original file? Do it have edges? Some topology structure can have issues, we need to check and fix them if they exist.
As for an option - writing edge is enabled by default.
Best regards, Dmitrii,
Tue, 05/06/2025 - 18:58
Here's the original step file attached.
Is there a sample of a Step file that should work, that I can test?
Wed, 05/07/2025 - 19:03
You model have no "free edges", edges which are not a part of face topology. You can check the result on the model, where the free edges or vertexes presented.
Tue, 05/13/2025 - 11:56
Would an approach like this work?
Tue, 05/13/2025 - 12:33
Yes, looks like that it will work. You can simply adding shape to doc, by just AddShape method.
Best regards, Dmitrii.
Tue, 05/13/2025 - 14:07
Thanks, and if you can explain one more thing. What would the correct way be, to check if the Step file already contains these free edges or not?
Tue, 05/13/2025 - 14:35
Check can be done by checking edge which are not a part of wire or wires not part of face:
Free edge - edge which is not a part of Face(through Wire).
Best regards, Dmitrii.
Thu, 05/15/2025 - 16:09
Ok, I was able to do this. At the beginning it wasn't working, it turns out it doesn't work with
gltfWriter.SetMergeFaces(true)
. After turning it off the edges are added to the gltf. Seems like a bug to me, I can look into this a bit.I also found that the exported edges look dashed. I opened an issue for this here, and I have a fix for that that I will submit now.
Thu, 05/15/2025 - 16:38
Yes, it looks like as a bug. Thank you.
Best regards, Dmitrii.
Tue, 05/20/2025 - 13:25
Hi Dmitrii,
Found a fix for the merged faces: https://github.com/Open-Cascade-SAS/OCCT/pull/554
Note that this reverts the fix with the linestrip I previously submitted. Details in the PR.
Thu, 05/08/2025 - 10:15
Is it possible to create these free edges from the original model, so that they are displayed in the gltf file?