[SOLVED] Store object positions

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
User avatar
cls77
Newbie Member
Posts: 9
Joined: Thu Oct 29, 2020 7:50 am
Location: Italy, BN

[SOLVED] Store object positions

Post by cls77 » Thu Oct 29, 2020 8:25 am

Hi all,
I am using QCAD to draw folding knives, in particular to design the blade open / close mechanism.
To do so, i draw the blade and rotate it manually to simulate the opening and closing movements, but this is not precise for me.
I would like to know if there is a way to save / store one or more position of a polyline / object in order to have two fixed positions (open and closed) and use them to test the mechanism more quickly.

The ideal would be that everytime I make a modification to the blade, then I can test it automatically in the two positions...
Is it possible to do this?

I attach two images, the blade of course is the red object (a polyline on its own layer)
backlock-open.jpg
Blade open
backlock-open.jpg (25.21 KiB) Viewed 6235 times
backlock-closed.jpg
Blade closed
backlock-closed.jpg (50.96 KiB) Viewed 6235 times
Thanks in advance
Last edited by cls77 on Thu Oct 29, 2020 7:53 pm, edited 1 time in total.

User avatar
andrew
Site Admin
Posts: 9062
Joined: Fri Mar 30, 2007 6:07 am

Re: Store object positions

Post by andrew » Thu Oct 29, 2020 8:34 am

You could create a block from the blade part and insert it twice in the open and closed position. If you edit the block (double-click on it), both instances are updated.

Blocks are essentially named groups that can be inserted multiple times at different positions with different angles, etc.

User avatar
cls77
Newbie Member
Posts: 9
Joined: Thu Oct 29, 2020 7:50 am
Location: Italy, BN

Re: Store object positions

Post by cls77 » Thu Oct 29, 2020 9:45 am

thank you Andrew, I will try to do as you suggest

User avatar
cls77
Newbie Member
Posts: 9
Joined: Thu Oct 29, 2020 7:50 am
Location: Italy, BN

Re: Store object positions

Post by cls77 » Thu Oct 29, 2020 1:14 pm

ok, it works.... I created a block and inserted it twice, in open and closed position but there is a problem: now if I modify the blade in the block edit screen, I see no more the levels with other knife parts, and this is important to me because the blade position hinges on the other parts (e.g. contact points with the blue entity... ) and on the entire project so I need to see other levels...

is there some kind of "block edit in place" function?

thanks!

CVH
Premier Member
Posts: 3474
Joined: Wed Sep 27, 2017 4:17 pm

Re: Store object positions

Post by CVH » Thu Oct 29, 2020 1:20 pm

Hi,

No, what you can do is explode the block in model space, alter and renew the block.

Regards,
CVH

User avatar
cls77
Newbie Member
Posts: 9
Joined: Thu Oct 29, 2020 7:50 am
Location: Italy, BN

Re: Store object positions

Post by cls77 » Thu Oct 29, 2020 1:26 pm

ok thanks,
how can I "renew" the block? By creating a new block, or there's an "update block" function?

CVH
Premier Member
Posts: 3474
Joined: Wed Sep 27, 2017 4:17 pm

Re: Store object positions

Post by CVH » Thu Oct 29, 2020 1:38 pm

Hi,

Keep you blade entities on a specific layer...

At that point it is easy to select only that layers entities (R-click in layer list)
With the entities selected >> Create block from selection (BC)
Same origin
Same block name
Overwrite !

Regards,
CVH

User avatar
cls77
Newbie Member
Posts: 9
Joined: Thu Oct 29, 2020 7:50 am
Location: Italy, BN

Re: Store object positions

Post by cls77 » Thu Oct 29, 2020 1:49 pm

ok i created two separated levels, one with the "blade-block" in open position, the other with the block in closed position
for example: i want to modify the shape of the blade: I explode the open position block, make my modifications and when finished, I create a block from selection, setting as name "blade-block" and overwrite the existing one.
At this point the closed block is also updated, BUT loses his original position and takes the position of the open blade.... it becomes a copy, so I have to put again in the right position..... and this is not good for me

in this example, the bottom blade was in the right closed position, but after the block modifications, has moved in the actual position..
is that normal?
blocco-pompa-completo.jpeg
blocco-pompa-completo.jpeg (39.74 KiB) Viewed 6195 times

User avatar
cls77
Newbie Member
Posts: 9
Joined: Thu Oct 29, 2020 7:50 am
Location: Italy, BN

Re: Store object positions

Post by cls77 » Thu Oct 29, 2020 1:59 pm

ok I got it... when I created the new block from the selected (modified) entity, I had to select as a reference the center of the circle, eg. the hole in the blade, that is the only point in common between the open and closed blocks instances

thank you very much for your help, very useful!

CVH
Premier Member
Posts: 3474
Joined: Wed Sep 27, 2017 4:17 pm

Re: Store object positions

Post by CVH » Thu Oct 29, 2020 3:38 pm

Glad I could help you.

Pls mark the topic as [SOLVED] in your first post.
Cheers!
CVH

Post Reply

Return to “QCAD 'How Do I' Questions”