GDL
About building parametric objects with GDL.
SOLVED!

Polyline with continous dashed line

VPeter
Contributor

Hi!

 

Does any option exist in gdl to draw continous dashed polyline as with the polyline tool:

                     by segment                                                          continous

polyline.png

I can only have in GDL "by segment" method.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Try Spline2A. 

- AC-24 FIN - WIN 10 - HP Zbook -
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.

View solution in original post

5 REPLIES 5
Barry Kelly
Moderator

I never really noticed until you mentioned it, but it does seem that any of the POLY... commands treat each segment (edge) as a new line, and the dash starts from the first node of that segment - so yes segmented mode if you were to manually draw the polyline.

 

I am not aware of any commands to control this and make it a continuous line.

 

Not even POLY2_B{6} which lets you set individual pens and line types for each segment.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Solution

Try Spline2A. 

- AC-24 FIN - WIN 10 - HP Zbook -
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.

@Pertti Paasky wrote:

Try Spline2A. 


Sure, but you can't get sharp corners and straight edges can you?

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Here is some copypaste study. of  poly2_b{5} and Spline2A. SplineA2 is able to make straight edges. Arcs are more tricky.

 

mul2 A/9.605719, B/7.598953
add2 -5614.77486423, 9175.813986453
drawindex 10
pen penAttribute_1
set line_type lineTypeAttribute_1
poly2_b{5} 9, 1, 0, 3, 1, 0,
0, 0, 1, 0, 0, 1, 0,
5614.828377986, -9175.278848897, 1,
5614.77486423, -9170.462610885, 1,
5620.045969165, -9170.703422786, 1,
5621.062730523, -9168.215033146, 1,
5624.380583375, -9169.793688939, 1,
5623.608500249, -9174.176650323, 1,
5618.708125273, -9173.807220615, 1,
5618.467313372, -9175.813986453, 1,
5614.828377986, -9175.278848897, 1
line_property 0
add2 10,0
spline2a 9, 0,
5614.828377986, -9175.278848897, 0, 0, 0,
5618.467313372, -9175.813986453, 0, 0, 0,
5618.708125273, -9173.807220615, 0, 0, 0,
5623.608500249, -9174.176650323, 0, 0, 0,
5624.380583375, -9169.793688939, 0, 0, 0,
5621.062730523, -9168.215033146, 0, 0, 0,
5620.045969165, -9170.703422786, 0, 0, 0,
5614.77486423, -9170.462610885, 0, 0, 0,
5614.828377986, -9175.278848897, 0, 0, 0
del 1
- AC-24 FIN - WIN 10 - HP Zbook -
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.

Thanks. That's exactly what I came up with also. As long as the polygon have only straight segments it's easy to do it with SPLINE2A. But having arcs can result shapes which are not possible to draw with SPLINE2A...

 

Péter

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!