Keeping Dimension Measurements the Same When Resizing Drawings
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Keeping Dimension Measurements the Same When Resizing Drawings
This is a followup to my other recent question (https://qcad.org/rsforum/viewtopic.php?f=32&t=7322)
Here is a drawing I did to scale: To get it to fit on my details page for when I submit it to the county's Plan Review, I needed to enlarge it so it was easy to read, and got this: I know the 2nd image is too busy, that'll change in clean-up.
My concern is that when I enlarge the drawing, the dimension measurements scale up. Is there any way to enlarge a drawing and keep the measurements the same? Or to change the measurements so they show the original size?
Or is what I'm asking an issue with the integrity of the program and something CAD programs are not supposed to do?
Here is a drawing I did to scale: To get it to fit on my details page for when I submit it to the county's Plan Review, I needed to enlarge it so it was easy to read, and got this: I know the 2nd image is too busy, that'll change in clean-up.
My concern is that when I enlarge the drawing, the dimension measurements scale up. Is there any way to enlarge a drawing and keep the measurements the same? Or to change the measurements so they show the original size?
Or is what I'm asking an issue with the integrity of the program and something CAD programs are not supposed to do?
Re: Keeping Dimension Measurements the Same When Resizing Drawings
Unless you want to make a larger version of a miniature.
What is the reason to scale up the real world measuments of the design?
How we present this on paper has nothing do do with the drawing but with paper scale.
Regards,
CVH
What is the reason to scale up the real world measuments of the design?
How we present this on paper has nothing do do with the drawing but with paper scale.
Regards,
CVH
Re: Keeping Dimension Measurements the Same When Resizing Drawings
Yes, for example by using a viewport:
https://qcad.org/en/tutorial-working-wi ... -viewports
Or simply by printing to scale (e.g. 2:1):
https://qcad.org/en/tutorial-printing
That's also possible using the linear factor property of dimensions:Or to change the measurements so they show the original size?
Select the dimension entity and change the property "Linear factor".
Ideally, try to keep all geometry 1:1 and only scale for printing. If you need different scales in one printout, you can use layout blocks and viewports (see tutorial linked above).Or is what I'm asking an issue with the integrity of the program and something CAD programs are not supposed to do?
Re: Keeping Dimension Measurements the Same When Resizing Drawings
Wow! I had no idea this could be done at all! (Hey, when you're self-taught and most of your time with a program is on, "I have to get this done by deadline," you don't always have time to poke around and learn the cool stuff.)andrew wrote: ↑Mon Jun 08, 2020 8:01 pmYes, for example by using a viewport:
https://qcad.org/en/tutorial-working-wi ... -viewports
I've been using that already - after looking over viewports, and realizing there's so much I don't know, maybe my methods are really kludges, but I've been printing different pages to different scales, depending on the width of what I'm fitting on the page.andrew wrote: Or simply by printing to scale (e.g. 2:1):
https://qcad.org/en/tutorial-printing
Yes, as I said, just found out, but once I get the feel for that, I know it's going to make things much easier for me! I would really like to keep things on a 1:1 scale, since, if I don't, and have to make changes, I have to resize to the original size, make changes, then resize again. That leaves room for a lot of mistakes along the way.andrew wrote:Ideally, try to keep all geometry 1:1 and only scale for printing. If you need different scales in one printout, you can use layout blocks and viewports (see tutorial linked above).Tango wrote:Or is what I'm asking an issue with the integrity of the program and something CAD programs are not supposed to do?
Is thread (https://qcad.org/rsforum/viewtopic.php?p=25422) up to date in terms of printing multiple layouts? I would think that I could do it from the command line on macOS the same way it works on Linux, since both command lines are using bash (well, in many cases, they are).
Is there any way to print multiple layouts from the GUI without going through and printing each layout separately?
Re: Keeping Dimension Measurements the Same When Resizing Drawings
Yes. If you are comfortable working with the Terminal, that might be an option.Is thread (https://qcad.org/rsforum/viewtopic.php?p=25422) up to date in terms of printing multiple layouts?
No, unfortunately not.Is there any way to print multiple layouts from the GUI without going through and printing each layout separately?
Re: Keeping Dimension Measurements the Same When Resizing Drawings
Just started looking at the JavaScript API and scripting information.
Would it be possible to write a plugin that would let you store the desired order of Layouts in a project within the project file, then, when called, print them all in order (or use that same order to create a PDF document with all the layouts as separate pages)?
Asking first to find out if it's possible. I don't mind putting in the time if it can be done, but I don't want to spend a few hours researching the API right now if it's not doable.
Would it be possible to write a plugin that would let you store the desired order of Layouts in a project within the project file, then, when called, print them all in order (or use that same order to create a PDF document with all the layouts as separate pages)?
Asking first to find out if it's possible. I don't mind putting in the time if it can be done, but I don't want to spend a few hours researching the API right now if it's not doable.
Re: Keeping Dimension Measurements the Same When Resizing Drawings
Layouts (layout blocks) already have an order. You can see / edit it when renaming a layout block.
Yes, this is certainly possible. Below is some rough code. You'd still have to do the block iteration and decide how / if you want to auto fit to paper, etc.
Yes, this is certainly possible. Below is some rough code. You'd still have to do the block iteration and decide how / if you want to auto fit to paper, etc.
Code: Select all
include("scripts/library.js")
var storage = new RMemoryStorage();
var spatialIndex = createSpatialIndex();
var doc = new RDocument(storage, spatialIndex);
var di = new RDocumentInterface(doc);
var scene = new RGraphicsSceneQt(di);
var view = new RGraphicsViewImage();
view.setScene(scene, false);
// load file:
di.importFile("file.dxf");
var p = new Print(undefined, doc, view);
var printer = p.createPrinter(pdfFile, printerName, pdfVersion);
var painter = new QPainter();
if (painter.begin(printer)) {
// iterate through layout blocks:
for (...) {
var blockName = ...;
var block = doc.queryBlockDirect(blockName);
if (block.hasLayout()) {
var layoutName = block.getLayoutName();
var layout = doc.queryLayout(layoutName);
qDebug("exporting layout: %1".arg(layoutName);
}
if (i!==0) {
printer.newPage();
}
var blockId = doc.getBlockIdAuto(blockName);
if (blockId!==RObject.INVALID_ID) {
var entityIds = doc.queryBlockEntities(blockId);
if (entityIds.length===0) {
// skip emtpy block:
continue;
}
doc.setCurrentBlock(blockId);
}
p.printCurrentBlock(printer, painter);
}
}
painter.end();
printer.destroy();
Re: Keeping Dimension Measurements the Same When Resizing Drawings
Thank you!
I'm working in spurts - I get a day or two to work on my plans for our renovation projects and on things like this, then a while when I can't touch it, so I'll be working on this, but it'll be a while until I can finish it.
I did try this form the command line and it worked fine. It's just easier to do it from within the GUI, so I don't have to leave my work environment to convert to PDF.
One thought occurred to me: Is it possible to run a command line script from QCAD? That might be a simple intermediate step: Call my command line script from within QCAD and it prints. Long term I'd do more to allow for configuration and so on, but this would be a simple way to do it in the mean while.
I'm working in spurts - I get a day or two to work on my plans for our renovation projects and on things like this, then a while when I can't touch it, so I'll be working on this, but it'll be a while until I can finish it.
I did try this form the command line and it worked fine. It's just easier to do it from within the GUI, so I don't have to leave my work environment to convert to PDF.
One thought occurred to me: Is it possible to run a command line script from QCAD? That might be a simple intermediate step: Call my command line script from within QCAD and it prints. Long term I'd do more to allow for configuration and so on, but this would be a simple way to do it in the mean while.
Re: Keeping Dimension Measurements the Same When Resizing Drawings
Hello everyone!
Thanks for all the advice, but isn't it easier to add an option to resize an object instead of re-scale to prevent the Measurements from changing?
I have to merge CAD files from Switzerland and Japan for example.
Switzerland uses A1 landscape drawings and Japan A4 vertical drawings...
So every time I copy some objects from Switzerland it's a hassle to adjust them to our format...
So an easy option to change only the size of objects, no scaling, would be awesome!
Thanks in advance and greetings from Tokyo!
Gerome
Thanks for all the advice, but isn't it easier to add an option to resize an object instead of re-scale to prevent the Measurements from changing?
I have to merge CAD files from Switzerland and Japan for example.
Switzerland uses A1 landscape drawings and Japan A4 vertical drawings...
So every time I copy some objects from Switzerland it's a hassle to adjust them to our format...
So an easy option to change only the size of objects, no scaling, would be awesome!
Thanks in advance and greetings from Tokyo!
Gerome
Gerome Meyer
ジェローム メイヤー<
ジェローム メイヤー<