Showing mesh in the OCT from "draw.bat"

razi

Looking around for some CAD
Hi, I'm a bachelor's student in mechanical engineering at a university in Malaysia having to do mesh in OCT as my final year project. Since I am not fully in the field of coding like a CS student, I only have the basic knowledge of it. Thus, I am using draw.bat to do CAD and some mesh. However, I am not able to view the result of the mesh, and the message shows "null object" or "mesh not exist". Other than that, I try to perform a meshing STL file by uploading the STL file into the OCT. However, the OCT does not read my STL file and shows a message that "file does not exist".

Hoping that someone could possibly help me by giving me some suggestions in terms of these issues that I encountered.
Thanks and Best regard.

Razi
 

natalia

Moderator
Staff member
Hi @razi.

Open Cascade library has the presentation to visualize mesh data. It’s the MeshVS_Mesh class. There are several DRAW commands on how to create and modify the presentation, e.g. ‘meshfromstl’ and ‘mesh3delem’.

The simplest DRAW script to look at this presentation prepared on some predefined data is the next:
Code:
pload VISUALIZATION XSDRAW
vinit
mesh3delem m

The result is:
mesh3delem.png


Another DRAW script to load STL file:
Code:
pload VISUALIZATION XSDRAW
vinit
meshfromstl m C:/OpenCASCADE-7.6.0-vc14-64/opencascade-7.6.0/data/stl/motor.stl

The result is:
motor_stl.png
 

razi

Looking around for some CAD
Hi @razi.

Open Cascade library has the presentation to visualize mesh data. It’s the MeshVS_Mesh class. There are several DRAW commands on how to create and modify the presentation, e.g. ‘meshfromstl’ and ‘mesh3delem’.

The simplest DRAW script to look at this presentation prepared on some predefined data is the next:
Code:
pload VISUALIZATION XSDRAW
vinit
mesh3delem m

The result is:
View attachment 265


Another DRAW script to load STL file:
Code:
pload VISUALIZATION XSDRAW
vinit
meshfromstl m C:/OpenCASCADE-7.6.0-vc14-64/opencascade-7.6.0/data/stl/motor.stl

The result is:
View attachment 266
Mesh success.pngHi @natalia,

Thanks a lot for your suggestions and lesson. Finally, I am able to do the mesh in the OCT and found my problem. Actually, when I enter the code I mistype the " / " as " \ " which is the opposite direction making the OCT not able to find the STL file.
 
Top