You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+74-2Lines changed: 74 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,18 @@
2
2
3
3
CadQuery plugin to create a mesh of an assembly with corresponding data.
4
4
5
-
This plugin makes use of CadQuery tags to collect surfaces into [Gmsh](https://gmsh.info/) physical groups. The
6
-
tagged faces are matched to their corresponding surfaces in the mesh via their position in the CadQuery solid(s) vs the Gmsh surface ID. There are a few challenges with mapping tags to surfaces to be aware of.
5
+
This plugin makes use of CadQuery tags to collect surfaces and edges into [Gmsh](https://gmsh.info/) physical groups.
6
+
The tagged faces are matched to their corresponding surfaces in the mesh via their position in the CadQuery solid(s) vs the Gmsh surface ID. There are a few challenges with mapping tags to surfaces to be aware of.
7
7
8
8
1. Each tag can select multiple faces/surfaces at once, and this has to be accounted for when mapping tags to surfaces.
9
9
2. Tags are present at the higher level of the Workplane class, but are do not propagate to lower-level classes like Face.
10
10
3. OpenCASCADE does not provide a built-in mechanism for tagging low-level entities without the use of an external data structure or framework.
11
11
12
+
Tagged edges are handled a little differently from faces. Because an edge is shared between multiple faces, the
13
+
Gmsh curve IDs do not line up with the CadQuery edge order the way surface IDs line up with faces. Instead of matching by position, each tagged edge is matched to its Gmsh curve geometrically (by comparing bounding boxes and midpoints)
14
+
and that search is restricted to the curves belonging to the same assembly part. This keeps edge tags correct even
15
+
when separate parts meet at coincident edges.
16
+
12
17
## Installation
13
18
14
19
You can install via [PyPI](https://pypi.org/project/assembly-mesh-plugin/)
@@ -27,6 +32,8 @@ The plugin needs to be imported in order to monkey-patch its method into CadQuer
27
32
import assembly_mesh_plugin
28
33
```
29
34
35
+
### Face Tagging
36
+
30
37
You can then tag faces in each of the assembly parts and create your assembly. To export the assembly to a mesh file, you do the following.
0 commit comments