Fri, 05/01/2020 - 22:41
Forums:
I am trying to export VRML with Draw using WriteVrml. It works but only after I use XDisplay to render the document on the view. Without, the VRML is generated but only has a header and no geometry content:
Draw[25]> pwd
C:/OpenCASCADE-7.4.0-vc14-64/opencascade-7.4.0/data/step
Draw[28]> ReadStep D screw.step
File STEP to read : screw.step
Document saved with name D
Draw[31]> WriteVrml D screw.wrl
screw.wrl:
#VRML V2.0 utf8
WorldInfo {
info [
"Generated by Open CASCADE Technology 7.4"
]
}
After rendering with XDisplay it works:
Draw[26]> vclear
Draw[27]> vinit View1
Driver1/Viewer1/View1
Draw[28]> ReadStep D screw.step
File STEP to read : screw.step
Document saved with name D
Draw[29]> XDisplay -dispMode 1 D
D:the product name
Draw[31]> WriteVrml D screw.wrl
How can I avoid the rendering ?
Mon, 05/04/2020 - 16:27
Let me know if I can provide anything else to help. WriteStep and WriteIges works as expected, eg. without displaying.
Tue, 05/05/2020 - 20:58
Hi Andreas,
never worked with Draw, but could you try to do
after reading and before writing?
I assume
need tesselation on the shape before writing. If you do a display this is done by AIS.
Best regards,
Patrik
Wed, 05/06/2020 - 00:27
Thank you much. Indeed, generating a mesh worked:
The incmesh command is not documented in https://www.opencascade.com/doc/occt-7.4.0/overview/html/occt_user_guides__test_harness.html
I only used draw to reproduce a problem with python. I see that incmesh is the tcl command interface to https://www.opencascade.com/doc/occt-7.4.0/refman/html/class_b_rep_mesh___incremental_mesh.html
Are there examples or recommendations on how to use that class ? How does AIS determine good deflection values ?
Wed, 05/06/2020 - 02:48
Thanks that worked !
I am using draw to reproduce an issue I had with python. incmesh uses
https://www.opencascade.com/doc/occt-7.4.0/refman/html/class_b_rep_mesh___incremental_mesh.html#details
Do you of examples or recommendation on how to use BRepMesh_IncrementalMesh ?
Especially with regards to automating deviation parameter selection ? How does AIS choose those for presentation triangulation ?
Thanks for any feedback or input.
Thu, 05/14/2020 - 11:35
You should ask the OCCT people about the calculation/definition of the default parameters.
Thu, 05/14/2020 - 22:25
Well, I started to dig through the source but I could not find anything special, just default values, and I think relative to bounding box size.