PDA

View Full Version : Outline of multi-facet FEA model (creases)



joolz
11-21-2006, 11:06 AM
Good afternoon chaps

I have developed a Finite Element Postprocessor...

Basically this is a CAD-like app that displays/renders many thousands of quad polygons with scalar data.

My question...

I would like to display the rendered model with just the 'sharp' edges visible (creases if you will). The user then sees a 'wireframe' outline with a fully rendered inner. I currently display ALL outlines of visible polygons but I want to display ONLY the visible edges.

Basically I need to test the angle between adjacent polygons and if they are greater than a given value (say 60 deg) then I store the line in a display list.

Now, I am sure I can do all this, but it will involve quite a bit of work (sorting, cross products etc and will be numerically intensive).... I was wondering if there is a sneaky method built into the OGL API somewhere that I could use before I start the grunt work :-)

Many thanks for any tips guys

kind regards


Julian

EDIT

This is what I have
http://www.cadfem.com/have.gif

This is what I want
http://www.cadfem.com/want.gif

ZbuffeR
11-21-2006, 11:59 AM
There are some image-based tricks that can give a result approximately like you want, but will not give you geometrical precision.

Search for NPR edge rendering, toon shading.

RigidBody
11-21-2006, 12:53 PM
Originally posted by joolz:
Basically I need to test the angle between adjacent polygons and if they are greater than a given value (say 60 deg) then I store the line in a display list. that's exactly what i would do (except the fact that i would use the dot product rather than the cross product to calculate the angle between adjacent faces ;) ).

this should work without problems if you have shell elements, but your model seems to consist of solid elements, right? in that case i recommend that you first program a function which identifies the visible faces on the solid's surface. maybe you've already done that?

joolz
11-22-2006, 12:10 AM
guys

Many thanks.... The NPR stuff sounds interesting... Blue and Red book here we come.

RigidBody... We support all element types 1D, 2D, 3D and I already do a free face extraction on the solid elements (the internal mesh is thrown away) - so what you see in the pictures I posted are, effectively, shell elements.

DOT Product -- ha ha... oops :-)

I will probably release what we have and save this for an update (I suspect it will take several days for me to code this and test). The postprocessor side of our app is a minor (but important) part.

Thanks again guys

This is a great forum..

Can Ozcan
11-22-2006, 06:04 PM
Hey Joolz;

I was checking the forum site and saw your post. Are you developing something open source/free/commercial? And will it be somehow related with Ansys?

Regards...

Can