Skip to content

Commit 8f7c865

Browse files
committed
Working triangular environment with new geometric criteria.
Quadrangular environment not working.
1 parent 3698b57 commit 8f7c865

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+933
-586
lines changed

docs/actions.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Triangular Actions
2+
3+
## Flip
4+
5+
The **flip** operation flips an inner edge adjacent to two triangles. This selected edge is then deleted and replaced by an edge on the opposite diagonal. The following diagram shows the steps involved in flipping strand d.
6+
7+
<img src="img/actions/flip.png" width="300"/>
8+
9+
However, in some configurations, flip action can lead to problematic configurations. That's why we choose to constraint flip action in these situations :
10+
11+
* **Boundary darts :** When a dart is on boundary of the mesh, we should'nt flip the edge. We can check this condition by looking if the dart to flip has a twin dart.
12+
* **Adjacency too high :** When nodes C and D already have an adjacency higher than 10, flip is possible.
13+
* **Configuration who tends to imply edge reversal**: To detect these situations, we look a the type of quad formed by the two adjacent faces, it means the **quad ADBC**.
14+
* **concave quad:** When the quad is concave, flip operation necessarily lead to an edge reversal. We constraint it.
15+
Exemple:
16+
17+
* **triangular quad:** Avoid because it will create a flat triangle.
18+
Exemple:
19+
20+
**The only configuration we accept is convexe quads**
21+
21.3 KB
Loading

docs/img/actions/flip.png

26 KB
Loading
19.4 KB
Loading

docs/observation.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Observation
2+
3+
## With quality observation
4+
5+
We want to observe the mesh in order to choose an appropriate action to improve mesh regularity.
6+
7+
### Nodes scores
8+
9+
**The first aspect to consider is the nodes scores.**
10+
A node's score is defined as the difference between its *ideal adjacency* and its *actual adjacency*:
11+
12+
$$
13+
s_n = d_i - d_a
14+
$$
15+
16+
where $s_n$ is the score of vertex $n$, $d_i$ is its ideal adjacency, and $d_a$ is its actual adjacency.
17+
18+
### Geometrical quality
19+
20+
#### We accept only 3 configurations :
21+
22+
<img src="img/actions/accepted_config.png" width="600"/>
23+
24+
The quadrilaterals shown in Figures (a), (b), and (c) are, respectively, **convex**, **concave**, and **"triangular"**. These configurations are distinguished by the orientation of their internal angles and the behavior of their diagonals.
25+
26+
- A **convex quadrilateral** is characterized by all internal angles being oriented in the *clockwise* direction. Equivalently, for each pair of consecutive edges, the signed cross product is strictly negative in a positively oriented coordinate system. In this case, the two diagonals intersect within the interior of the quadrilateral.
27+
28+
- A **concave quadrilateral** has exactly one internal angle oriented in the *counterclockwise* direction. For instance, in figure (b), this can be expressed as:
29+
30+
$$
31+
-\vec{d_{11}} \wedge \vec{d_{21}} > 0
32+
$$
33+
34+
In this configuration, the diagonals do not intersect inside the quadrilateral.
35+
36+
- A **"triangular" quadriateral** occurs when two adjacent edges are colinear, that is:
37+
38+
$$
39+
-\vec{d_{11}} \wedge \vec{d_{21}} = 0
40+
$$
41+
42+
#### All other configurations are not supported:
43+
<img src="img/actions/refused_config.png" width="600"/>
44+
45+
The quadrilaterals shown in Figures (a), (b), and (c) are, respectively, **crossed**, **flat**, and **"half-flat"**. These configurations are also distinguished by the orientation of their internal angles and the cross products.
46+
47+
- A **crossed quadrilateral** is characterized by two internal angles being oriented in the *clockwise* direction and two oriented in the other direction. Equivalently, for each pair of consecutive edges, two signed cross product are strictly negative in a positively oriented coordinate system and two are positive.
48+
49+
- A **flat quadrilateral** is characterized by all cross products null.
50+
51+
In this configuration, the diagonals do not intersect inside the quadrilateral.
52+
53+
- A **half flat quadriateral** occurs when two adjacent edges of the same triangular face are colinear, that is:
54+
55+
$$
56+
-\vec{d_{11}} \wedge \vec{d_{21}} = 0
57+
$$
58+
59+
#### Conclusion
60+
61+
So we charaterized each dart surrounding by its quad associated as :
62+
63+
| Type | boundary | convex | concave | triangular | not defined | not supported |
64+
|-------------------|----------|--------|---------|------------|-------------|------------|
65+
| classification id | -1 | 0 | 1 | 2 | -99 | 3,4,5 |

docs/tests/actions.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Actions tests
2+
3+
## Triangular actions
4+
5+
### Flip
6+
7+
We want to ensure that **flip** operations are performed correctly.
8+
Consider the following mesh:
9+
10+
<img src="img/tri_flip_before.png" width="300"/>
11+
12+
If we flip the dart between nodes **n0** and **n3**, we should obtain the following mesh:
13+
14+
<img src="img/tri_flip_after.png" width="300"/>
15+
16+
### Split
17+
18+
We want to ensure that **split** operations are performed correctly.
19+
Consider the following mesh:
20+
21+
<img src="img/tri_split_before.png" width="300"/>
22+
23+
If we split the dart between nodes **n0** and **n3**, we add a node **n5** on the middle of the edge and two faces are created.
24+
We should obtain the following mesh:
25+
26+
<img src="img/tri_split_after.png" width="300"/>
27+
28+
### Collapse
29+
30+
We want to ensure that **split** operations are performed correctly.
31+
Consider the following mesh:
32+
33+
<img src="img/tri_collapse_before.png" width="300"/>
34+
35+
Here we can't collapse the dart between nodes **n5** and **n2** because n2 is on boundary. However we can collapse the edge between **n4** and **n5**.
36+
We should obtain the following mesh:
37+
38+
<img src="img/tri_collapse_after.png" width="300"/>
18.7 KB
Loading
23.7 KB
Loading

docs/tests/img/tri_flip_after.png

12.3 KB
Loading

docs/tests/img/tri_flip_before.png

12.3 KB
Loading

0 commit comments

Comments
 (0)