What next for QtOCC?

It likes at version 11 we have a Qt4 widget for OpenCascade that now, pretty much, will render objects, and can load breps, iges and step. I've basically taken a week off, doing other "stuff".

I did have a plan and direction for an application, but I'd like to ask what direction you'd like to see it take. There seems to be many needs, such as CAD, FEM and geometry laboratories. What's you're thoughts?

Pete

Alvaro's picture

Hi Pete,

I was thinking of:

1) document tree (inegrated in the viewport)
2) python wrapping
3) multiview
4) extended visualization: coin3d, vtk
5) selection tools and improvement
6) mesh quality generation control
7) shape healing
8) "look" improvement, such as linux axis, they're too big. Try to find something newer than CATIA-solidworks look

I hope there are some good ideas here.

.alvaro.

marc.britten's picture

Hey Pete,

I've started playing with Snap's

currently have the basic architecture in place and I'm working on snapping to Vertex.

Brushing off a lot of down time so I'm pretty much groping around the OCC libraries to do it again.

To the guy that wanted the Shape tree, I had a working version using some of the exoTK lib stuff. But it was not IMO a good implementation looking back.

However pulling out the tree from the existing geometry is not that hard. Just the GUI architecture for it.

P Dolbey's picture

Hi Marc,

Good to hear from you. Have you tried the 0.11 version. It seems to work without having the inherit from QGLWidget. I'll be in touch to catch up.

Pete

marc.britten's picture

Yeah, actually what got my back off my butt was that I ran into the other thread that spawned .11 do I d/led that and worked as a base from there.

P Dolbey's picture

Hi Marc,

Good to hear from you. Have you tried the 0.11 version. It seems to work without having the inherit from QGLWidget. I'll be in touch to catch up.

Pete

Alvaro's picture

Marc,

Thanks for your reply. Actually I know how to do all the stuff that I've listed there, some of them are already done. As you said, exoTK is an example of tree extraction. I don't like its code although it is commented. About the GUI architecture, I think an auxiliary qt widget would be easier, but it is much nicer to build it inside the opengl view.

Snapping is a nice feature, but I would like to ask why could you need it if you don't have modeling features. Do you want to snap imported models?

Regards,

.alvaro.

marc.britten's picture

Snap seemed easier than some of the other things ;)

It also made me learn a bit about how the internals work for the geometry and brushed off my coding skills a bit (I used to be a programmer but that was about 5 years ago).

My short term goal is to modify QtOCC to have a Tree like you mentioned. Then also a Sketcher model. The sketcher would be to draw a simple shape outline, then you could import that into a "real" model.

This would give us basic wireframe modeling (point, line, arc, circle, etc). Then the real 3D model could do the extrusion, and all the little touchup bits.

exotk is pretty nice, though a bear to get into, but the guy who wrote it is very busy and probably not going to get back into it. Me and Pete had talked to him briefly back around Dec.

Alvaro's picture

The sketcher is a nice idea too.
Are you going to start this as a project somehow or you plan to work with Pete on your own?

regards,

.alvaro.

marc.britten's picture

Not much of a plan. I've just been tinkering.

Back last winter I just emailed Pete diffs for what I was working on and he'd intigrate them with what he was doing. THen I'd just D/L the latest revision he posted.

Then I bought a new house and spent the last of the winter and spring and summer not working on it ;) Now I have enough free time to tinker a little every week.

I'll email Pete my snap stuff when I get done cleaning it up. I have it "working" (it doesn't move the pointer, but will hold the 3D position as long as you're near the object)

So far the only thing that snaps are vertex and only tested on a vertex that I created. So a little more work before I can ship it off.

P Dolbey's picture

And I started looking at various things I could add into a design, like various widgets and other resources that I could put together with a good MVC pattern. I also spent a lot of time looking at (well at least downloading) just about every other scientific Qt4 based open source system I could find.

But I kept getting drawn back to the fact that my core widget didn't work properly on all platforms, so I unpicked the code back to basics, wrapped a test harness around (hence the arrival of QtOCCHarness. If you look at the files I've actually deployed, there's one or two that aren't actually used in the demo, like qtoccviewframe.cpp, but they are used in my GUI prototype.

At work, I've been using some of the idea from "Extreme Programming" techniques with a development team I've been working with. Basically, the idea is to work to a number of small achievable goals, rather than try to invent the world. So one idea is to do nothing more than develop QtOCC to draw lines. However, this should be done with a extendable MVC model, that enables Undo/Redo, and uses both rendering and a treeview to edit the data. I'm also wondering whether this should also use a scripting model as well. Its a simple target, but hopefully sets the pattern for a fully realised design.

