3
$\begingroup$

my mesh

The Data is here:

meshData

=== PolygonData is here

{{{5.25,8.625,11.5},{5.25,7.375,11.5},{1.5,7.375,11.5},{1.5,8.625,11.5}},{{1.5,7.375,11.5},{1.5,7.375,6.5},{1.5,8.625,6.5},{1.5,8.625,11.5}},{{4.,9.875,7.75},{4.,8.625,7.75},{2.75,8.625,7.75},{2.75,9.875,7.75}},{{2.75,8.625,7.75},{2.75,8.625,6.5},{2.75,9.875,6.5},{2.75,9.875,7.75}},{{4.,9.875,7.75},{4.,9.875,6.5},{4.,8.625,6.5},{4.,8.625,7.75}},{{0.25,9.875,12.75},{0.25,9.875,11.5},{0.25,11.125,11.5},{0.25,11.125,12.75}},{{-1.,11.125,12.75},{-1.,11.125,11.5},{-1.,6.125,11.5},{-1.,6.125,12.75}},{{-1.,11.125,12.75},{0.25,11.125,12.75},{0.25,11.125,11.5},{-1.,11.125,11.5}},{{-1.,6.125,11.5},{0.25,6.125,11.5},{0.25,6.125,12.75},{-1.,6.125,12.75}},{{0.25,6.125,12.75},{0.25,6.125,11.5},{0.25,7.375,11.5},{0.25,7.375,12.75}},{{0.25,9.875,6.5},{0.25,9.875,5.25},{0.25,11.125,5.25},{0.25,11.125,6.5}},{{-1.,11.125,6.5},{-1.,11.125,5.25},{-1.,6.125,5.25},{-1.,6.125,6.5}},{{-1.,11.125,6.5},{0.25,11.125,6.5},{0.25,11.125,5.25},{-1.,11.125,5.25}},{{-1.,6.125,5.25},{0.25,6.125,5.25},{0.25,6.125,6.5},{-1.,6.125,6.5}},{{0.25,6.125,6.5},{0.25,6.125,5.25},{0.25,7.375,5.25},{0.25,7.375,6.5}},{{0.25,9.875,11.5},{0.25,9.875,7.75},{0.25,9.875,6.5},{0.25,7.375,6.5},{0.25,7.375,11.5}},{{0.25,11.125,11.5},{0.25,9.875,11.5},{0.25,7.375,11.5},{0.25,6.125,11.5},{-1.,6.125,11.5},{-1.,11.125,11.5}},{{-1.,11.125,6.5},{-1.,6.125,6.5},{0.25,6.125,6.5},{0.25,7.375,6.5},{0.25,9.875,6.5},{0.25,11.125,6.5}},{{0.25,9.875,12.75},{5.25,9.875,12.75},{5.25,9.875,7.75},{4.,9.875,7.75},{2.75,9.875,7.75},{0.25,9.875,7.75},{0.25,9.875,11.5}},{{1.5,8.625,6.5},{2.75,8.625,6.5},{2.75,8.625,7.75},{4.,8.625,7.75},{4.,8.625,6.5},{5.25,8.625,6.5},{5.25,8.625,11.5},{1.5,8.625,11.5}},{{0.25,11.125,5.25},{0.25,9.875,5.25},{5.25,9.875,5.25},{5.25,7.375,5.25},{0.25,7.375,5.25},{0.25,6.125,5.25},{-1.,6.125,5.25},{-1.,11.125,5.25}},{{1.5,8.625,6.5},{1.5,7.375,6.5},{5.25,7.375,6.5},{5.25,8.625,6.5},{4.,8.625,6.5},{4.,9.875,6.5},{2.75,9.875,6.5},{2.75,8.625,6.5}},{{-1.,11.125,12.75},{-1.,6.125,12.75},{0.25,6.125,12.75},{0.25,7.375,12.75},{5.25,7.375,12.75},{5.25,9.875,12.75},{0.25,9.875,12.75},{0.25,11.125,12.75}},{{5.25,7.375,12.75},{5.25,7.375,11.5},{5.25,8.625,11.5},{5.25,8.625,6.5},{5.25,7.375,6.5},{5.25,7.375,5.25},{5.25,9.875,5.25},{5.25,9.875,7.75},{5.25,9.875,12.75}},{{5.25,9.875,7.75},{5.25,9.875,5.25},{0.25,9.875,5.25},{0.25,9.875,6.5},{0.25,9.875,7.75},{2.75,9.875,7.75},{2.75,9.875,6.5},{4.,9.875,6.5},{4.,9.875,7.75}},{{0.25,7.375,11.5},{0.25,7.375,6.5},{0.25,7.375,5.25},{5.25,7.375,5.25},{5.25,7.375,6.5},{1.5,7.375,6.5},{1.5,7.375,11.5},{5.25,7.375,11.5},{5.25,7.375,12.75},{0.25,7.375,12.75}}} 
$\endgroup$
4
  • $\begingroup$ Why not use MeshCoordinates[] and MeshCells[] to extract necessary information, and then try to make a BoundaryMeshRegion[] out of that data? (Actually, you might want to just try importing data as a BoundaryMeshRegion[] instead of as a MeshRegion[] if you're doing computations like this.) $\endgroup$ Commented Apr 17, 2020 at 11:54
  • $\begingroup$ @J.M. Thanks for your opinion. It works for this example, meshRaw = BoundaryDiscretizeGraphics@Graphics3D[Polygon /@ data]. $\endgroup$ Commented Apr 17, 2020 at 12:18
  • $\begingroup$ @andre314 Yes, it works, thanks $\endgroup$ Commented Apr 17, 2020 at 12:23
  • $\begingroup$ @J.M. hi, see my new question, not all such polygons model can be converted into a BoundaryMeshRegion, do you have any ideas? mathematica.stackexchange.com/questions/221482/… $\endgroup$ Commented May 9, 2020 at 7:44

1 Answer 1

3
$\begingroup$

Make it a BoundaryMeshRegion, tell Mathematica explicitly that this mesh is supposed too bound a volume and its RegionDimension dimensions becomes 3.

R = Import["mesh.wdx"]; RegionDimension[R] M = BoundaryMeshRegion[MeshCoordinates[R], MeshCells[R, 2]]; RegionDimension[M] Volume[M] 2 3 83.9844 
$\endgroup$
1

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.