[solved] Create a custom linetype ('line with spikes')

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
edith88
Newbie Member
Posts: 4
Joined: Thu Feb 06, 2025 6:10 pm

[solved] Create a custom linetype ('line with spikes')

Post by edith88 » Thu Feb 06, 2025 7:27 pm

Hello everyone!

Win 10, Qcad Pro 3.21.3.

I would like to create a custom linetype, but I don't have any experience in that.
The linetype I need (image on the right) is similar to the line named 'Tracks' (image on the left). I tried to change the linetype definition in the .lin file followed the description I found in the 'Additional linetypes' topic, but it doesn't look like as it should. I managed to change the length of the 'spikes' (1 mm) and the distance between them (10 mm). The problem is that the 'main line' always goes through the 'spikes', but the 'spikes' should start on the line (as the right image shows it).
Is there any way to do that or is there any other way in the program to create this line?
I also created a linetype that only contains 'spikes' and I tried to adapt it onto a simple line, but it doesn't fit perfectly.
At the moment, I can only add the 'spikes' one by one and I also must set the angles of them which takes all my time.

Thank you for your help in advance!
Névtelen.jpg
Névtelen.jpg (286.66 KiB) Viewed 36812 times
Last edited by edith88 on Thu Feb 06, 2025 10:01 pm, edited 1 time in total.

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

Re: Create a custom linetype ('line with spikes')

Post by Husky » Thu Feb 06, 2025 7:54 pm

Hi,

you may check out the tool: Paste along Entity

https://qcad.org/doc/qcad/latest/refere ... ty_en.html

Keep an eye on the option bar to get what you are looking for...
Work smart, not hard: QCad Pro
QcadPro, QcadCam, Win11/64, 64GB RAM, 10-Core, SSD
If a thread is considered as "solved" pls. change the title of the 1. post to "[solved] Title..."

edith88
Newbie Member
Posts: 4
Joined: Thu Feb 06, 2025 6:10 pm

Re: Create a custom linetype ('line with spikes')

Post by edith88 » Thu Feb 06, 2025 10:00 pm

Thank you very much!!! This is exactly what I was looking for and I would have never found out on my own. :D

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

Re: [solved] Create a custom linetype ('line with spikes')

Post by CVH » Fri Feb 07, 2025 1:15 am

The crossing segment of 'Tracks' Linetype is based on a shape stored in ltypeshp.cxf
That is a polyline with 3 vertices: (0,-1); (0,1); (0,1)
Already a question why it is a polyline with 2 identical vertices.

Indeed, the center of this is located at (0,0) ... In the middle.
'Track' is then symmetrical in regards with the base line.

For a segment at the right of your line the shape should be located completely under Y=0.
For a segment at the left, completely above Y=0.

One can edit ltypeshp.cxf with QCAD and add additional shapes to use in a Linetype definition.

Linetypes are always of the type A, Auto centered.
Meaning that the first and last occurrence are dynamically arranged so that the remaining space is distributed.

Complex Linetypes are not rendered in the 'Screen-based Linetypes' mode.

Another option would be FlexPainter (FP) using the OrthogonalMark painter.
Sometimes better controllable parameters and more options than PE.

Regards,
CVH

edith88
Newbie Member
Posts: 4
Joined: Thu Feb 06, 2025 6:10 pm

Re: [solved] Create a custom linetype ('line with spikes')

Post by edith88 » Thu Feb 27, 2025 8:35 am

Thanks for the information. :)

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

Re: [solved] Create a custom linetype ('line with spikes')

Post by CVH » Thu Feb 27, 2025 8:39 am

CVH wrote:
Fri Feb 07, 2025 1:15 am
Already a question why it is a polyline with 2 identical vertices.
Follow up: Redundant data in ltypeshp.cxf
And fixed meanwhile. :wink:

Regards,
CVH

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

Re: [solved] Create a custom linetype ('line with spikes')

Post by CVH » Fri Feb 28, 2025 10:06 am

CVH wrote:
Fri Feb 07, 2025 1:15 am
One can edit ltypeshp.cxf with QCAD and add additional shapes to use in a Linetype definition.
Got a report that this is misleading.
Indeed, this standard CXF is overwitten on each update of the QCAD application.

Instead, create your own custom CXF file based on the standard version and refer to that in a custom Linetype definition.

Regards,
CVH

Post Reply

Return to “QCAD 'How Do I' Questions”