Page 1 of 1

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

Posted: Thu Feb 06, 2025 7:27 pm
by edith88
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 37531 times

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

Posted: Thu Feb 06, 2025 7:54 pm
by Husky
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...

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

Posted: Thu Feb 06, 2025 10:00 pm
by edith88
Thank you very much!!! This is exactly what I was looking for and I would have never found out on my own. :D

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

Posted: Fri Feb 07, 2025 1:15 am
by CVH
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

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

Posted: Thu Feb 27, 2025 8:35 am
by edith88
Thanks for the information. :)

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

Posted: Thu Feb 27, 2025 8:39 am
by CVH
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

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

Posted: Fri Feb 28, 2025 10:06 am
by CVH
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