Dynamic block for crosswalks

Dynamic block for crosswalks

koen.ansoms
Participant Participant
935 Views
10 Replies
Message 1 of 11

Dynamic block for crosswalks

koen.ansoms
Participant
Participant

I have a challenge creating a dynamic block for road marking for crosswalk. When the road is perpendicular to the crosswalk its quite easy but when the road is not perpendicular to the crosswalk it is getting more complex. We must follow guidelines for the dimensions of the crosswalk. The length should be 3m and the width should be 50cm with gaps of 50cm.

koenansoms_0-1739391931341.png

I am using some stretch to get this look. And I must use an extra stretch because of the width of the marking it cannot become thinner then 50cm. Now I am stuck because an array of 1m can add stripes but in this situation the width of 1m increases a bit depending on the angle that is needed. This variable width is the problem to get in the dynamic block. Is there a easy way to solve this problem?

koenansoms_1-1739391973797.png

koenansoms_2-1739392010234.png

 

 

0 Likes
Accepted solutions (1)
936 Views
10 Replies
Replies (10)
Message 2 of 11

Libbya
Mentor
Mentor

I would make a custom hatch pattern using the hatchmaker lisp and use an associative boundary that is stretched/rotated by dynamic parameters/actions.

0 Likes
Message 3 of 11

timothy_crouse
Collaborator
Collaborator

An alternative approach would be to create the first shape to match the angle of the road

 

draw a path at the desired angle across the road

 

array PATH the original object across the road.

 

Recoomend the original shape be a dynamic block to make creating it quicker

 

Thoughts / Concerns

 

Best Regards

Tim C

 

0 Likes
Message 4 of 11

Libbya
Mentor
Mentor
Accepted solution

This is what I was thinking (except I just did it with multiple stock hatch objects instead of a custom hatch).  Of course, you could increase the hatch density to whatever degree you need for your plot settings.  See attached.

Message 5 of 11

timothy_crouse
Collaborator
Collaborator

That's Nice, Good One

0 Likes
Message 6 of 11

koen.ansoms
Participant
Participant

My problem would be solved if could get this formula as column offset distance in the array:

 

koenansoms_0-1739436095651.png

 

Having all this in a dynamic block avoids end-users to make mistakes, this is not the case when you use a hatch.

 

0 Likes
Message 7 of 11

Libbya
Mentor
Mentor

Did you look at the block I posted?  I took the time to make it, the least you can do is look at it and see how it functions.  It does exactly what you want in an  incredibly simple way.  You'd have some time into getting the hatch set up correctly to match your plot setting, but you'll spend a whole lot less time with that than the path you are currently stuck on, which leads nowhere.

 

You can't dynamically alter the column offset of a dynamic array.  It isn't going to happen.

 

You can dynamically alter the column offset of an array made using the ARRAY command, through the use of formulas, but you cannot dynamically alter the source objects so you would not be able to have the angled ends.  Even if you could, it would still be more work than the solution I already posted. 

0 Likes
Message 8 of 11

koen.ansoms
Participant
Participant

Yes I had a look (the files opens really slow), at first I thought is was only for perpendical roads but indeed this a pretty good solution. And I learned something, using the point position to add the stretch action. We have already a hatch pattern that I can use. At this moment this is the best option. the only disadvantage is that you don't have a solid hatch on a separate layer that you can turn off. This block does indeed do what I want. Thanx!!

 

koenansoms_0-1739452716525.png

 

0 Likes
Message 9 of 11

Libbya
Mentor
Mentor

I do not know of a way to make a solid hatch that is alternating like that.  As I mentioned in my prior post, you can make custom hatches using the hatchmaker lisp, but the objects are limited to line and point entities within a 1 x 1 space and snapped to a 0.01 grid.  Using that lisp you could easily make a hatch dense enough to mimic a solid hatch for any plot settings.  You can put put the hatch on whatever layer you like.  If you want an outline around each stripe and on a different layer, I don't know of a way to do that using this method.  Attached is a version that uses a custom hatch pattern. 

 

I can think of one other way to do what you are asking but this way is much, much, simpler.  The other way would be to define a visibility state for each additional stripe and use a double lookup to switch the state based on the length (create a faux array), but that would be a lot of work defining the states and the parameters/actions for controlling each stripe independently.  It would also only work for the number of stripes that you predefined.  If you want to go that route, you'd be on your own.  I don't even want to take the time to create an example.

0 Likes
Message 10 of 11

timothy_crouse
Collaborator
Collaborator

I agree with Libbya about keeping it simple.  If the block is working slowly on your system and you add formula parameters to the block it will only make it slower.  Can you clarify the comment about "only for perpendicular roads"?   Do some of the patterns need to extend longer than others?  Perhaps in some situations, an array by path "divide" setup would work for you as it would do the math on the fly to determine the spacing.  I would think Libbya's solution would work 99% of the time unless you work many non-perpendicular roads.

 

Anyway's that was a unique problem, glad you got a solution.

Best Regards

-Tim C.

0 Likes
Message 11 of 11

koen.ansoms
Participant
Participant

I didn't realize at first the look that I could stretch the block in all directions (my mistake). So it works in both situations well, perpendical or not. Even more, when there is connecting curve in the road you can edit the polyline to make the connection, after exploding the block (the contour line is on defpoint - non plot layer). I will test this new block in a real project tomorrow. The new block is not with solids but with lines. The block is not slow, only Libbya's drawings opened very slow, took minutes, that is wierd for a small drawing, maybe something with metric vs imperial, I don't know, its not an issue, I made a new block anyway.

 

Excample crosswalk connecting with a curve:

koenansoms_2-1739466407687.png

 

 

koenansoms_1-1739466380954.png

 

 

0 Likes