Just my 5c

Pete

marc.britten's picture

Sounds like a good plan.

We just need to make sure the upper arch is open to multiple view types etc for future growth, then focus on the basic sketcher arch.

Once thats done we pick the next goal.

If we have a small team as the 3 posters to this thread then we can divide up the tasks.

I have no problem contributing as long as everyone understands that I have limited time (I think I spent about 5 hours since .11 was released picking at snaps) A concrete TODO list will help with that.

Alvaro's picture

I think it is a good plan and I would like to help with this. I have quite a lot of work, so I'm not very efficient, but I have interest.

I'm specially interested in various visualization stuff. I've been using CATIA for 2 years and I've discovered through my short occ experience that it is quite similar, but that I would improve the visualization features (among other things). I was thinking to do some stuff related to beautifying, space analysis, HLR and shape analysis. The python wrapping is intended to do the job of DRAW, but not using TCL. I have notions of how to do this, but I actually can't "see" how much this could take.

.alvaro.

marc.britten's picture

I'm sure that pete knows, but I just wanted to state that my main interest is in CAD more than meshing.

I would like a simple 3D CAD app that I can draw up my home shop projects up in so I can visualize things a bit better. Then output a 2D print with a 3D view as well to bring into the shop with me.

And it has to run on linux ;)

Theres a few things out there for Linux but nothing simple enough. And it IMO doesn't have to be hard to use to be complex. My only computer CAD experience on the other hand is AutoCAD and not much of that. I learned hand drafting in school but sold my drafting table in my out of state move a few years ago.

Alvaro's picture

I've extensively used Autocad, Varicad (linux), qcad (linux), CATIA, Rhino and tested some others like FormZ, Pro/e. I was since some time ago thinking of what you are talking about (more or less). I'm also 100% linux, since I dropped autocad and catia.

I'm also very interested in the Hidden Line Removal, as you said 2d print from 3d. In my opinion, these would be the order of things for a simple, functioning CAD app:

1) Tree view (OCAF)
2) Selection (tree and viewport), allowing filters like edge, vertex, etc...
3) Undo/redo framework (OCAF)
4) Manipulators (interactive rotation, move, scale)
5) Creation of basic entities with numerical input. gp package-like entities: point, plane, axis.
6) sketcher mode
7) constrains and snapping
8) basic solid features, like extrusion
9) layers
10) python wrapping to access all the stuff that doesn't have a visual interface. At least, things are there.
11) Drawing extraction and some 2d output paper model.
12) Export or print support

If you want just 2d cad, like autocad is really used for, then the list would be:

1) Tree view (OCAF)
2) Selection (tree and viewport), allowing filters like edge, vertex, etc...
3) Undo/redo framework (OCAF)
4) Manipulators (interactive rotation, move, scale)
5) Creation of basic entities with numerical input. gp package-like entities: point, plane, axis.
6) sketcher mode
7) constrains and snapping
8) layers
9) export or print support

What do you think?

Alvaro's picture

Pete,

May I ask you to tell me some of the qt4 based scientific apps that you were taking a look at? Just for curiosity, it will help me have a better idea of what you have in mind...

Thanks!

.alvaro.

walter steffe's picture

Hy Pete

I have just downloaded and built (on Mandriva 10007 Spring) your QtOCC 0.11 and it looks wery well.
I would like use it to interface a CAD file with an electromagnetic solver.
Essentially I need to import a set of touching solid (given as step files) and mesh all the faces (after having made an imprinting of the contacting faces).

Having a little knowledge of OCC internals I have found your code very helpful to understand something about the Opencascade viewers.
If possible I would like to use the 3d viewer for the visualization of a surface mesh on the top of the geometry.
Looking inside of the OCC sources I have seen that there is a "MeshVS_mesh" class
which is derived from "AIS_InteractiveObject" so it seems that an object of this class can be used in a call like:

