Another mesh related question.
I ran through 3000 meshes all made with these functions and a managed to find one case that always fails but i have no clue why.
For only one specific case the MeshRegion coming form DiscretizeGraphics is not recognized by the Remesh, SimplifyMesh and SmoothMesh that were introduces in 14.3
I ran through 3000 meshes all made with these functions and a managed to find one case that always fails but i have no clue why.
For only one specific case the MeshRegion coming form DiscretizeGraphics is not recognized by the Remesh, SimplifyMesh and SmoothMesh that were introduces in 14.3
In[]:=
vox={2,2,2};
In[]:=
data1=;dim1=Dimensions@data1;size1=Reverse[voxdim1];
In[]:=
data2=;dim2=Dimensions@data2;size2=Reverse[voxdim2];
In[]:=
(*works*){mesh1a=DiscretizeGraphics[ListContourPlot3D[GaussianFilter[data1,1],Contours->{0.5},MaxPlotPoints->Reverse[dim1],BoxRatios->size1,DataRange->Thread[{0,size1}],PlotRange->Thread[{0,size1}],Mesh->False]],Remesh[mesh1a,Method->{"Adaptive","MinEdgeLength"->15}],SimplifyMesh[mesh1a],SmoothMesh[mesh1a]}Head[mesh1a]
Out[]=
,
,
,
Out[]=
MeshRegion
In[]:=
(*samedataextrasmoothingdoesnotwork*){mesh1b=DiscretizeGraphics[ListContourPlot3D[GaussianFilter[data1,2],Contours->{0.5},MaxPlotPoints->Reverse[dim1],BoxRatios->size1,DataRange->Thread[{0,size1}],PlotRange->Thread[{0,size1}],Mesh->False]],Remesh[mesh1b,Method->{"Adaptive","MinEdgeLength"->15}],SimplifyMesh[mesh1b],SmoothMesh[mesh1b]}Head[mesh1b]
Out[]=
,Remesh
,Method{Adaptive,MinEdgeLength15},SimplifyMesh
,SmoothMesh
Out[]=
MeshRegion
In[]:=
(*samedataevenmoresmoothingworksagain*){mesh1c=DiscretizeGraphics[ListContourPlot3D[GaussianFilter[data1,3],Contours->{0.5},MaxPlotPoints->Reverse[dim1],BoxRatios->size1,DataRange->Thread[{0,size1}],PlotRange->Thread[{0,size1}],Mesh->False]],Remesh[mesh1c,Method->{"Adaptive","MinEdgeLength"->15}],SimplifyMesh[mesh1c],SmoothMesh[mesh1c]}Head[mesh1c]
Out[]=
,
,
,
Out[]=
MeshRegion
In[]:=
(*Differentdataalsoworks*){mesh2=DiscretizeGraphics[ListContourPlot3D[GaussianFilter[data2,2],Contours->{0.5},MaxPlotPoints->Reverse[dim2],BoxRatios->size2,DataRange->Thread[{0,size2}],PlotRange->Thread[{0,size2}],Mesh->False]],Remesh[mesh2,Method->{"Adaptive","MinEdgeLength"->15}],SimplifyMesh[mesh2],SmoothMesh[mesh2]}Head[mesh2]
Out[]=
,
,
,