TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to display a line "under" a rectangle. For this I tried using the intersections package, but somehow I the line doesn't stop:


% rectangle
\fill[name path=hrectangle, fill opacity=.5, rounded corners=1ex, shift={(-4cm,0cm)}, rotate=-30] ( -1,-.5) rectangle ( 1,.5);

% line
\draw[name path=x axis, <->, dashed] (7,0) -- (-4,0);

% intersection
\path[name intersections={of= x axis and hrectangle}];
\foreach \i in {1,...,2}
    \fill [color=red] (intersection-\i) circle (2pt) ;


When I compile I get the error :

Package pgf Error: No shape named intersection-1 is known.
Package pgf Error: No shape named intersection-2 is known.

Is there any other way I can do it?

Edit: The problem appears when I add the rounded corner of the rectangle...

share|improve this question

closed as off-topic by Joseph Wright Aug 3 '14 at 16:50

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Your axis is short. extend it to -7 and it works on my computer with TikZ v.2.10 – percusse May 11 '13 at 17:56
Or remove shift={(-4cm,0cm)} – Marco Daniel May 11 '13 at 17:57
Hum yeah the "rounded corners=1ex" make it not working... – user30552 May 11 '13 at 19:02
I can confirm this is a bug. The intersections library should apply \pgfprocessround for both intersection paths. In fact, it does it for neither. I'm surprised this hasn't been noticed before, in particular by the author of pgflibraryintersections.code.tex. ` – Mark Wibrow May 11 '13 at 20:30
@MarkWibrow At present, I guess this is an 'answer': could you make it one (or update us on a fix)? – Joseph Wright Aug 15 '13 at 19:42