Message Boards Message Boards

Structure of BoundaryMeshRegion

Posted 5 years ago

Can anybody explain how to obtain the inner infomation of a BoundaryMeshRegion object?

E.g

(t = ConvexHullMesh[{{0, 0}, {1, 0}, {0, 1}, .25 {1, 1}}]) // FullForm

output:

BoundaryMeshRegion[List[List[0.`,0.`],List[1.`,0.`],List[0.`,1.`]],List[Line[List[List[1,2],List[2,3],List[3,1]]]],Rule[Method,List[Rule["SeparateBoundaries",False]]]]

The Head is "BoundaryMeshRegion" and according to mathematica rules t[[i]] should return the inner parts. However, e.g. t[[1]] results in an error:

"Part::partd: Part specification (..)[[1]] is longer than depth of object."

t is actually treared as an Atom, what is confirmed by AtmoQ[t] giving True.

How can one get the information contain in t? Yes, one could still use the "obsolete" ConvexHull from GraphicsMesht, but the Help indicates that all the functionality is now added to the built in BoundaryMeshRegion object.

POSTED BY: Daniel Huber
2 Replies

To access the innards, you can use MeshPrimitives, MeshCells, and MeshCoordinates and so onÂ…

POSTED BY: Sander Huisman
Posted 5 years ago

Thank's for the hint.

POSTED BY: Daniel Huber
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract