Solved: Automatic Mirror Copy?

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
Chips&Chips
Full Member
Posts: 68
Joined: Mon Nov 13, 2023 12:15 pm

Solved: Automatic Mirror Copy?

Post by Chips&Chips » Mon Feb 05, 2024 11:50 am

I know I can create a mirror copy of part or all of a drawing by using Modify / Mirror. But in some cases (PCB design for one) it would be nice to be able to draw the regular drawing and have a mirror version be produced automatically in an adjacent area of the canvas. Is there any way to do that?

Just asking.
Last edited by Chips&Chips on Fri Feb 09, 2024 1:42 pm, edited 2 times in total.
Paul A.
SE Texas
Windows 10
QCAD V 3.29.3.0

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

Re: Automatic Mirror Copy?

Post by CVH » Wed Feb 07, 2024 5:53 am

Hi,
Such a tool would not be meaningful for many users.
Is there a way?
Sure, with scripting almost anything is possible.

Regards,
CVH

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

Re: Automatic Mirror Copy?

Post by Husky » Wed Feb 07, 2024 6:31 am

Chips&Chips wrote:
Mon Feb 05, 2024 11:50 am
I know I can create a mirror copy of part or all of a drawing by using Modify / Mirror...
For what would then this mirrored version be used? Just visual information?
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..."

User avatar
Chips&Chips
Full Member
Posts: 68
Joined: Mon Nov 13, 2023 12:15 pm

Re: Automatic Mirror Copy?

Post by Chips&Chips » Wed Feb 07, 2024 1:00 pm

For what could it be used?

I am presently working on a circuit board design using what is called Vero or strip board. It is a method used primarily for prototypes, but it has been used for actual production equipment by at least one major company. A Vero or strip board has holes on a 0.1" square grid and on one side there are conductor/copper strips that run from one edge to the opposite edge. Each copper strip is centered on one row of holes and they are separated by about 0.04" from the adjacent strip. Components are soldered to those strips which form the connections running in one direction. Wire jumpers are used to connect from one strip to another. And where two components would be soldered to the same strip, a drill-like tool can be used to cut the copper between them if no connection is desired. The location of the parts and jumpers and places where the strips are to be cut must be carefully planned.

Parts are generally located on the side of the board that does no have the copper strips and that is usually called the component side. The copper strips are on the bottom or foil side of the board. It is easiest to layout the components while looking at the board from the top or component side. But then, in order to cut the copper strips at the correct locations, it is best to view the board from the bottom or foil side. And these two views are MIRROR copies of each other.

This is what prompted the question. It is just a question.

And YES, as I said above, I do know I can create a mirror version by using the mirror command. That just means a decision must be made as to when to do that. And if a revision is needed, then the mirror image would need to be erased and a new one made. It would be nice to automate that process. Nothing essential. Not a deal breaker. Just something nice, if it could be done it would be nice. So I asked. And if it can't, I will get over it.


Husky wrote:
Wed Feb 07, 2024 6:31 am
Chips&Chips wrote:
Mon Feb 05, 2024 11:50 am
I know I can create a mirror copy of part or all of a drawing by using Modify / Mirror...
For what would then this mirrored version be used? Just visual information?
Paul A.
SE Texas
Windows 10
QCAD V 3.29.3.0

User avatar
Chips&Chips
Full Member
Posts: 68
Joined: Mon Nov 13, 2023 12:15 pm

Re: Automatic Mirror Copy?

Post by Chips&Chips » Wed Feb 07, 2024 1:04 pm

Scripting?

Where do I find out about that? And how steep is the learning curve? Hours? Days? Weeks? Months?


CVH wrote:
Wed Feb 07, 2024 5:53 am
Hi,
Such a tool would not be meaningful for many users.
Is there a way?
Sure, with scripting almost anything is possible.

Regards,
CVH
Paul A.
SE Texas
Windows 10
QCAD V 3.29.3.0

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

Re: Automatic Mirror Copy?

Post by andrew » Wed Feb 07, 2024 1:37 pm

There is a way using blocks (for the advanced and adventurous users out there):

- create a block for the part you want to work on
- mirror the block as desired
- you now have two block references: the original and the mirrored
- right-click on the block reference you want to work on and choose "Edit block in-place"
- in the options toolbar activate "Auto Update"
- whatever you draw now is added to the block definition and both block references are updated accordingly
- in the options toolbar click "Save and Close" when you are done

You work with either block reference and keep the other updated.

User avatar
Chips&Chips
Full Member
Posts: 68
Joined: Mon Nov 13, 2023 12:15 pm

Re: Automatic Mirror Copy?

Post by Chips&Chips » Thu Feb 08, 2024 4:51 am

Wow! I didn't dare imagine that it was at all possible. This is fantastic!

I am glad I asked. I'm copying this to my QCAD cheat sheet and can't wait to try it.

Thanks so very much!


