I have this steel plate, and I want to put a circle on it so that the circle lies in the "horizontal" plane of the plate:
% vim: ft=tex
\RequirePackage{luatex85,shellesc}
\documentclass[tikz]{standalone}
\usepackage{listings}
%% e-TeX tools
\usepackage{etoolbox}
%% Colours - put this before typography so additional named colours can be defined.
\usepackage{xcolor}
\definecolor{red}{HTML}{DC291E}
\definecolor{blue}{HTML}{04588A}
\definecolor{orange}{HTML}{FA6B00}
\colorlet{steel}{blue!20!gray}
%% Typography Settings
\usepackage{fontspec}
\usepackage{xunicode}
%% Maths typography — re-enable these if we need maths support
\usepackage{physics}
\usepackage{mathtools}
\usepackage{unicode-math}
%% Main Font list
%%%%
%
% The TeX Gyre family of fonts should come preinstalled with TeX Live, but they
% are also available from here:
% http://www.gust.org.pl/projects/e-foundry/tex-gyre/
%
%%%%
\setmainfont{TeX Gyre Pagella}
\setmathfont{TeX Gyre Pagella Math}
\usepackage{standalone}
\usepackage{tikz}
% Lua math library
\usepgflibrary{luamath}
\pgfkeys{pgf/luamath=parser}
\usetikzlibrary{calc}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{decorations.shapes}
\usetikzlibrary{intersections}
\usetikzlibrary{positioning}
% \usetikzlibrary{external}
\usetikzlibrary{patterns}
\usepgflibrary{arrows.meta}
\usetikzlibrary{bending}
% \tikzexternalize[prefix=tikz/,shell escape=-enable-write18]
% \tikzset{external/system call={lualatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}}
% \tikzset{
% % Defines a custom style which generates BOTH, .pdf and .png export
% % but prefers the .png on inclusion.
% %
% % This style is not pre-defined, you may need to copy-paste and
% % adjust it.
% png export/.style={%
% external/system call/.add=%
% {}
% ; convert -density 300 -transparent white "\image.pdf" "\image.png",
% % Don't need this as we're keeping the PDF in the document
% % /pgf/images/external info,
% % /pgf/images/include external/.code={%
% % \includegraphics
% % [width=\pgfexternalwidth,height=\pgfexternalheight]
% % {##1.png}%
% % },
% }
% }
\usepackage{siunitx}
\sisetup{detect-all, per-mode=symbol}
\DeclareSIPostPower\fourth{4}
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
%% Define all TikZ styles here
\tikzset{%
view top right/.style={
x={(0.866cm,0.5cm)},
y={(0,1cm)},
z={(-0.939cm,0.342cm)}
},
% png export,
}
\begin{document}
\begin{tikzpicture}[view top right]
\coordinate (front-bottom-right) at (0, 0, 0);
\coordinate (front-bottom-left) at (0, 0, 3);
\coordinate (back-bottom-left) at (3, 0, 3);
\coordinate (back-bottom-right) at (3, 0, 0);
\coordinate (front-top-right) at (0, 1, 0);
\coordinate (front-top-left) at (0, 1, 3);
\coordinate (back-top-right) at (3, 1, 0);
\coordinate (back-top-left) at (3, 1, 3);
\fill [steel!50!white]
(front-bottom-right)
-- (front-bottom-left)
-- (front-top-left)
-- (front-top-right)
-- cycle;
\fill [steel!62.5!white]
(front-bottom-right)
-- (back-bottom-right)
-- (back-top-right)
-- (front-top-right)
-- cycle;
\fill [steel!37.5!white]
(front-top-right)
-- (front-top-left)
-- (back-top-left)
-- (back-top-right)
-- cycle;
\draw [steel!75!black]
(back-top-left)
-- (front-top-left)
-- (front-bottom-left)
-- (front-bottom-right)
-- (back-bottom-right)
-- (back-top-right)
-- cycle;
\draw [steel!20!white]
(front-top-left)
-- (front-top-right)
-- (back-top-right)
(front-top-right)
-- (front-bottom-right);
% HELP?
\draw [line width=1.5pt] (1.5, 1, 1.5) circle [radius=1];
\end{tikzpicture}
\end{document}
A few older questions seem to offer partial solutions, but many make mention of a 3d
library that is not mentioned in the current manual, though does exist on my system. Whilst I could draw it manually with lots of trial and effort, I'd prefer to figure out a way that I could adapt for future drawings with ease.