Custom LineType

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
JimF
Newbie Member
Posts: 4
Joined: Wed Jan 21, 2015 7:18 pm

Custom LineType

Post by JimF » Mon Nov 09, 2020 7:05 pm

This is just a small aesthetic issue, but I would like to know what I am doing wrong.

I am running the latest QCAD Pro, 3.25.2.0 64-bit on Windows 10.

I created a set of new custom line types to help me design some rulers so I can make my wife some custom quilting rulers. The file is pretty simple and here it is in it's entirety. (also attached below)

Code: Select all

;;
;;  Ruler linetypes for imperial system
;;
*RULER_EIGHTH,Ruler Eighth Inch __  __
A,.0625,-.9375
*RULER_QUARTER,Ruler Quarter Inch __  __
A,.125,-.875
*RULER_HALF,Ruler Half Inch __  __
A,.25,-.75
Here's what I see:
Custom Linetype issue.jpg
Custom Linetype issue.jpg (48.64 KiB) Viewed 6012 times

The linetype works just fine, it's just that I was expecting to see the "Mixed Case Description" and not the "UPPERCAE_NAME" in the menu. What do I need to do to fix this?
Attachments
qcadRuler.lin
(200 Bytes) Downloaded 323 times

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

Re: Custom LineType

Post by Husky » Mon Nov 09, 2020 7:58 pm

JimF wrote:
Mon Nov 09, 2020 7:05 pm
The linetype works just fine, it's just that I was expecting to see the "Mixed Case Description" and not the "UPPERCAE_NAME" in the menu. What do I need to do to fix this?
You used a uppercase name in the .lin file. Change it to mixed Case and it will look like this ...

Husky-2020.11.09-01.png
Husky-2020.11.09-01.png (20.05 KiB) Viewed 6005 times

... maybe it needs after that a QCAD restart.
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
Husky
Moderator/Drawing Help/Testing
Posts: 4939
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Custom LineType

Post by Husky » Mon Nov 09, 2020 9:54 pm

JimF wrote:
Mon Nov 09, 2020 7:05 pm
I created a set of new custom line types to help me design some rulers so I can make my wife some custom quilting rulers.
You got me curios ....

How is that supposed to work? What can you do with your linetype?

And the name and value doesn't match in my understanding.

Why you used for 1/8 inch .0625 - that is 5/8,
Why you used for 1/4 inch .125 - that is 1/8,
Why you used for 1/2 inch .25 - that is 1/4,

Maybe I learn here something new ...
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..."

JimF
Newbie Member
Posts: 4
Joined: Wed Jan 21, 2015 7:18 pm

Re: Custom LineType

Post by JimF » Wed Nov 11, 2020 2:04 am

Hi Husky,

First, what you pointed out as .0625 being 5/8, isn't quite correct. There's a zero in there, it's 1/16.

Basically, I wanted my tick lines to be "half-scale" of the measurement. Here's an example of how I want to use them.
Ruler Sample.jpg
Ruler Sample.jpg (28.08 KiB) Viewed 5954 times

In this example the overall box is 2"x2". Each of these lines and ticks are full lines using those linetype definitions. This way, I don't have to create a whole bunch of tick lines by hand. These rulers, by the way, are multiple inches by multiple inches--not just a straight simple ruler.

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

Re: Custom LineType

Post by CVH » Wed Nov 11, 2020 6:13 am

Hi,

You are right about the difference:

Standard types get listed with their description.
*DASHDOT2,Dash dot (.5x) ... is listed as 'Dash dot (.5x)'
*ACAD_ISO04W100,ISO long-dash dot ... is listed as 'ISO long-dash dot'

Yours or any custom get listed with their name.
*RULER_EIGHTH,Ruler Eighth Inch ... is listed as 'RULER_EIGHTH'

The reason ... hard coded in QCAD see: GitHub, starting at line 868 in RLinetypePattern.cpp
But not just hard coded, they are also translated. :wink:


Husky wrote:
Mon Nov 09, 2020 9:54 pm
You got me curios ....
Me too, and I would like to see that in a file.
I tried it several ways but I never get your 'Ruler Sample.jpg'. :oops:
Every tick mark would be part of a line and I see those lines interfere with snapping and so.
JimF wrote:
Wed Nov 11, 2020 2:04 am
This way, I don't have to create a whole bunch of tick lines by hand.
Tick lines 'ruler-style' metric or fractional are possible with FlexPainter.

Downer ... FP rejects to cast a painter 3 or fewer times.
Just two inches won't go as the painter itself is 1 inch long.

Regards,
CVH

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

Re: Custom LineType

Post by Husky » Wed Nov 11, 2020 7:39 am

