Group Abstract Group Abstract

Message Boards Message Boards

DiscretizeRegion failing on macOS with 14.3

The first graphic is from a notebook many years old, and the second is from the latest version of Mathematica. What's going on?

Is this a known regression in functionality?

enter image description here enter image description here

n = 7; m = 3; dt = 2 Pi/n; dtm = 2 Pi/m; r = 
 1./(1 - Sin[dt/2]/Cos[dtm/2]); R = 1. r Cos[(dt + dtm)/2]/Cos[dtm/2];
ToMatrix[z_, 
   r_] := (I/r) {{z, r^2 - z Conjugate[z]}, {1, -Conjugate[z]}};
alist = Table[
  ToMatrix[r Exp[I t], r - 1], {t, dt/2, 2 Pi, dt}]; Tlist = 
 Join[{IdentityMatrix[2]}, alist];
homography[{{a_, b_}, {c_, d_}}, z_] := (a z + b)/(c z + d);
FindT[T0_, Tlist_] := 
  MemberQ[Tlist, 
   T_ /; Abs[homography[T, 0] - homography[T0, 0]] < 1.0*^-3];
i2 = 1; Do[i1 = i2 + 1; i2 = Length[Tlist]; 
 Do[Scan[(T = Tlist[[i]] . #; 
     If[! FindT[T, Tlist], Tlist = Append[Tlist, T]]) &, alist], {i, 
   i1, i2}], {2}];
plot = Show[
  Graphics[
   Map[Line[
      Table[z = homography[#, R Exp[I t]]; {Re[z], Im[z]}, {t, 0, 
        2 Pi, dt}]] &, Tlist], AspectRatio -> Automatic], 
  Axes -> True]

data = (Table[
      z = homography[#1, R Exp[I t]]; {Re[z], Im[z], 0.}, {t, 0, 
       2 \[Pi], dt}] &) /@ Tlist;
L = MeshRegion[Join @@ Most /@ data, 
   Line[Join @@ (Partition[#1, 2, 1, 1] &) /@ 
      Partition[Range[7 Length[data]], 7]]];
f = RegionDistance[L];
\[Theta]1 = 0.08;
\[Theta]2 = 0.01;
z =.
R1 = ImplicitRegion[
   f[{x, y, z}] <= \[Theta]1, {{x, -4, 4}, {y, -4, 4}, {z, -2, 2}}];
S1 = DiscretizeRegion[R1, MaxCellMeasure -> 0.0001]
POSTED BY: Eric Mockensturm
9 Replies

This is known now to the developers. They suggested this workaround, could you please try it?

S1 = BoundaryDiscretizeRegion[R1, MaxCellMeasure -> 0.001]
POSTED BY: Ahmed Elbanna

Yes, that works as Michael noted.

POSTED BY: Eric Mockensturm

Thank you @Michael Rogers for confirmation. I reported it to relevant Wolfram's teams.

POSTED BY: Ahmed Elbanna

Works for me on version 14.3. What is your current version?
Also could you please try to evaluate the notebook below and let us know the outputs?

POSTED BY: Ahmed Elbanna

I'm using 14.3 on an M3 Ultra Mac Studio with 96 MB. When I evaluate the notebook you attached, I get

DiscretizeRegion[
 ImplicitRegion[
  RegionDistanceFunction[MeshRegion[< 3 >, < 1 >], <>][{x, y, z}] <= 
    0.08 && -4 <= x <= 4 && -4 <= y <= 4 && -2 <= z <= 2, {x, y, z}], 
 MaxCellMeasure -> 0.0001]

and not the region you got or I got in a previous version of Mma.

POSTED BY: Eric Mockensturm

Just to add to the data.

On Wolfram Cloud, I get Ahmed's results. (14.3.0 for Linux x86 (64-bit) (July 8, 2025)).

On my Mac, I get Eric's result ("14.3.0 for Mac OS X ARM (64-bit) (July 8, 2025)").

Further:

This works:

BoundaryDiscretizeRegion[R1, MaxCellMeasure -> 0.0001]

But calling DiscretizeRegion[] on the output fails.

It's probably a bug and Eric should report it to WRI (imo).

POSTED BY: Michael Rogers

Thank you for investigating this. I was planning to fire up a VM and test with other OSs. Now I don't have to.

POSTED BY: Eric Mockensturm

Hi Eric,
Could you please include your code by using code format button in post editor to appear formatted like this:

int = Integrate[1/(x^3 - 1), x];
Map[Framed, int, Infinity]

or add notebook or attach one

enter image description here

POSTED BY: EDITORIAL BOARD

Code to reproduce is attached. The exact same code worked in a previous version of Mma, circa 2019.

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