GroundhogLighting / Groundhog

SketchUp Extension for performing Radiance lighting analysis
http://www.groundhoglighting.com
13 stars 4 forks source link

Triangulate workplanes using gmsh #39

Closed agonzalezesteve closed 6 years ago

agonzalezesteve commented 6 years ago

Instead of using the mesh triangulation method of Sketchup API, this new workplane exporter uses gmsh, an open source finite element mesh generator, getting smoother meshes.

germolinal commented 6 years ago

This is extremely cool!

Have you tested this with workplanes that have hidden vertices? (i.e. collinear vertices).... those are a HUGE pain in the ass. For example, one side of a square may be splitted in two or more, which causes meshing algorithms to make funny triangles.

Thanks for the contribution!

germolinal commented 6 years ago

I worked on something like that, but required me to create a new face and delete... did not work well...

https://github.com/GroundhogLighting/Groundhog/blob/5e3a189f6640bedd7043ff983b3f78e7bbbe1ef1/IGD_Groundhog/src/Exporter.rb#L186

agonzalezesteve commented 6 years ago

In this example I split one side (as you can see there is selected one of the halves in blue) and there is no problem.

Splitting one side of the workplane only makes that the new vertex of the workplane will be a vertex of the mesh.

germolinal commented 6 years ago

Let's try it! My test went well. If something does not look right in the future, we may be able to clean the faces later.

Thanks for your contributions!

PS: Your changes are now in the new version, 0.9.7