[Answered/Solved] Selective layers constraint when scaling

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
Panchdara
Premier Member
Posts: 185
Joined: Wed Nov 25, 2015 4:15 pm

[Answered/Solved] Selective layers constraint when scaling

Post by Panchdara » Tue May 18, 2021 7:00 am

Hello again. I hope I can ask this correctly.

I want to create a "template" window block. However, windows do change dimension, normally the frame remaining a fixed dimension.

Is there a way to re-dimension a entity/block but keep certain entities in that layer/block constrained to the dimensions it was created with?
This will extend to child layers and blocks.

I think the x/y/parent constraints make sense (constrain layer based on parent constraints), but the Anchor constraint would be to keep layer in exact position during a scale function???

Attached is a sample. I also attach a proposed layer create/edit form with constraint options - just an initial thought.

Am I missing something? I have searched, but no luck yet.

Best
Constrain.png
Constrain.png (93.64 KiB) Viewed 6659 times
Constrain.dxf
(114.65 KiB) Downloaded 360 times
Last edited by Panchdara on Wed May 19, 2021 7:25 am, edited 1 time in total.
Windows 10

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: selective layers constraint when scaling

Post by Husky » Tue May 18, 2021 7:29 am

Maybe you should consider to use the "Stretch" tool instead of the "Scale" tool. Just an initial thought. Give it a try ... :wink:

https://www.qcad.org/doc/qcad/latest/re ... ro_en.html
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

Panchdara
Premier Member
Posts: 185
Joined: Wed Nov 25, 2015 4:15 pm

Re: selective layers constraint when scaling

Post by Panchdara » Tue May 18, 2021 7:41 am

Thank you. I think that might not be what I'm asking, but I'll try. I'm trying to constrain any stretching on certain layers/entities in a block/layer. However, I'm off the the drawing to play with that now. Nope..

Very best
Windows 10

User avatar
petevick
Premier Member
Posts: 392
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: selective layers constraint when scaling

Post by petevick » Tue May 18, 2021 11:03 am

Would locking certain layers give you what you want ?
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6

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

Re: selective layers constraint when scaling

Post by CVH » Tue May 18, 2021 11:22 am

petevick wrote:
Tue May 18, 2021 11:03 am
Would locking certain layers give you what you want ?
Locked layers don't update so nothing of those is moved then.
Panchdara wrote:
Tue May 18, 2021 7:41 am
I think that might not be what I'm asking, but I'll try.
I think it is, the catch is: What is selected and how the 4 references are picked.
  • Select all what to 'Strech' AND all what to 'Move'
    Box what to 'Move'
    Pick 2 know references
I is not quite scaling by factor, nor scaling to a get a certain newer value.
I know, but it works for me with carfully picking references.

Regards,
CVH

Panchdara
Premier Member
Posts: 185
Joined: Wed Nov 25, 2015 4:15 pm

Re: selective layers constraint when scaling

Post by Panchdara » Tue May 18, 2021 12:01 pm

Many thanks guys... but I think we're at an impasse. Unless there's a completely different train of thought. I am specifically wanting to "lock" a specific layer dimensions and keep ratio of position with an adjustable (scalable/moveable) entity.

Attached should be clearer?

I want to keep the red bits the SAME size, but stretch the BLUE bits keeping the red BITS same size but moved to new position locked onto the BLUE bits. Accomplish this with a block where certain entities are fixed to a reference point of another entity but doesn't change dimension(size). Of 2 entities, one entity is unchangeable (dimension "locked") and is fixed onto another changeable entity by its relative position to that changeable entity.

Thanks CVH - I don't understand "Box what to 'Move'"

??

Cheers and best. Perhaps my explanation is not written in proper English. I do understand language differences :)

Very best
Constrain2.dxf
(105.14 KiB) Downloaded 346 times
Windows 10

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

Re: selective layers constraint when scaling

Post by CVH » Tue May 18, 2021 1:08 pm

Panchdara wrote:
Tue May 18, 2021 12:01 pm
Thanks CVH - I don't understand "Box what to 'Move'"
Stretch requires 4 reference points
  • First corner
    Second corner
    Reference point
    Target point
The first two set a box around what to 'Move'.
Entities that cross the box are stretched as a rubber band.
Entities that are inside the box are simply moved.

The tool acts on all inside and all that cross.
Or can act only on those that where selected upfront.

In your second example, high, the glass and the frames should be separate things to be functional.

