» TetGen
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

TetGen

plugin
Credits: this is a wrapper for TetGen (www.tetgen.org) by Hang Si, Weierstrass Institute for Applied Analysis and Stochastics (WIAS); www.lichterloh.tv

about

A Quality Tetrahedral Mesh Generator and a 3D Delaunay Triangulator

  

TetGen generates tetrahedral (volumetric) meshes and 3d delaunay triangulations from PLC's (piecewise linear complexes), which essentially are sets of 2d polygons describing the boundaries/hull/surface of a 3d geometry. These polygons are given by their corner points plus indices (in clockwise or counter-clockwise order).

The resulting data (points plus triangular indices) can be used to create a mesh in vvvv. For volume-dependent calculations (my actual use case;)) tetrahedral indices will be output too.

Holes and regions (with differing meshing quality/density) are supported. The 'r' switch (refining existing tetrahedral meshes) is not supported by this plugin.
Optionally input and output files can be written to disk (*.poly,*.node,*.ele,*.face, see here), see Inspector for options.

Fully spreadable, with helpfile(s).

All information on TetGen can be found here:
www.tetgen.org

All switches, which are needed to control the behaviour of TetGen, ie the meshing quality/density, can be found here:
http://wias-berlin.de/software/tetgen/switches.html

   

ToDo:

(reminder to myself)

  • file reader for *.poly,*.node,*.ele,*.face files
  • support the 'r' switch
  • improve RemovRegions performance, no good
  • support point metrics, point attributes (tried nut no luck), facet constraints, segment constraints, etc.
  • run TetGen on a different process to avoid blocking of vvvv (meshing simple geometries might even work in realtime...)
  • normals in dx11 (?)
  • check if spreading actually works ;)
    

Source Code:

As I always struggle (again) to find out eg how Interop between C++ and C# works (and a lot of other plugin related stuff) I'm sharing the full source code here. Be aware, no guarantee any of this is done the way it actually should be done (especially don't copy any of my nuget, addonpack or compiler related settings: i have no idea :)....all input welcome of course!

  • the source code for the unmanaged "TetGen2vvv.dll", which itself calls "tet.lib"(included, compiled with TetGen v1.5 from www.tetgen.org), can be found here:

https://github.com/digitalwannabe/TetGen4vvvv

  • the source code for the vvvv plugin, which calls the unmanaged "TetGen2vvvv.dll" can be found in my addonpack fork:

https://github.com/digitalwannabe/vvvv-sdk/tree/develop/vvvv45/addonpack/src/nodes/plugins/3d/3dTetrahedralize

   

Licenses:

All my code is MIT where possible
TetGen is licensed under AGPLv3, find info on licensing TetGen here

   
   
   

Changelog:

v1.03 :

  • new input: vertex marker
  • new outputs: vertex markers, face markers, region attributes, tetrahedron neighbors
  • new helper node: RemoveRegion, with helpfile. needs performance improvement though

v1.02 :
compiled with /MT to support older vs

v1.01 :

  • bug fixes

v1.0 :

  • initial release
  

Installation Note:

Always copy the dependencies folder (+helpfiles) with the plugin!

download

3dTetrahedralize_b34.2_AnyCPU_v1.04.zip
31.01.17 [01:01 UTC] by digitalwannabe | 908 downloads
v1.04: performance improvements
Show 4 older revisions

Older Revisions

3dTetrahedralize_b34.2_AnyCPU_v1.03.zip
13.10.16 [17:40 UTC] by digitalwannabe | 567 downloads
now supports vertex markers, face markers, neighbors, region attributes
3dTetrahedralize_b34.2_AnyCPU.zip
04.09.16 [20:14 UTC] by digitalwannabe | 539 downloads
v1.02 compiled with /MT
3dTetrahedralize_b34.2_AnyCPU.zip
02.08.16 [16:06 UTC] by digitalwannabe | 499 downloads
v1.01
3dTetrahedralize_b34.2_AnyCPU.zip
23.07.16 [03:10 UTC] by digitalwannabe | 598 downloads
v1.0

tekcor 02/08/2016 - 13:49

Hi :)
Super curious to get it working, but it doesnt find the DLL

TetGen2vvvv.dll

says RendererTTY

digitalwannabe 02/08/2016 - 14:37

hi, do you have the dependencies folder next to the 3dTetrahedralize,dll?

digitalwannabe 02/08/2016 - 16:09

err, sorry, my fault, should be ok now, please try again.

tekcor 02/08/2016 - 19:22

Sorry but still the same error. Is there anything i can try out?
Im on beta34.2 64bit

digitalwannabe 02/08/2016 - 21:21

