\documentclass[tikz,border=10pt]{standalone}
\usepackage{tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{70}{70}
\begin{tikzpicture}[tdplot_main_coords, scale=2]
%define coordinates
\coordinate (O) at (0,0,0);
\coordinate (A) at (-0.15,0,-0.1);
\coordinate (B) at (0.15,0,-0.1);
\coordinate (C) at (0.15,0,0.1);
\coordinate (D) at (-0.15,0,0.1);
\coordinate (E) at (-0.15,0.6,-0.1);
\coordinate (F) at (0.15,0.6,-0.1);
\coordinate (G) at (0.15,0.6,0.1);
\coordinate (H) at (-0.15,0.6,0.1);
%draw straight-profile
\draw (A) -- (B) -- (C) -- (D) -- cycle;
\draw (E) -- (F) -- (G) -- (H) -- cycle;
\draw (A) -- (E);
\draw (B) -- (F);
\draw (C) -- (G);
\draw (D) -- (H);
%fill the straight-profile
\draw[fill=blue, opacity = 0.1] (A) -- (E) -- (H) -- (D);
\draw[fill=blue, opacity = 0.1] (B) -- (F) -- (G) -- (C);
\draw[fill=blue, opacity = 0.1] (C) -- (G) -- (H) -- (D);
\draw[fill=blue, opacity = 0.1] (A) -- (B) -- (F) -- (E);
%draw bend-profile
\tdplotsetrotatedcoords{90}{90}{90}
\coordinate (bend) at (0,1.1,0.5);
\tdplotsetrotatedcoordsorigin{(bend)}
\draw[canvas is zy plane at x = 0.15](-0.1,0.6) arc (0:-90:-0.6);
\draw[canvas is zy plane at x = -0.15](-0.1,0.6) arc (0:-90:-0.6);
\draw[canvas is zy plane at x = 0.15](0.1,0.6) arc (0:-90:-0.4);
\draw[canvas is zy plane at x = -0.15](0.1,0.6) arc (0:-90:-0.4);
\draw[tdplot_rotated_coords] (-0.15,0,-0.1) -- (0.15,0,-0.1) -- (0.15,0,0.1) -- (-0.15,0,0.1) -- (-0.15,0,-0.1);
%fill the bend-profile
%...?
\end{tikzpicture}
\end{document}
Hello,
I have the following problem. I want the black bend-profile to be filled blue like the straight-one. Can anyone help me with that problem?
Thanks, Nico
Best Answer
Something like this? But it isn't as tidy as it might be....