I'm trying to automate the extraction of the points and a compatible connectivity list for meshes created using the DiscretizeRegion or similar method.
If I create a bounding polygon from a list of points (x,y,z) I could then start to create a discretized mesh using the DiscretizeRegion function. Sample code I've been tinkering with below, using a Disk[] for illustration...
foo = DiscretizeRegion[Disk[], MaxCellMeasure -> 0.1] And the points from the mesh I believe can be extracted using:
MeshCoordinates[foo] In addition to the co-ordinates of the nodes I would also like to extract a list of connectivity that I can then take forward into my analysis.
For example, say that MeshCoordinates[foo] returns a list of co-ordinates in {x,y,z} format, say:
{{x1,y1,z1},{x2,y2,z2},{x3,y3,z3}, etc}
and if that first point is connected to the second and the third point (but the second and third points are not connected), the list that I'm looking to create, that would define the connectivity would be:
{{1,2},{1,3}}
Ideally all of the perimeter nodes would be defined in sequential order, with the internal node numbering following on with the next node number in the sequence. ie the perimeter nodes could be 1-10, with the first internal node being node number 11.



DiscretizeRegion[]should have aGraphicsComplex[]object in it somewhere. Can you check? $\endgroup$Polygon[]looks to be useful; you'll note that it has a list of triples, corresponding to the triangle whose vertices are indexed by the integers in the triple. You should now have something to start with. $\endgroup$test=ToString[InputForm[foo]];ToExpression[StringTake[test,StringPosition[test,"Polygon"][[1, 1]], StringPosition[test, "Properties"][[1, 1]] - 4}]]$\endgroup$ElementIncidentsor the boundary or mesh element connectivity data structures. There is also a Tutorial $\endgroup$