JimF wrote:
Wed Nov 11, 2020 2:04 am
First, what you pointed out as .0625 being 5/8, isn't quite correct. There's a zero in there, it's 1/16.
Yep you are right - mea culpa. :wink:
CVH wrote:
Wed Nov 11, 2020 6:13 am
Me too, and I would like to see that in a file.
I tried it several ways but I never get your 'Ruler Sample.jpg'. :oops:
Me too. The ruler looks "useful" but I have no idea how the Custom LineType can help to design it ...
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..."

JimF
Newbie Member
Posts: 4
Joined: Wed Jan 21, 2015 7:18 pm

Re: Custom LineType

Post by JimF » Wed Nov 11, 2020 2:25 pm

Husky wrote:
Wed Nov 11, 2020 7:39 am
JimF wrote:
Wed Nov 11, 2020 2:04 am
First, what you pointed out as .0625 being 5/8, isn't quite correct. There's a zero in there, it's 1/16.
Yep you are right - mea culpa. :wink:
CVH wrote:
Wed Nov 11, 2020 6:13 am
Me too, and I would like to see that in a file.
I tried it several ways but I never get your 'Ruler Sample.jpg'. :oops:
Me too. The ruler looks "useful" but I have no idea how the Custom LineType can help to design it ...
I also just found out, after some experimentation, that this technique only works if the ruler is in full inch increments. Any other size, and the tick marks "float" off the edge of the ruler.

Attached is the DXF version of the JPEG I posted before for those wishing to "play along at home".
Test Ruler.dxf
(108.16 KiB) Downloaded 312 times

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

Re: Custom LineType

Post by CVH » Wed Nov 11, 2020 5:41 pm

Hi,
Looks good with standard view.
But in Model Space my preferences are set to Screen-Based Linetypes.

There is something off with your Grid and Meta Grid, just auto for both is fine. :oops:

I would define a block with the tick marks an go for Rows & Columns. :wink:

Regards,
CVH

JimF
Newbie Member
Posts: 4
Joined: Wed Jan 21, 2015 7:18 pm

Re: Custom LineType

Post by JimF » Wed Nov 11, 2020 5:51 pm

I also found it that it only renders correctly when using Hairlines (lineweight 0.00mm lines). I always use that width as I will be laser cutting them and you need the thinnest possible line (varies with laser software). At one maker space, if you didn't use hairlines, it would just ignore it completely.

But, when using hairlines it doesn't print on my inkjet for proofing that way :(

I will look at blocks, but this is actually working for me for the most part--I have a bit of cleanup to do in the laser software after I import it, but it's pretty minor.

I actually just started this thread to find out why my description wasn't showing, which was answered.

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

Re: Custom LineType

Post by Husky » Wed Nov 11, 2020 11:04 pm

Thank you JimF for sharing this interesting idea but in my cases just to much effort for a simple ruler. If I stick to QCAD "on board tools" (Paste along Entity) I'm faster and immediately in more control of what I'm doing.

BTW: Creating a block would not be a solution for me either.
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: 3474
Joined: Wed Sep 27, 2017 4:17 pm

Re: Custom LineType

Post by CVH » Thu Nov 12, 2020 8:23 am

JimF wrote:
Wed Nov 11, 2020 2:25 pm
... that this technique only works if the ruler is in full inch increments.
That's because the only option is the A-type alignment.
FP has 4 types ... 8)
JimF wrote:
Wed Nov 11, 2020 5:51 pm
I also found it that it only renders correctly when using Hairlines (lineweight 0.00mm lines).
Well, your lucky ... My CNC controller takes this literal as a zero, what means nothing to show .. nothing to do.
On top, it doesn't render linetypes, a line is a line, starting here and ending there.

I investigated the custom linetype format for including all your tick marks.
Similar as 'Tracks'.
Now you are out off luck ... only 12 dashes are allowed and you need 15. :(
On top, one would have the kind that ticks left, right and as third those that cross.

These ticks all need to be constructed as shapes in a shx file (under QCAD in a cxf file)
9 in total and your custom line definition would exceed 80 characters. :(
(Not that it matters: 'Batting' & 'Zig zag' violate this rule too)

Included the block thing ...
Downer: In full inch increments, crossers are 2 segments and so on :(
Adapted the Grid and Meta Grid but it still looks odd ...
In some zoom states (<1 inch in view) the grid spacing is 0.125 in others it is 0.15625 :shock:
Next step is 1.5625 ... ??? Troubled. :?:
Test Ruler rev.dxf
(114.27 KiB) Downloaded 307 times

Regards,
CVH

Post Reply

Return to “QCAD Troubleshooting and Problems”