Graphics, Figures & Tables ⇒ Dimensioning of a Curve in Technical Drawings
Dimensioning of a Curve in Technical Drawings
I came across this thread http://tex.stackexchange.com/questions/ ... g-diagrams
on stackexchange that describes how to mark dimensions of a technical drawing and there are two popular responses there. From the post i found that i can use tikz-dimline package for such tasks and i have used it for marking straight lines. But the package documents does not describe how to use it for curves for example a simple arc. Kindly guide me how to use this package for dimensioning curves.
Secondly I will be really thankful if someone explains how Martin Scharrer's answer on the thread is working, I am unable to understand how the code is working.
Thank you,
Faseeh
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Dimensioning of a Curve in Technical Drawings
The
tikz-dimline
package supports only straight lines. The key line in the file is this one:\draw[line] (a.center) -- (b.center) node[label] {#4};
It draws a straight line
--
between the given points, with a text node in the middle. Simple, but it's not foreseen to change it. The whole code looks complicated, but it's mainly for setting options for line
and label
style. It's like taking a sledgehammer to crack a nut. 
You could use your desired line and label style even without that package. Another option would be to extend that package.
- Do you have a complex and nice looking example of how you use it, currently? We may see if it's easy adjustable. The more complex/complete/big the example, the better would be a solution similar to
tikz-dimline
. - Do you have an example where you need arcs?
Dimensioning of a Curve in Technical Drawings
Sorry for replying late, I don't have a very complex drawing. Infact i was fascinated by tikz-example gallery, and was trying to learn how to make such drawings. And yes you are right, such dimensioning could be done without using this package. Here is the code that i was working with but problem is the extension lines (if i don't use this package). This might not be the best code written as my tikz knowlege is limited:
Code: Select all
\documentclass[tikz,border=2mm]{standalone}
\usepackage{tikz-dimline}\pgfplotsset{compat=newest}
\usetikzlibrary[arrows] % ConTEXt when using Tik Z
\begin{document}
\begin{tikzpicture}[scale=2]
\draw [help lines][dotted, lightgray](0,0)grid(10,10);
\draw[thick](1,1)--+(3,0)arc[radius=1,start angle=270,end angle=360]--(2.5,2);
\draw[thick](2,2.5)arc[radius=0.5,start angle=90,end angle=360];
\draw[thick](2,2.5)--+(0,1.5);
\draw[thick](2,4)arc[radius=1,start angle=90, end angle =180]--(1,1);
%Dimensions
\draw [thick,>=latex,|<->|] (4,0.7) arc [radius=1.3, start angle=270, end angle= 360];
\dimline[line style = {line width=0.7},
extension start length=+0.3,
extension end length=+0.3] {(0.7,1)}{($ (0.7,1) + (0,3) $)}{$3.0$};
\end{tikzpicture}
\end{document}
Faseeh
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Dimensioning of a Curve in Technical Drawings
just add the styles you like to use to your preamble:
Code: Select all
\tikzset{%
arc/.style = { thick, >=latex, |<->|},
arclabel/.style = { midway, sloped, fill = white, align = center},
}
Code: Select all
\draw [arc] (4,0.7)
arc [radius=1.3, start angle=270, end angle= 360] node[arclabel] {$4.0$};