0
$\begingroup$
   f[x_, y_, z_] := x + Cos[z]^2 + y^2
    ContourPlot3D[f[x, y, z] == 0, {x, -2, 2}, {z, -2, 2}, {y, -2, 2}, 
      Mesh -> {4, 4, 4}] /. Line[p_] :> Tube[p, .1]

In the image we see some nominal Thickness for the surface although no Thickness is specified. It was not bargained for, a sort of non-WYSIWYG situation. We should be able to see through the Tubes to the back side. Can we to do away with it?

If 3d printed, will it print with an arbitrary spurious thickness? Thanks for help.

$\endgroup$
1
  • $\begingroup$ does ContourPlot3D[f[x, y, z] == 0, {x, -2, 2}, {z, -2, 2}, {y, -2, 2}, BoundaryStyle -> None, Mesh -> {4, 4, 4}] /. Line[p_] :> {CapForm["Butt"], Opacity[.5, Red], Tube[p, .1]} give what you need? $\endgroup$
    – kglr
    Commented Aug 12, 2019 at 13:37

2 Answers 2

1
$\begingroup$

Try MeshStyle and MeshStyle

ContourPlot3D[f[x, y, z] == 0, {x, -2, 2}, {z, -2, 2}, {y, -2, 2},Mesh -> {4, 4, 4},MeshStyle -> Opacity[.5],MeshStyle -> None] /. Line[p_] :> Tube[p, .1]

enter image description here

ContourStyle->None only shows the tubes.

$\endgroup$
0
$\begingroup$

You can use Tube as a directive in setting MeshStyle:

ContourPlot3D[f[x, y, z] == 0, {x, -2, 2}, {z, -2, 2}, {y, -2, 2}, 
 BoundaryStyle -> None, Mesh -> {4, 4, 4}, PlotTheme -> "ThickSurface",
 MeshStyle -> ({#, #, #} &@{CapForm["Butt"], Opacity[.5, Red],  Tube[.1]})]

enter image description here

Alternatively, you can post-process to replace mesh lines with Tubes:

ContourPlot3D[f[x, y, z] == 0, {x, -2, 2}, {z, -2, 2}, {y, -2, 2}, 
  BoundaryStyle -> None, Mesh -> {4, 4, 4}, PlotTheme -> "ThickSurface"] /. 
 Line[p_] :> {CapForm["Butt"], Opacity[.5, Red], Tube[p, .1]}

enter image description here

Replace PlotTheme -> "ThickSurface" with Method -> Extrusion -> .3 to get

enter image description here

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.