Centerline midpoint issue
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.
- ryancousins
- Premier Member
- Posts: 367
- Joined: Thu Mar 19, 2020 3:47 am
- Location: Michigan, USA
Centerline midpoint issue
When using the draw centerline tool (Misc > Draw > Centerline Cross), I can't seem to find a way to totally control if the short or long segment of the "center" linetype that I use for this will be in the center of the circle. If you look at the circle on the far-left, you see that the short dashes are in the center, both of the horizontal and the vertical line. In my opinion, it should always be this way, at least by default. If you look at the middle circle, I decided to not draw the centerlines out quite so far away and the result is for the longer dashes to be in the center of the circle. While this is not ideal, I can at least get back to the version on the far-left by playing around with the length of the centerlines. I can't figure out exactly how it works, but I can keep trying small variations in length until I get the short dashes in the center.
The big issue I'm having, however, is that sometimes centerlines can also denote symmetry, as I have done for the rectangle on the far-right side. Since the rectangle is wider than it is tall, it means that my horizontal and vertical centerlines will need to be different lengths, but this often leads to both a short and a long dash in the center, which is really undesirable. I primarily use QCAD to create assignments for my drafting students to recreate by hand, and I'd like to be precise about how I display my lines so they know exactly what their drawings should look like. If it weren't for that, this wouldn't be something that would bother me.
Can someone explain how the "center" linetype decides whether the short or long dash will be in the middle of a line segment, and can anyone think of an easy fix that I'm not thinking of? The thought of manually drawing the lines and breaking out all the segments crossed my mind, but I think I'd rather play in traffic. Is there at least a way to make the centerlines "fixed" so I can go in and manually trim the ends without it re-aligning the dash configurations?
The big issue I'm having, however, is that sometimes centerlines can also denote symmetry, as I have done for the rectangle on the far-right side. Since the rectangle is wider than it is tall, it means that my horizontal and vertical centerlines will need to be different lengths, but this often leads to both a short and a long dash in the center, which is really undesirable. I primarily use QCAD to create assignments for my drafting students to recreate by hand, and I'd like to be precise about how I display my lines so they know exactly what their drawings should look like. If it weren't for that, this wouldn't be something that would bother me.
Can someone explain how the "center" linetype decides whether the short or long dash will be in the middle of a line segment, and can anyone think of an easy fix that I'm not thinking of? The thought of manually drawing the lines and breaking out all the segments crossed my mind, but I think I'd rather play in traffic. Is there at least a way to make the centerlines "fixed" so I can go in and manually trim the ends without it re-aligning the dash configurations?
- Attachments
-
- centerlines.png (9.7 KiB) Viewed 6616 times
- ryancousins
- Premier Member
- Posts: 367
- Joined: Thu Mar 19, 2020 3:47 am
- Location: Michigan, USA
Re: Centerline midpoint issue
After looking at it I realized that it appears the centerlines adjust themselves to maintain symmetry from end to end. That makes sense. Is there a way to "explode" the line, for lack of a better term, so it can be manually trimmed without trying to re-configure itself to maintain symmetry? Sometimes it works to just keep trying different horizontal and vertical lengths but sometimes this doesn't work because it would mean one set will end up too short or too long in order to get it to have the short dash in the center.
Re: Centerline midpoint issue
In fact, that's a very specific piece of code that I came across.
Indeed it creates symmetry and it will try to avoid a spacing or a dot at the beginning or at the end.
LineTypes definition start with an Alignment Field set to A.
There is only one option. A from 'Auto' or A from 'Aligned'
More details here:
https://help.autodesk.com/view/OARX/201 ... FEE6425405
And no, there is no method in QCAD that explodes linetypes.
(But it can be done.)
Regards,
CVH
Indeed it creates symmetry and it will try to avoid a spacing or a dot at the beginning or at the end.
LineTypes definition start with an Alignment Field set to A.
There is only one option. A from 'Auto' or A from 'Aligned'
More details here:
https://help.autodesk.com/view/OARX/201 ... FEE6425405
And no, there is no method in QCAD that explodes linetypes.
(But it can be done.)
Regards,
CVH
Re: Centerline midpoint issue
I don't think so - but maybe I see it wrong ...ryancousins wrote: ↑Tue Mar 02, 2021 4:35 amAfter looking at it I realized that it appears the centerlines adjust themselves to maintain symmetry from end to end.
My understanding is the line has a fixed definition. Something like this:
*DASHDOTX2,Dash dot (2x) ____ . ____ . ____ . ___
A, 25.4, -12.7, 0, -12.7
It's a repeating pattern. It starts in this case with a full dash and ends with what ever is at the end of the line. Maybe a dash, maybe a dot, maybe a gap. The length of the used dashes, dots and gaps are fixed - so you will never know unless you have chosen the length of the line based on the line definition. There is no goal in CAD to start and end the line with a full dash and certainly not with a line in the middle. If that happened - its by accident.
This said - do we not need that? No, not anymore. Yes it looks nice but the reason why we did that in the old days on a drafting board was because we were "desperately" in need of a clear point to place (stick in) a Compass to develop the geometry. In the "old days" a compass was one of the most important tools for a draftsman! Today with CAD we can easily tell a tool to use (snap) the center of a line, center of an arc, center or reference of a circle etc. etc.
Yes, I agree - it would look better (I was used to it) but technically I don't see any reason why it should work differently ...
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..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
- ryancousins
- Premier Member
- Posts: 367
- Joined: Thu Mar 19, 2020 3:47 am
- Location: Michigan, USA
Re: Centerline midpoint issue
I totally agree the need for such perfection in the CAD world is not there and I know no one really draws by hand any more. When I transition my students over to CAD, this won't be a concern. In the meantime if I want to be OCD enough to manually draw the centerlines for the purposes of creating consistent exemplars for my students, it's not the end of the world.
But investigating the way the center linetype works, I created a few lines using the center linetype. It doesn't look like they all start with the same specific length on one end and just end up where they end up on the other end. In each case, the lines seem to maintain symmetry about its midpoint.
But investigating the way the center linetype works, I created a few lines using the center linetype. It doesn't look like they all start with the same specific length on one end and just end up where they end up on the other end. In each case, the lines seem to maintain symmetry about its midpoint.
- Attachments
-
- centerline2.png (26.05 KiB) Viewed 6570 times
Last edited by ryancousins on Tue Mar 02, 2021 1:14 pm, edited 1 time in total.
- ryancousins
- Premier Member
- Posts: 367
- Joined: Thu Mar 19, 2020 3:47 am
- Location: Michigan, USA
Re: Centerline midpoint issue
CVH, one day I will learn to script so I can work on your level, well or just on the same planet perhaps. Today is not that day, but it is definitely a goal if I ever get to the point where I can at least get six hours of sleep a night after getting my regular work finished every day.In fact, that's a very specific piece of code that I came across.
Re: Centerline midpoint issue
@ryancousins
Is the test (screenshot) done with the Linetype Center 2x?
Is the test (screenshot) done with the Linetype Center 2x?
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..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
- ryancousins
- Premier Member
- Posts: 367
- Joined: Thu Mar 19, 2020 3:47 am
- Location: Michigan, USA
Re: Centerline midpoint issue
No it was the regular center type.
Re: Centerline midpoint issue
Yes, that seems right. But I can't figure out what the rule is behind that. Is the center a fixed dot, dash or a gap? Or maybe the end of the line is a fixed dot, dash or gap.ryancousins wrote: ↑Tue Mar 02, 2021 1:10 pmIn each case, the lines seem to maintain symmetry about its midpoint.
In this example - should not at least the center or the end of the lines look identical?
Ok, I give up ...
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..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
- ryancousins
- Premier Member
- Posts: 367
- Joined: Thu Mar 19, 2020 3:47 am
- Location: Michigan, USA
Re: Centerline midpoint issue
Did you use the center linetype for that example? My center linetype is long dash, short dash, long dash , short dash.
I notice that as I'm shrinking the width of my line, as soon as the outer dashes get down to where they would only be as long as the short dashes, they reset back to the large dashes and the whole line inverts about the middle.
I notice that as I'm shrinking the width of my line, as soon as the outer dashes get down to where they would only be as long as the short dashes, they reset back to the large dashes and the whole line inverts about the middle.
- Attachments
-
- center.gif (428.19 KiB) Viewed 6512 times
- petevick
- Premier Member
- Posts: 392
- Joined: Tue May 19, 2020 9:34 am
- Location: North Norfolk coast UK
Re: Centerline midpoint issue
@Husky looking at the linetype file qcadiso.lin you're using a DASHDOT linetype in your example Husky - *DASHDOT,Dash dot __ . __ . __ . __ . __ . __ . __ . __
The centre linetype is - *CENTER,Center ____ _ ____ _ ____ _ ____ _ ____ _ ____
The centre linetype is - *CENTER,Center ____ _ ____ _ ____ _ ____ _ ____ _ ____
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6
Re: Centerline midpoint issue
From the mentioned link: (AC)
- The program supports only A-type alignment, which guarantees that the endpoints of lines and arcs start and stop with a dash (Pen down).
- The program adjusts the dash-dot sequence on an individual line so that dashes and line endpoints coincide. The pattern fits the line so that at least half of the first dash begins and ends the line. If necessary, the first and last dashes are lengthened. If a line is too short to hold even one dash-dot sequence, a continuous line between the endpoints is drawn. For arcs, the pattern is adjusted so that dashes are drawn at the endpoints. For circles and other objects without endpoints, the dash-dot sequence is adjusted to provide a reasonable display.
In my words:
- It creates symmetry.
- It will try to avoid a spacing (Pen up) or a dot at the beginning or at the end.
I'll spare you the snippet of the math on how that is achieved under QCAD.
CVH
Re: Centerline midpoint issue
*DASHDOT: A,.5,-.25,0,-.25 or A, 12.7, -6.35, 0, -6.35 (+=dash, -=space, 0=dot)
The start and end dash are equal or larger as the smallest feature, a dot, a segment zero units long.
Same goes for:
*CENTER: A,1.25,-.25,.25,-.25 or A, 31.75, -6.35, 6.35, -6.35 (+=dash, -=space, 0=dot)ryancousins wrote: ↑Wed Mar 03, 2021 3:16 amI notice that as I'm shrinking the width of my line, as soon as the outer dashes get down to where they would only be as long as the short dashes, they reset back to the large dashes and the whole line inverts about the middle.
The start and end dash are equal or larger as the smallest feature, a short dash 1/4unit or 6.35unit long.
All regarding:
- Global linetype scale
- Viewport scale if set active
- Screen-based linetype scale or not
- General property linetype scale
- Polyline pattern or not
All in all, I wouldn't mind the why and the how.
Andrew has figured this out for us.
On top, there is nothing else as the 'A' type.
CVH