andrew wrote:
Wed Feb 07, 2024 1:37 pm
There is a way using blocks (for the advanced and adventurous users out there):

- create a block for the part you want to work on
- mirror the block as desired
- you now have two block references: the original and the mirrored
- right-click on the block reference you want to work on and choose "Edit block in-place"
- in the options toolbar activate "Auto Update"
- whatever you draw now is added to the block definition and both block references are updated accordingly
- in the options toolbar click "Save and Close" when you are done

You work with either block reference and keep the other updated.
Paul A.
SE Texas
Windows 10
QCAD V 3.29.3.0

User avatar
Chips&Chips
Full Member
Posts: 68
Joined: Mon Nov 13, 2023 12:15 pm

Re: Automatic Mirror Copy?

Post by Chips&Chips » Thu Feb 08, 2024 9:26 am

Andrew,

Posting this finale for the benefit of others who may also benefit.

I tried your method and it does work. The Mirror operation seems to be separate from inserting a second instance of the block, but doing both in sequence worked well.

You can see in the attached screen shot that I was able to use Edit Block In Place to erase the mounting hole and some other holes (red) in an upper corner of one instance of the Block and when I clicked on Save and Close the other instance had the same changes, IN MIRROR REVERSE. PERFECT!
EditBlockInPlace.jpg
EditBlockInPlace.jpg (685.41 KiB) Viewed 1154 times
I was confused about the Options Toolbar at first, but found out it is an interactive toolbar. No sub-commands show up until you reach the point where they can be used. Drove me nuts for a while until I noticed that. But that seems to work too and the Auto Update seems to stay active when I Save and Close and then restart the Edit Block in Place. This is going to be very helpful. My next step with this project is to add the schematic above one instance of the circuit board and then do the parts layout. I love the way this is going. Need to brush up on using a parts library now.

Here are my additions to your procedure, again for the benefit of those, like myself who are new to QCAD and don't know all the ins and outs:

- create a block for the part you want to work on - Use the Block List GIB on the right, vertical set of Widgets.
- mirror the block as desired - Modify / Mirror
- you now have two block references: the original and the mirrored
- right-click on the block reference you want to work on and choose "Edit block in-place"
- THIS IS WHEN THE OPTIONS TOOLBAR CHANGES TO SHOW CONTEXT RELEVANT OPTIONS!
- in the options toolbar activate "Auto Update"
- whatever you draw now is added to the block definition and both block references are updated accordingly
- in the options toolbar click "Save and Close" when you are done

You can work with either block reference and the other will update.


This is a great feature. Thanks again!
Paul A.
SE Texas
Windows 10
QCAD V 3.29.3.0

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

Re: Automatic Mirror Copy?

Post by Husky » Fri Feb 09, 2024 6:05 am

@Chips&Chips

thanks that you elaborated to us why you would like to have an "automatically updated mirrowed copy" for parts of the drawing. Great that Andrew's solution works for you. It is impressive what Qcad can accomplish, isn't it?

However, I thought it can't hurt if I file a feature request even if it is slightly a different approach. :wink:

https://www.qcad.org/bugtracker/index.p ... sk_id=2527
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..."

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

Re: Automatic Mirror Copy?

Post by CVH » Fri Feb 09, 2024 1:01 pm

Husky wrote:
Fri Feb 09, 2024 6:05 am
However, I thought it can't hurt if I file a feature request even if it is slightly a different approach.
You are right, Husky, voted for it.
From ACAD references it seems to be possible including mirrored text.
The how is related to 3D and the used coordinate system, they place 'the camera' so that they look at it from behind.
And that would be the mirrored image when the data is merely 2D. :wink:

One would expect:
- that we can mirror a Viewport with MI directly in the Layout Block but it returns a copy.
- a negative scale to preform a mirror in reference with some axis but the result is that it is rotated by 180 degrees.

On the other hand, I see no parameters of the RViewportEntity/Data class that can control this except a negative scale.

Regards,
CVH

User avatar
Chips&Chips
Full Member
Posts: 68
Joined: Mon Nov 13, 2023 12:15 pm

Re: Automatic Mirror Copy?

Post by Chips&Chips » Fri Feb 09, 2024 1:39 pm

As far as I am concerned, the use of a mirrored block is almost ideal for my purpose. Both versions are in the drawing and not just in how I look at them. I am not familiar enough with QCAD to know how the viewports operate. Perhaps two viewports can be printed side by side, but I already have made a test print with both sides visible and that is ideal from my point of view.

Being new to the QCAD world I don't know exactly how to modify the thread title but I will try. If I can't, then perhaps Andrew or some other moderator can do that.

And a very happy thanks to all here. I really didn't think there would be a way to do this. Yes, QCAD does have some great features. Now, if only I could really understand what is going on with the Grid and Meta Grid.

Thanks again!
Paul A.
SE Texas
Windows 10
QCAD V 3.29.3.0

Post Reply

Return to “QCAD 'How Do I' Questions”