Creating shapes with exact/precise dimensions

Post questions on how to use or achieve an effect in Inkscape.
tlundberg
Posts: 4
Joined: Fri Jan 17, 2014 4:26 am

Creating shapes with exact/precise dimensions

Postby tlundberg » Fri Jan 17, 2014 5:11 am

I've created this shape:

Image

I want the "wall" thickness to be exactly one fifth of the width of the entire square. So I created the square to be 400px wide. I then placed another square inside this red square that was 240px wide. This should make the walls 80px wide, which is one fifth of 400. But looking at the coordinates for the inner nodes in the shape I posted above I notice that they are at coordinates like for example X: 280 Y: 519.987 this means that one wall is 80.013px wide and not 80px as I wanted. How do I fix this?

My final goal is to remove one or two of the walls. Like in the following shape:

Image

As you see I got two extra nodes on the inner horizontal edges. After removing those, how do I ensure that the beizer handles of the two resulting nodes are perfectly aligned horizontally so that the line is straight?

Thanks for your help.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Creating shapes with exact/precise dimensions

Postby Lazur » Sun Jan 19, 2014 8:03 pm

Welcome aboard!

The boolean operations in inkscape are not precise in inkscape, they add a small error to each nodes position.

Thus if you want a path with exact coordinates, you have to avoid those, or, type in the right coordinates after.
Use the node editor tool to select and delete unnecessary nodes, and to straighten selected segments.
At the top left corner, you have double nodes, you can correct that too.

To draw such I would first make a path with a 90° turn, then duplicate it,
use the align and distribute panel (Shift+Ctrl+A) to move the duplicants aligned to a square drawn before,
rotate them to position, combine them together (Ctrl+K),
Use the node editor tool to unconnect each corner's segments and connect them with others,
delete unnecessary nodes and straighten segments.
Then combine it with a smaller square center aligned to the larger square, goimg the opposite direction
(may have to reverse the path).

To add the cut on the right, I would unconnect the vertical segments there and connect the outer ones with the inner ones.
Then by typing in the right x coordinate values to the two nodes at the inner square's corners, the result would be quite precise.

To add the cut you could go other way with snapping:
duplicate the original object, break apart and delete the outer shape,
then move the inner square to the right, making it's segments crossing the original shape's right edge,
then enable snapping to path intersections, and move the nodes to the right position of the original object -after the right nodes are connected.

tlundberg
Posts: 4
Joined: Fri Jan 17, 2014 4:26 am

Re: Creating shapes with exact/precise dimensions

Postby tlundberg » Sun Jan 19, 2014 9:20 pm

Lazur URH wrote:Welcome aboard!

Thanks! :)

Lazur URH wrote:The boolean operations in inkscape are not precise in inkscape, they add a small error to each nodes position.

Reading through my post again I noticed that I didn't mention anywhere that I used the boolean operations. But, of course I did. Impressive of you to pick up on that!

Lazur URH wrote:Thus if you want a path with exact coordinates, you have to avoid those, or, type in the right coordinates after.

Alright, I can do that :)

Lazur URH wrote:At the top left corner, you have double nodes, you can correct that too.

You mean the rounded corners? That's intentional. I want that. If that's not what you mean, then I can't see the double nodes.

Lazur URH wrote:To draw such I would first make a path with a 90° turn, then duplicate it,
use the align and distribute panel (Shift+Ctrl+A) to move the duplicants aligned to a square drawn before,
rotate them to position, combine them together (Ctrl+K),
Use the node editor tool to unconnect each corner's segments and connect them with others,
delete unnecessary nodes and straighten segments.
Then combine it with a smaller square center aligned to the larger square, goimg the opposite direction
(may have to reverse the path).

To add the cut on the right, I would unconnect the vertical segments there and connect the outer ones with the inner ones.
Then by typing in the right x coordinate values to the two nodes at the inner square's corners, the result would be quite precise.

To add the cut you could go other way with snapping:
duplicate the original object, break apart and delete the outer shape,
then move the inner square to the right, making it's segments crossing the original shape's right edge,
then enable snapping to path intersections, and move the nodes to the right position of the original object -after the right nodes are connected.


Thanks for this description. I'll play around with the tools and techniques you've mentioned and see what I can come up with.

Thanks for your help! :)

Polygon
Posts: 393
Joined: Thu Dec 19, 2013 3:27 am

Re: Creating shapes with exact/precise dimensions

Postby Polygon » Mon Jan 20, 2014 12:08 am

Maybe this will help:

Cheers
P.
Attachments
LetterC.png
LetterC.png (50.23 KiB) Viewed 3268 times

tlundberg
Posts: 4
Joined: Fri Jan 17, 2014 4:26 am

Re: Creating shapes with exact/precise dimensions

Postby tlundberg » Thu Jan 23, 2014 5:56 am

Thanks Polygon, that was a great example! I've adapted it a bit and I'm making great progress on my work.

Thanks a lot :)

tlundberg
Posts: 4
Joined: Fri Jan 17, 2014 4:26 am

Re: Creating shapes with exact/precise dimensions

Postby tlundberg » Thu Jan 23, 2014 5:56 am

Here's what I got this far

Image

I'm going to tweak the shadows a bit more before I'm done

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Creating shapes with exact/precise dimensions

Postby Lazur » Thu Jan 23, 2014 6:30 am

tlundberg wrote:
Lazur URH wrote:At the top left corner, you have double nodes, you can correct that too.

You mean the rounded corners? That's intentional. I want that. If that's not what you mean, then I can't see the double nodes.


I was referring to these nodes:
mOb02XR2.png
mOb02XR2.png (3.22 KiB) Viewed 3198 times


Return to “Help with using Inkscape”