Fade is fast and most of the time you will not need progress updates at all. But for very large triangulations you may still want to connect your own progress bar to Fade2D’s update mechanism. Your own Progress Receiver Class Create some custom class that derives from MsgBase so that it can receive messages from…

# Category: Fade2D Examples

When coding geometry, numerical errors and unexpected geometric settings occur frequently. Thus automated software testing with random geometric data is essential. But for example creating random polygons without self-intersection is not trivial at all. Therefore the module testDataGenerators is provided to create repeatable sequences of random geometric objects for software testing and debugging. These are…

A frequently asked question is how to export a triangulation as a list of points and indices. Up to now this could be done with the help of custom indices and it still works. But since Fade v1.84 there is an explicit solution for this task, which is also memory efficient, because it releases the…

The term Delaunay meshing does not mean simply creating a Delaunay mesh on points, but it is about Quality Meshing i.e., creating a Delaunay mesh with triangles that have a very specific quality. This is generally achieved by adding points, that is, by refining an existing triangulation. As always you can find the below source…

The previous Example5 showed already how to create shapes i.e., Zone2 objects out of polygons and also how to carry out Boolean operations with them. Nevertheless, there might be questions about the practical implementation, especially when your polygons have holes. For this reason, the present Example6 consists of ready-made C++ source code that handles arbitrary…

Polygon Clipping, Boolean Set Operations Fade provides polygon clipping and functions to combine polygons through the boolean operations: Union (A OR B) Intersection (A AND B) Difference (A NOT B) Symmetric Difference (A XOR B) You can find the demo source in examples_2D/ex5_booleanOps.cpp in the Fade download. Creating two Shapes You will notice that the…

## Polygons and Zones – Example4

This is the right article if you want to triangulate polygons or carry out polygon clipping. In Fade, a zone defines a specific area of a triangulation. You can use zones to combine shapes with the boolean set operations union, difference,symmetric difference and intersection. From the result zone you can easily calculate the total area,…

## Constraint Edges – Example3

When you triangulate the vertices of a polygon, the edges of the polygon are not necessarily automatically edges of the Delaunay triangulation. But you can insert the edges as constraint edges (sometimes called ‘breaklines’). This is demonstrated for 2D below and in later examples you will see that it works also for 2.5D triangle meshes,…

Developing geometry software is much easier when you can visualize your work.This article shows how you can access the individual geometric objects in Fade and also how you can draw them. Have a look at the code below: The vector vPoints is filled with 6 points on a circle plus the center point (Fade conveniently…

Fade2D is a very fast multithreaded Delaunay triangulation library. With this Delaunay triangulation benchmark example you can test its performance on your own hardware. Benchmark Code The above source code starts with a call to Fade_2D::setNumCPU(int numCPU): numCPU=0 means autodetect numCPU=1 means single-threaded (default) numCPU>1 activates multithreading Then it sets up the test sizes The…

## Getting Started – Example0

Getting Started with the Fade Delaunay Triangulation The Fade library supports 2D and 2.5D, hence it comes as two separate libraries, Fade2D and Fade2.5D. Fade2.5D is a superset of Fade2D, i.e. it is similar to use, but the points have an additional z-coordinate and there are many additional functions. To help you get started with…