Re: How to draw a circle with one half dashed edge and another half solid edge?
Tim Hutt via Ipe-discuss <ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected]> Sat, 18 May 2019 10:30:49 +0100
| Newsgroups | gmane.comp.graphics.ipe.general |
|---|---|
| Message-ID | <CAKuVd4B1U4gun2B-Z9PEmkUs8Ncb27UvJRAkQ_9tdVB4dONr4g@mail.gmail.com> |
--===============6849056885374929154== Content-Type: multipart/alternative; boundary="0000000000004d6988058926282c" --0000000000004d6988058926282c Content-Type: text/plain; charset="UTF-8" You have to use the various snapping modes to get it exact. There are various ways to do it but snap-to-grid is the easiest to understand. Once you have the whole thing you can group them (Ctrl-G) and move them around as one object if you need to. Definitely easier than Tikz! On Sat, 18 May 2019, 10:25 Nasser M. Abbasi via Ipe-discuss, < ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected]> wrote: > I tried this. But it did not lookgood. The new ellipse I draw > behind them (without an edge, just fill) never comes exactly > the exact right shape to fit well inside those outer two arcs. > > I ended doing this in tikz, it was simpler actually. > > ------------------- > \documentclass[tikz]{standalone} > \usetikzlibrary{shapes} > \begin{document} > \begin{tikzpicture} > \def\xR{1.25}; %x radius of ellipse > \def\yR{0.5}; %y radius of ellipse > \draw [dashed,domain=0:180] plot ({\xR*cos(\x)}, {\yR*sin(\x)}); %top half > \draw [domain=-180:0] plot ({\xR*cos(\x)}, {\yR*sin(\x)}); %bottom half > \fill[gray!20] (0,0) ellipse ({\xR} and {\yR}); %overlay with ellipse > \end{tikzpicture} > \end{document} > ----------------- > > --Nasser > > > On 5/18/2019 2:27 AM, Alexander Wolff wrote: > > to me the obvious solution of your problem is to leave the two > > semi-circles as they are (one dashed, one solid) and to add behind > > them a filled disk without boundary, no? > > > > sascha > > > > > > On 18.05.19 02:27, Nasser M. Abbasi via Ipe-discuss wrote: > >> I've been struggling with this basic task. > >> > >> I simply want to draw a circle, but make the top half > >> perimeter dashed, and the bottom half perimeter remain > >> solid as default, and then fill it inside with some color. > >> > >> This is what I tried: Draw the top half using menu > >> option "Circular arc" OK. Now make a copy of it Ok. > >> Now flip the copy upside down using > >> "Iplets->Goodies->Mirror vertically" OK. Now change the > >> top half to dashed OK. Now using the mouse move the top > >> half to touch the top half arc. OK. > >> > >> Now comes the problem. I want to join these two. But when > >> I select the top and bottom arcs then ->right click->Join path, > >> the top arc edge suddenly change from dashed back to solid ! > >> > >> I need to join the path, because I want to fill the circle with > >> a color and if the path is not joined, then can't do fill with > >> color. > >> > >> This problem actually happen in other shapes. If I want to make > >> triangle or square with one or two edges dashed, and also want to > >> fill it inside. can't do it. > >> > >> Since once I join path, all edges turn to dashed instead. I guess > >> one can't join path with lines that have different styles? > >> > >> Any suggestion what else to try? > >> > >> IPE 7.2.7 on windows 10 > >> > >> Thanks > >> --Nasser > >> _______________________________________________ > >> Ipe-discuss mailing list > >> Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected] > >> https://mailman.science.uu.nl/mailman/listinfo/ipe-discuss > >> > > > > _______________________________________________ > Ipe-discuss mailing list > Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected] > https://mailman.science.uu.nl/mailman/listinfo/ipe-discuss > --0000000000004d6988058926282c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div>You have to use the various snapping modes to get it= exact. There are various ways to do it but snap-to-grid is the easiest to = understand.<div dir=3D"auto"><br></div><div dir=3D"auto">Once you have the = whole thing you can group them (Ctrl-G) and move them around as one object = if you need to.</div><div dir=3D"auto"><br></div><div dir=3D"auto">Definite= ly easier than Tikz!</div><br><br><div class=3D"gmail_quote"><div dir=3D"lt= r" class=3D"gmail_attr">On Sat, 18 May 2019, 10:25 Nasser M. Abbasi via Ipe= -discuss, <<a href=3D"mailto:ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected]">ipe-discus= [email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_qu= ote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex= ">I tried this. But it did not lookgood. The new ellipse I draw<br> behind them (without an edge, just fill) never comes exactly<br> the exact right shape to fit well inside those outer two arcs.<br> <br> I ended doing this in tikz, it was simpler actually.<br> <br> -------------------<br> \documentclass[tikz]{standalone}<br> \usetikzlibrary{shapes}<br> \begin{document}<br> \begin{tikzpicture}<br> \def\xR{1.25}; %x radius of ellipse<br> \def\yR{0.5};=C2=A0 %y radius of ellipse<br> \draw [dashed,domain=3D0:180] plot ({\xR*cos(\x)}, {\yR*sin(\x)}); %top hal= f<br> \draw [domain=3D-180:0] plot ({\xR*cos(\x)}, {\yR*sin(\x)}); %bottom half<b= r> \fill[gray!20] (0,0) ellipse ({\xR} and {\yR}); %overlay with ellipse<br> \end{tikzpicture}<br> \end{document}<br> -----------------<br> <br> --Nasser<br> <br> <br> On 5/18/2019 2:27 AM, Alexander Wolff wrote:<br> > to me the obvious solution of your problem is to leave the two<br> > semi-circles as they are (one dashed, one solid) and to add behind<br> > them a filled disk without boundary, no?<br> > <br> > sascha<br> > <br> > <br> > On 18.05.19 02:27, Nasser M. Abbasi via Ipe-discuss wrote:<br> >> I've been struggling with this basic task.<br> >><br> >> I simply want to draw a circle, but make the top half<br> >> perimeter dashed, and the bottom half perimeter remain<br> >> solid as default, and then fill it inside with some color.<br> >><br> >> This is what I tried: Draw the top half using menu<br> >> option "Circular arc" OK. Now make a copy of it Ok.<br> >> Now flip the copy upside down using<br> >> "Iplets->Goodies->Mirror vertically" OK. Now chang= e the<br> >> top half to dashed OK.=C2=A0 Now using the mouse move the top<br> >> half to touch the top half arc. OK.<br> >><br> >> Now comes the problem. I want to join these two. But when<br> >> I select the top and bottom arcs then ->right click->Join pa= th,<br> >> the top arc edge suddenly change from dashed back to solid !<br> >><br> >> I need to join the path, because I want to fill the circle with<br= > >> a color and if the path is not joined, then can't do fill with= <br> >> color.<br> >><br> >> This problem actually happen in other shapes. If I want to make<br= > >> triangle or square with one or two edges dashed, and also want to<= br> >> fill it inside. can't do it.<br> >><br> >> Since once I join path, all edges turn to dashed instead.=C2=A0 I = guess<br> >> one can't join path with lines that have different styles?<br> >><br> >> Any suggestion what else to try?<br> >><br> >> IPE 7.2.7 on windows 10<br> >><br> >> Thanks<br> >> --Nasser<br> >> _______________________________________________<br> >> Ipe-discuss mailing list<br> >> <a href=3D"mailto:Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected]" target=3D"_blan= k" rel=3D"noreferrer">Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected]</a><br> >> <a href=3D"https://mailman.science.uu.nl/mailman/listinfo/ipe-disc= uss" rel=3D"noreferrer noreferrer" target=3D"_blank">https://mailman.scienc= e.uu.nl/mailman/listinfo/ipe-discuss</a><br> >><br> > <br> <br> _______________________________________________<br> Ipe-discuss mailing list<br> <a href=3D"mailto:Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected]" target=3D"_blank" rel=3D= "noreferrer">Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected]</a><br> <a href=3D"https://mailman.science.uu.nl/mailman/listinfo/ipe-discuss" rel= =3D"noreferrer noreferrer" target=3D"_blank">https://mailman.science.uu.nl/= mailman/listinfo/ipe-discuss</a><br> </blockquote></div></div></div> --0000000000004d6988058926282c-- --===============6849056885374929154== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Ipe-discuss mailing list Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected] https://mailman.science.uu.nl/mailman/listinfo/ipe-discuss --===============6849056885374929154==--