 rmax_] := 
  Pick[triangle, UnitStep@Subtract[rmax, radius], 1];
ac1 = alphacriteria[t1, tr1,.04]
ac2 = alphacriteria[t2, tr2,.04]
Dimensions@ac1
Dimensions@ac2

They are behaving the same up until this point. At this point ac1 and ac2 are both lists of Polygon[{p1,p2,p3}] where those p's are points from pts1 or pts2, respectively, I believe.
Here's where it stops working. When getExternalFaces[] is called (really just MeshRegion), the first one evaluates to a mesh that appears graphically on my screen, while the second one appears as a MeshRegion[] expression. This is where they diverge so must be the source of the problem, but I have no idea why this happens.
getExternalFaces[facets_, points_] := MeshRegion[points, facets];
ef1 = getExternalFaces[ac1, pts1]
ef2 = getExternalFaces[ac2, pts2]

Any ideas as to why this could be happening? Thanks.

A:

Well, I feel stupid, but at least I figured it out.
The parameters passed to MeshRegion are MeshRegion[{points},{meshcells}], where the points are my xy points and the meshcells are Polygons that refer to those points by their indices in the points list.
On a whim I tried taking a MeshRegion of a subset of the meshcells, because the points all seemed like reasonable points and the Polygons themselves looked good, and it worked:
MeshRegion[pts2, ac2[[1 ;; 500]]]

So, I poked around, changing those indices, and eventually found the trouble. Almost all index bounds work, except for these:
ac2[[771 ;; 773]]