Also, I am referring to entities! It doesn't work as a block as those are considered to be 1 thing each.
The glass could be a simple polyline, L & R frame can be blocks.

Maybe this works also in the 'Edit Block In-place' mode?
(Can't tell you that, as scripter I'll never use that anymore)


BTW: Are you aware that the glass in the lower part is slanted a minute bit? :?
0.021198° ...Used OG-OC? :wink:

Regards,
CVH
Last edited by CVH on Tue May 18, 2021 1:39 pm, edited 1 time in total.

Panchdara
Premier Member
Posts: 185
Joined: Wed Nov 25, 2015 4:15 pm

Re: selective layers constraint when scaling

Post by Panchdara » Tue May 18, 2021 1:16 pm

Yeah, I saw that, - working on motorcycle and trying to conjure correct words and an example are 3 things... being male, it's obvious I'm not capable of chewing gum and walking simultaneously :)

I'll persevere... I think I'll be forced to make several windows/blocks, each of different sizes. Sorta negates the usefulness of a library.

Best
Windows 10

User avatar
ryancousins
Premier Member
Posts: 367
Joined: Thu Mar 19, 2020 3:47 am
Location: Michigan, USA

Re: selective layers constraint when scaling

Post by ryancousins » Tue May 18, 2021 1:46 pm

This is probably not the direction you want to go but have you thought about a parametric modeler to set this up and then export a DXF to bring in to QCAD? Here is a quick example based loosely on your example, using OpenSCAD.
Attachments
pic03.png
pic03.png (118.77 KiB) Viewed 6589 times
pic02.png
pic02.png (27.82 KiB) Viewed 6589 times
pic01.png
pic01.png (36.32 KiB) Viewed 6589 times

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: selective layers constraint when scaling

Post by Husky » Tue May 18, 2021 10:26 pm

Panchdara wrote:
Tue May 18, 2021 1:16 pm
... I think I'll be forced to make several windows/blocks, each of different sizes. Sorta negates the usefulness of a library.
I would only support this idea when we are talking about just a handful of blocks (3-5 or so). Other than that I would stick to the stretch tool.

Why? You have only to deal with ONE block. You can stretch this block to ANY needed measurement. After you got use to the procedure it is a piece of cake!
What can you do with this ONE block?
1. use it as it is.
2. insert it and modify the size as needed like:
A) fit in with snap points ...

Stretch to snap.gif
Stretch to snap.gif (1.32 MiB) Viewed 6457 times

B) Extend it with a specific value. Example shows how to stretch it 150 longer ...

stretch to lengthen.gif
stretch to lengthen.gif (505.67 KiB) Viewed 6457 times

... or C) lengthen it to a total value. Example shows how to stretch it to a total of 700.

stretch to total.gif
stretch to total.gif (628.27 KiB) Viewed 6457 times
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

Panchdara
Premier Member
Posts: 185
Joined: Wed Nov 25, 2015 4:15 pm

Re: selective layers constraint when scaling

Post by Panchdara » Wed May 19, 2021 7:24 am

Ryan - thank you. You are correct, not really where I wanted to go and way over my head :oops: . However, your time is most appreciated.

CVH - :idea: Now the lightbulb is on! I see what you mean about the box. I just never took the stretch tool to the outer limits.

Husky - you need to box up all those wonderful GIFs and videos and publish them! :P I can see I was barking up the wrong tree, somewhat. I can use Library (I think) and not blocks. Your short demo opened my eyes to essentially exactly what I was asking. As they say, a picture is worth a thousand words - and you figured what I was asking (amazing! - my wife can't!) I'm even impressed that this method (stretch/boxing) even adjusts dimensions. Perfect so far.

I'm going to change subject to "Answered/Solved" if that's okay.

(As an aside Husky, what screen/keyboard/mouse recorder do you use? Very easy to follow.)

Very best
Windows 10

User avatar
ryancousins
Premier Member
Posts: 367
Joined: Thu Mar 19, 2020 3:47 am
Location: Michigan, USA

Re: selective layers constraint when scaling

Post by ryancousins » Wed May 19, 2021 12:27 pm

Panchdara wrote:
Wed May 19, 2021 7:24 am

(As an aside Husky, what screen/keyboard/mouse recorder do you use? Very easy to follow.)
Agreed... Husky's recordings are a thing of legend. He makes everything look easy. I think he's been using QCAD for just a little while. :wink:

Post Reply

Return to “QCAD 'How Do I' Questions”