tbh I haven't tested it on another machine before and there has been some path issues, however, just tested the recent version on another machine and it's working fine, also with b34.2_64....so something else seems to be the problem here...anything else TTY is saying?
you can try copying the TetGen2vvv.dll in dependencies/x64 (as you're running 64 bit) to your vvvv directory, next to vvvv.exe, and also try next to 3dTetrahedralize.dll.....
Please let me know if that's changing anything, unfortunately I'm not able to reproduce the error in order to provide more help.....anybody else got the same problems?

digitalwannabe 07/08/2016 - 13:20

@tekcor: any luck?
anybody else having problems?

sinus 07/08/2016 - 15:46

yes. got tekcors problem as well. can´t find dll. will try your proposed strategy.

digitalwannabe 08/08/2016 - 01:22

hm, very strange. tested it today on 2 other devices without a problem....is TTY saying anything else?
please confirm it doesn't work applying this order (which is what I do):

  • download plugin and unpack
  • start vvvv b34.2 x86 or x64
  • drag and drop 3dTetrahedralize.dll node in the patch
  • select the node and hit F1
  • a triangulated box should be visible now in the renderer
mediadog 08/08/2016 - 04:11

Not working for me, tried everything you listed above, no red nodes but console message that it can't find TetGen2vvvv.dll. This is with 34.2_x64 on Win7 Enterprise x64.

Hmmm, depends.exe shows the file 3dTetrahedralize.dll as an x86 DLL, and gives the error "Modules with different CPU types were found".

So are you sure you've tried it and it works on x64?

digitalwannabe 08/08/2016 - 05:27

yes, tried x86 and x64 on different systems, however, not on windows 7....@tekcor @sinus are you on win7 too? can't see a reason why it shouldn't work on win7, but I don't see any other reason atm either :(

It seems to be some mistake I've done with compiling, very likely as this is one of my first plugins I've precompiled which depends on another c++ library; maybe one of the devs can have a look, as far as I can tell I've followed all available instructions closely.....
anyway, to get around errors I might have done with precompiling please try downloading the plugin source folder (link above) and drop the csproj file in your patch. The according Tetgen2vvvv.dll(x64 or x86) should lie next to vvvv.exe (x64 or x86) for this to work.

sinus 08/08/2016 - 10:32

i work on win7, beta 34.2. 64 bit. thx for your efforts!

digitalwannabe 14/08/2016 - 00:02

good news is it's not win7, as bad news i found a windows 10 pc where it's not working either....or maybe that's the good news, we will see....anyway, won't have access to that pc immediately but i'll try to figure this out asap. anybody else having troubles please report!

tekcor 20/08/2016 - 19:29

yes i am on windows 10.
sorry didnt have time to make further tests yet but still hot topic :)

digitalwannabe 31/08/2016 - 00:40

hm...got access to that computer but no good news unfortunately; tried a lot of stuff, no luck. will do a forum post....

digitalwannabe 03/09/2016 - 15:09

plugins-calling-native-code-work-on-most-computers-on-some-they-dont

@tekcor @sinus @mediadog @anybody else having problems: if any of you can confirm that running the helppatch of spoutcontrols and hit write will NOT create a folder C:\ProgramData\Spout and a txt file in it + you do get the same TTY error this could help a lot in tracking down what's wrong. Atm I believe that for some reason the path to the referenced dlls is not added (correctly) to your PATH environment variables....I'm working on finding a solution.

digitalwannabe 04/09/2016 - 20:17

@everybody who had problems, please try again- it is now working on the system I have access to, please confirm!

mediadog 05/09/2016 - 04:23

Works with both 34.2 x86 and x64! w00t!

However, I do get a "vvvv.exe has stopped working" on exiting though; with x86 it happens with all three patches, on x64 the help patch exits OK but the two facet patches crash on exit. So makes me think there is some memory splatter in there somewhere.

But hey, I can try it out now! Thanks @digitalwannabe!

digitalwannabe 05/09/2016 - 12:13

Hm ok, thanks for the info! Will try to see what's wrong....biggest problem will again be reproducing it, as I had no crashes yet, also not on the system which didn't work before. Anybody else having a crash on shutdown?

Workaround for now would be saving the computed data into a file and load this in your production patch- as in most cases TetGen won't work in realtime you shouldn't need the node in your final patch. I also intend to do read/write nodes at some point, might take a while until I can work on that though.....

anonymous user login

Shoutbox

~20h ago

joreg: vvvvTv S02E01 is out: Buttons & Sliders with Dear ImGui: https://www.youtube.com/live/PuuTilbqd9w

~7d ago

joreg: vvvvTv S02E00 is out: Sensors & Servos with Arduino: https://visualprogramming.net/blog/2024/vvvvtv-is-back-with-season-2/

~8d ago

fleg: hey there! What's the best tool for remote work? Teamviewer feels terrible. Thanks!

~21d ago

joreg: Last call: 6-session vvvv beginner course starting November 4: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-i/

~1mth ago

joreg: Missed the last meetup? You can rewatch it here: https://www.youtube.com/live/MdvTa58uxB0?si=Fwi-9hHoCmo794Ag

~1mth ago

theurbankind: When is the next big event, like node festival ?

~1mth ago

~1mth ago

joreg: Join us for the next vvvv meetup on Oktober 17th: https://visualprogramming.net/blog/2024/25.-vvvv-worldwide-meetup/

~1mth ago

joreg: 6 session beginner course part 2 "Deep Dive" starts January 13th: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-ii/