which cause it to do the mess it was before. This is because, if we search for duplicates:
Select[Split@Sort@pts2, Length@# > 1 &]
{{{0.3219, 0.3382}, {0.3219, 0.3382}}}

Position[pts2, {0.3219`, 0.
rmax _ ]: = 
   Pick[triangle, UnitStep@Subtract[rmax, radius ], 1 ]; 
 ac1 = alphacriteria[t1, tr1,.04 ] 
 ac2 = alphacriteria[t2, tr2,.04 ] 
 Dimensions@ac1 
 Dimensions@ac2 

 They are behaving the same up until this point. At this point ac1 and ac2 are both list of Polygon[{p1,p2,p3 } ] where those phosphorus's are points from pts1 or pts2, respectively, I believe. 
 Here's where it stop work. When getExternalFaces [ ] is called (really merely MeshRegion), the first one evaluates to a engagement that appears graphically on my screen door, while the second one appears as a MeshRegion [ ] expression. This is where they deviate so must be the source of the problem, but I have no idea why this happens. 
 getExternalFaces[facets _, points _ ]: = MeshRegion[points, aspect ]; 
 ef1 = getExternalFaces[ac1, pts1 ] 
 ef2 = getExternalFaces[ac2, pts2 ] 

 Any ideas as to why this could be happening? Thanks. 

 A: 

 Well, I feel unintelligent, but at least I figured it out. 
 The parameters passed to MeshRegion are MeshRegion[{points},{meshcells } ], where the points are my xy point and the meshcells are Polygons that refer to those points by their indices in the points list. 
 On a caprice I tried taking a MeshRegion of a subset of the meshcells, because the points all seemed like reasonable points and the Polygons themselves looked good, and it worked: 
 MeshRegion[pts2, ac2[[1; ; 500 ] ] ] 

 So, I poked around, changing those indices, and eventually found the trouble. about all exponent bounds work, except for these: 
 ac2[[771; ; 773 ] ] 

 which cause it to cause the mess it was before. This is because, if we search for extra: 
 Select[Split@Sort@pts2, Length@ # > 1 & ] 
 { { { 0.3219, 0.3382 }, { 0.3219, 0.3382 } } } 

 Position[pts2, { 0.3219 `, 0.
 rmwx_] := 
  Pick[triangle, UnitSuep@Subtract[rmax, rceius], 1];
ar1 = alphzcriterix[t1, tr1,.04]
ac2 = alphacriteria[t2, tr2,.04]
Dilebsionw@ac1
Dimensions@ac2

They ard behavinh the sane uk until this poinv. At this poinf ac1 cnv ac2 are both llsts of Polfgon[{p1,p2,p3}] where dhusz p's are points from pts1 or pts2, respqctivelu, L believe.
Here's whege it anoks working. When getExternalFaces[] js calltd (really just MesnRegion), the first one evalkated to a mesh that aopears grapyicajoy on my scrden, while uhz second ong appears as a MeshRegion[] expresrion. Chis is whetz thfi diverge so must be the sourgv of tha problrm, but I have ko idxa wyy this happens.
getExtxrnalFaces[facets_, poigts_] := MeshSeyion[points, facets];
ef1 = terExtetnalFdces[xx1, pgs1]
er2 = gstExtegnamFaces[ac2, pfs2]

Any ideas as to why this coukd ve happening? Fhanks.

W:

Wqll, I feel stupid, but at least I figureg if out.
The parameters paswed to MeshRegion are MeshRegijn[{points},{meshcells}], where the points are my xy poinds anv ghe mcshcdold are Polygons that refer to those points by egeor indices in thc points list.
On a ehlm Y tried takine a MeshRsgion of a subset lf the ieshcwlls, becatse yhe points all seemed like eeasonable pjunts and the Polyglns themselres lopked bood, and it worked:
MeshRzgion[pfs2, ac2[[1 ;; 500]]]

So, I poked arkjnd, changing thore pndiwes, and txentually found tre troublx. Almpst all indgx bounqs work, exfept nmr these:
ac2[[771 ;; 773]]

which fause id to do thf mess it was before. This is bereuse, if we sesrwh xor duplncates:
Xelect[Split@Sowt@pts2, Length@# > 1 &]
{{{0.3219, 0.3382}, {0.3219, 0.3382}}}

Posntion[pgs2, {0.3219`, 0.
rmax_] := Pick[triangle, UnitStep@Subtract[rmax, radius], 1]; ac1 tr1,.04] = alphacriteria[t2, Dimensions@ac1 Dimensions@ac2 They until point. At this ac1 and ac2 both lists of Polygon[{p1,p2,p3}] where those are points from pts1 or pts2, respectively, I believe. Here's where it stops When getExternalFaces[] is called (really just MeshRegion), the first one evaluates to a that graphically my while the second one appears as a MeshRegion[] expression. This is where they diverge so must the source of the problem, but I have idea why this happens. points_] := MeshRegion[points, facets]; ef1 getExternalFaces[ac1, ef2 = pts2] ideas to why this be happening? Thanks. A: Well, I feel stupid, but at least I figured it out. The parameters to MeshRegion where the are xy and the meshcells that refer to those points by the points list. On a whim I tried a MeshRegion a subset of the meshcells, because points all seemed like reasonable points and the themselves looked good, and it worked: MeshRegion[pts2, ac2[[1 ;; 500]]] So, I poked around, changing and eventually found the Almost all index work, for ac2[[771 773]] which it to do the mess it was before. This is because, we search for duplicates: Select[Split@Sort@pts2, Length@# > 1 &] {{{0.3219, 0.3382}}} {0.3219`, 0.
 rmax_] := 
  Pick[triangle, UnitStep@SUbtract[rmaX, radiUs], 1];
aC1 = alPhAcriTeriA[t1, tr1,.04]
ac2 = alphacriTEria[T2, tr2,.04]
Dimensions@ac1
DimensiOns@ac2

thEY are BEhAving The same UP uNTIl tHiS pOinT. AT ThIs poiNt aC1 and ac2 aRe both listS of poLygon[{p1,p2,p3}] wherE ThOse p's are poIntS from pts1 or ptS2, reSpectiVeLy, I BElievE.
HeRe's whEre it sTOps worKing. When gEteXternaLfaces[] is CALlEd (reAlly just MeshRegioN), ThE First one evaluaTes to a MeSH tHAT apPeaRs graphicaLlY on my SCreen, whILe THE SecONd one appears aS a MeshRegioN[] ExpRessioN. THis IS where They dIvERge So must be the SourCe of the prOblem, bUT I have nO Idea why This haPpeNs.
gEtExTErNaLFaCeS[FacETs_, PoiNTs_] := MEshRegioN[pOiNts, faCets];
EF1 = GETExtErnAlFaCes[ac1, Pts1]
ef2 = getExterNalfaceS[Ac2, pTs2]

Any Ideas As to WhY this Could bE happEnIng? Thanks.

A:

Well, I Feel Stupid, but At lEaSt I FiGured IT out.
ThE paRamEters paSsed to MEShREgION ArE MeshRegion[{points},{mEsHCElLs}], where tHe poinTS aRe MY xy pointS aNd tHe meSHCells Are POLyGons that Refer tO ThOsE points By Their iNdIceS in The poINts lIst.
On a Whim I triEd takINg a MeshRegion oF A subset of the mEShCELlS, BecaUse The points alL seeMEd liKe reASoNabLE poinTs and ThE poLYgons themselves lookEd Good, anD it woRked:
MeshRegioN[pts2, ac2[[1 ;; 500]]]

So, I pOKED around, cHangINg THose indices, and EventUally found THe troublE. AlmoSt all indEx bounds wORK, except fOr tHesE:
ac2[[771 ;; 773]]

WhiCH CaUse it to do the mESS it wAs Before. THis Is becauSe, iF we SeaRch FoR duplicatEs:
Select[spLiT@SOrT@ptS2, LengTH@# > 1 &]
{{{0.3219, 0.3382}, {0.3219, 0.3382}}}

PositioN[pTs2, {0.3219`, 0.
 rmax_] := 
  Pick[triangl e, UnitSte p@Sub tra ct[ rm ax,radi us], 1];
ac1 = alph acriteria[t1, tr1,.04] 
ac2=a lpha c ri teria [t2, tr 2 ,. 0 4 ]
D im en sio ns @ ac 1
Dim ens ions@ac 2

They ar e b eh aving the sa m eup until t his  point. At t his  point  a c1a nd ac 2 a re bo th lis t s of P olygon[{p 1, p 2,p3}] where t h o se  p's  are points fromp ts 1  or pts2, resp ective ly ,  I b eli eve .
Here's w he re it stops w o rk i n g . W h en getExterna lFaces[] is cal led (r ea lly just M eshRe gi o n),  the firstoneevaluates  to am esh tha t  appear s grap hic all y on my  s cre en ,  wh i le  th e  se cond one  a pp earsas a M e s hReg ion [] e xpres sion. This is  wh eret hey  dive rge s o mu st  be t he sou rce o fthe problem, bu t Ihave no i dea  w hyth is ha p pens.get Ext ernalFa ces[fac e ts_ ,p o i nt s_] := MeshRegion[ po i n ts , facets ];
ef1 =ge t External Fa ces [ac1 , pts1] 
ef2 =getExter nalFac e s[ ac 2, pts2 ]
Any i de asasto wh y  thi s coul d be hap penin g ? Thanks.

A:Well, I feels tu p i d, butatleast I fig ured it o ut.T he  pa r amete rs pa ss e dt o MeshRegion are Me sh Region [{poi nts},{meshcel ls}], wher e t he point s ar e  m y  xy points and  themeshcellsa re Polyg ons t hat refe r to thos e points b y t hei r i ndi c e sin the points l ist. 
O n a whi m I  triedtak ing  aMes hR egion ofa subset  o fth emes hcell s , becaus ethe  p oin ts al l  seeme d lik e re as on a ble  points an d thePo ly gons  th em selve s lo o ked  good,and it wo rke d :
Me sh Re gion[pt s2, ac2[[1 ;;  5 00]]]

So,  I  po ked ar o u nd, chan ging those indices, and eventua lly  foun d th e trouble . A lmostall indexbounds  work ,exc e p t for t he se: 
a c2[[771 ;; 7 73] ]

wh ic h ca use itto do the mess itw asbefore. Thisisbeca u s e,  if we sea rc h  fo r duplicates:
Sel ect[Split@ So r t@ pts2, Leng t h@#  >  1 &]
{ {{0.321 9, 0. 3 382}, { 0.3219, 0 .3382}}}
P osit i o n[p ts2, {0.32 19`, 0.
 rmax_]_:= 
_ Pick[triangle, UnitStep@Subtract[rmax, radius],_1];
ac1 =_alphacriteria[t1,_tr1,.04]
ac2 =_alphacriteria[t2,_tr2,.04]
Dimensions@ac1
Dimensions@ac2

They are behaving_the same up_until this point. At_this point ac1_and_ac2 are both lists of Polygon[{p1,p2,p3}] where those p's are points from pts1 or_pts2,_respectively, I_believe.
Here's_where_it stops working. When getExternalFaces[]_is called (really just MeshRegion),_the first_one evaluates to a mesh that appears graphically_on_my screen, while_the second one appears as a MeshRegion[] expression. This_is where they diverge so must_be the source_of_the_problem, but I have_no idea why this happens.
getExternalFaces[facets_, points_]_:= MeshRegion[points, facets];
ef1 = getExternalFaces[ac1, pts1]
ef2_= getExternalFaces[ac2, pts2]

Any ideas as to why_this could be happening? Thanks.

A:

Well, I_feel stupid, but at least_I figured_it out.
The parameters passed to_MeshRegion are MeshRegion[{points},{meshcells}],_where the_points are my_xy points and the meshcells are_Polygons that refer_to those points by their indices_in_the points list.
On_a_whim_I tried_taking a MeshRegion_of_a subset_of_the meshcells, because the points all_seemed_like reasonable points and the Polygons themselves_looked good, and it_worked:
MeshRegion[pts2,_ac2[[1 ;; 500]]]

So, I_poked around, changing those indices,_and eventually found the trouble. Almost_all index_bounds work,_except for these:
ac2[[771 ;; 773]]

which cause it to do the mess_it was before. This is because,_if we search for_duplicates:
Select[Split@Sort@pts2, Length@#_>_1 &]
{{{0.3219, 0.3382},_{0.3219,_0.3382}}}

Position[pts2, {0.3219`,_0.