Thu, 09/08/2011 - 12:31
Forums:
Hi, pioneer!!
As previous project,
I made a 2D Structed and unstructed mesh generation (only use GDI)
for a fluid FEM (finite element method)
Now, I got a new project using 3D volume mesh.
I have to make a 3D volume mesh editor.
First, User make a 3D mesh using Line or Cloud Points.
Second. User set a boundary condition.
1. Is it Possible by pure OCCT ?
2. Is there a supported commercial product ?
Thanks in advance !!!
Thu, 09/08/2011 - 13:43
Hello Brad Lee,
I am interested to see your 2d FEM GDI example and would be happy to help you port this to OCC,
the step to make this will be the following:
- define your framework (QT/MFC/.NET)
-Create a window
-create a occ 3d viewport
-you will subclass the AIS_Interactive object and make your own
you will pass to this object a structure where you keep all the data(triangles,nodes,tetahedrons,labels,strain per node, strain per face, etc))
- you get the interactive context
- you feed an instance of your new subclass to the display function of the interactive context , and it gets added to the view.
-inside your custom subclass AIS_interactive object theres a virtual function compute
theres one for 2d one for 3d and another for HLR
in it you use occ generic functions for drawing to opengl.
entities are called groups and 3d structures
but for starters, you use only one group and only one 3d structure to make it simple
and you draw everything using opengl primitives using this group.
the basic usage is
group.beginprimitive
draw primitive
group.end primitive.
the group of the presentation object allows you to draw
lines , polygons, points , polygons with holes.
you can either draw a single item, one a t a time or , store them in an array and then draw them in a single shot calling drawarrayprimitive.
theres also facilities for registering objects to allow them to be selectable, like if you would like user to select a tetrahedron versus a triangle or a node, or a group of tetrahedrons.
Hope this helps.
post more on the project and i would be glad to help.
AlexP