
¿Existe una mejor manera de dibujar el siguiente dibujo sin el segmento ab? Use el siguiente código
\documentclass[tikz,border=5]{standalone}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}[scale=5.5]
\node[regular polygon, regular polygon sides=6, minimum size=10cm, rounded corners, draw] at (0,0) {};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Erase ab segment
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw[ultra thick, white](-.377,.787025) -- (.377,.787025);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw(.377,.787025)arc(276:90:.06);
\draw(-.377,.787025)arc(-96:90:.06);
\def\mypath{(-.06,-.98) -- (-.06,-.95) arc (180:0:.06cm) -- (.06,-.98)}
\foreach \t in {0,120,240} {\draw [rotate=\t] \mypath;}
\def\mypath{(0,.98) -- (0,.98) arc (90:55.5:.98cm)}% -- (0,0)}
\draw [rotate=56.5] \mypath;
\def\mypath{(0,.98) -- (0,.98) arc (90:55.5:.98cm)}% -- (0,0)}
\draw [rotate=-22] \mypath;
\def\mypath{(0,.98) -- (0,.98) arc (90:-23:.98cm)}% -- (0,0)}
\draw [rotate=176.5] \mypath;
\def\mypath{(0,.98) -- (0,.98) arc (90:-23:.98cm)}% -- (0,0)}
\draw [rotate=296.5] \mypath;
\end{tikzpicture}
\end{document}
Respuesta1
Simplemente reemplace el nodo con una ruta adecuada. Sabes que el diámetro del círculo circunstante del hexágono es de 10 cm sin escala (porque los nodos no están escalados cuando se usa la scale
opción). Por tanto, el radio reducido del círculo circunstante del hexágono es 5 cm / 5,5.
También conoces las coordenadas donde comienzan y terminan los dos semicírculos en la parte superior. Por lo tanto, puede recrear fácilmente el contorno de la forma del nodo utilizando \draw
coordenadas polares.
En el siguiente ejemplo de código, simplifiqué un poco el código y también lo actualicé a la sintaxis actual.
\documentclass[tikz,border=5]{standalone}
%\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}[scale=5.5]
% \node[regular polygon, regular polygon sides=6, minimum size=10cm, rounded corners, draw] at (0,0) {};
\draw[rounded corners] (-.377,.787025) -- (120:{5/5.5}) -- (180:{5/5.5}) -- (240:{5/5.5}) -- (300:{5/5.5}) -- (360:{5/5.5}) -- (60:{5/5.5}) -- (.377,.787025);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Erase ab segment
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \draw[ultra thick, white](-.377,.787025) -- (.377,.787025);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw(.377,.787025) arc[start angle=276, end angle=90, radius=.06];
\draw(-.377,.787025) arc[start angle=-96, end angle=90, radius=.06];
\def\mypath{(-.06,-.98) -- (-.06,-.95) %
arc[start angle=180, end angle=0, radius=.06] -- (.06,-.98)}
\foreach \t in {0,120,240} {
\draw[rotate=\t] \mypath;
}
\def\mypath{(0,.98) -- (0,.98) arc[start angle=90, end angle=55.5, radius=.98]}
\draw[rotate=56.5] \mypath;
\draw[rotate=-22] \mypath;
\def\mypath{(0,.98) -- (0,.98) arc[start angle=90, end angle=-23, radius=.98cm]}
\draw[rotate=176.5] \mypath;
\draw[rotate=296.5] \mypath;
\end{tikzpicture}
\end{document}