2
$\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$
  • $\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$ – J. M.'s discontentment Apr 17 at 11:54
  • $\begingroup$ @J.M. Thanks for your opinion. It works for this example, meshRaw = BoundaryDiscretizeGraphics@Graphics3D[Polygon /@ data]. $\endgroup$ – HyperGroups Apr 17 at 12:18
  • $\begingroup$ @andre314 Yes, it works, thanks $\endgroup$ – HyperGroups Apr 17 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$ – HyperGroups May 9 at 7:44
2
$\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
| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.