Handle(AIS_InteractiveContext theContext

Handle(AIS_Shape) AISmesh =new AIS_Shape(meshObj)
theContext->Display(AISmesh) // the

The problem is that the main alghoritms for building a mesh
(AddVertex ...) are not are in the package BrpMesh (and not in "MeshVS_mesh) and the class BrpMesh_mesh is not related with AIS_InteractiveObject.
So I do not understand how is it possible to build a mesh and then to visualize it in the 3D viewer.
If you know the way I would very happy if you can add an example in your QtOCCharness.
A simple square face meshed by a couple of triangles would be sufficient.

Regarding other whishes for next QtOCCversions for me the firts
priority is the "tree browser" which should give the possibility to expand the nodes up to a given topological level (solids/faces/edges...).
It would also be nice if the visible part of a large assembly could be selected trough the tree browser.

Many thanks for your great work

Walter

Sharjith Naramparambath's picture

Hi,
I have been trying all the releases since day one. None compiled on my windows with MinGW and Qt4 free edition. Any targets for win32 qt4 free mingw or only for msvc?

Regards
N. Sharjith

P Dolbey's picture

Nair,

I haven't tested on MinGW - as of Qt 4.3.2 Visual Studio Express Edition is now officially supported by TrollTech with the open source Qt Windows distribution - see http://trolltech.com/developer/notes/changes/changes-4.3.2/.
(Incidentally this also applies to Qt 4.4 snapshots as well).

As far as I know OpenCascade is not supported on the MinGW compiler. However, the developers for GMSH have a MinGW/Cygwin build at http://geuz.org/gmsh/beta/occ/ you might want to look at, although I have not tried using it.

To be honest, with MinGW I wouldn't know if it has to be compiled wtih -DWNT or -DLIN!

What errors are you getting.

Pete

Sharjith Naramparambath's picture

Hi,
Thankyou for guidance.
The changelog for qt 4.3.2 says
"Enabled MSVC project generator for the Qt Open Source edition"

Does the whole qt need to be recompiled for msvc or it is having compatible binaries for both MinGW and msvc? Please help where to get more info.

P Dolbey's picture

Nair,

From what I can tell, the binaries are incompatible. You'd need to recompile Qt4 with the "configure -platform win32-msvc2005" option. If you want to maintain both versions on the same computer, you'd need to have some mechanism for switching environment variables between them (primarily the PATH, QTDIR and QMAKESPEC variables).

Pete

P Dolbey's picture

What next for QtOCC?

Well, I've bitten the bullet and started a project on Sourceforge along with marc, alvaro and walter. Its at http://sourceforge.net/projects/qtocc/
but there's not much to see there yet. We're sort of setting up the shape of the project at the moment - I think its a part time, best endeavours basis for all of us as we all have real jobs and lives as well. However I thought it might be interesting to publicise the "Feature Request" tracker now to see any of you have particular needs that you'd like the project to consider. The tracker is public, so you just need a soureforge login to post.

Cheers,

Pete

Venugopal Gudimetla's picture

Dolbey,
I am bit confused as to which version of QtOCC is the latest and one that works? earlier I got QtOCC-0.11 working. Now I find that you guys have started working on QtOCCHarness-0.1. It appears that QtOCCHarness-0.1 has fewer source files than QtOCC-0.11. Why this?

And I am starting a project on very similar lines: Integrate a CAD tool with a CFD solver and VTK. I have taken up a sektcher example and startd fiddling with it. I am trying to integrate with QT4 and take it from there. I hope and wish I can help eventually with your work.

I don't know what kind Of (Delaunay/Advancing front) Mesher OCC provides, but I want to roll out my own advancing front mesher in few months.

Venu

P Dolbey's picture

Hi Venu,

The QtOCCHarness on SourceForge was a refactoring of the QtOCC-0.11 design, removing some of the experimental ideas I had with regard to its use within shared libaries (DLLs). The harness was designed as a lightweight view for OCC geometry, focussed on delivering a QWidget derived class under Qt4, tested on both Linux and Windows machines and fixing dependencies discovered with respect to certain graphics cards.

At the moment, their has been some work that you can find in the SVN respository to build a simple CAD application using Fotis' salomegeometry libary, also on SourceForge. Unfortunately due to personal circumstances and the impact of a new job, I have not been as active as I might have liked. However on the positive side, I am building a new environment on a Vista based Dell laptop so I can work away from home when I get the chance.

From a meshing perspective, I was planning to utilise either NETGEN or GMSH as meshers withinn the target architecture, perhaps via a port of Salome's MESH module. Both of the these meshers have already got OCC interfaced internally, so it seems a logical direction. TETGEN also offers a further possibility for meshing STL based geometries. It would be worth reviewing these codes before creating yet another application, but if you have a plan I would be pleased to offer any assistance I can.

Pete

Venugopal Gudimetla's picture

Thanks Pete for the calrification and additional info on Meshers, I certainly will check them out. I will stick with QtOCCHarness version and build from there, because I already have some gui running with qt3. Do you have any examples with Geometry Tree widget? (eg volum-|_surface-_|edge-_|vertices) functionality that I can take a look at ?
Thanks,
Venu