Issue trimming rebar mesh with LISP routine for non-rectangular slabs

Issue trimming rebar mesh with LISP routine for non-rectangular slabs

rsalastopografia
Advocate Advocate
735 Views
22 Replies
Message 1 of 23

Issue trimming rebar mesh with LISP routine for non-rectangular slabs

rsalastopografia
Advocate
Advocate

Hi everyone,

I'm using a LISP routine that generates a rebar mesh inside a concrete slab, based on a closed polyline or a circle. The script asks for a cover distance and spacing, creates an inward offset, and then draws horizontal and vertical bars that should be trimmed to fit within the offset boundary.

The routine works perfectly when the slab is a rectangle (see image 1), but when using irregular, circular, or triangular shapes, the bars are not trimmed properly (see image 2). Full-length bars are drawn, ignoring the actual shape of the slab.

rsalastopografia_0-1751672463426.png

Figura 1

rsalastopografia_1-1751672488346.png

Figura 2

The trimming is done using IntersectWith, but I believe the code assumes there are always exactly two intersection points per bar, which doesn't hold true for more complex shapes.

Any guidance on how to adapt the routine so that it works with any closed polyline, regardless of shape, would be greatly appreciated.

Thanks in advance!

(Images attached)

Attached lisp and dwg file

0 Likes
Accepted solutions (2)
736 Views
22 Replies
Replies (22)
Message 21 of 23

rsalastopografia
Advocate
Advocate

It would be great if you could publish the improvements implemented in the Lisp routine code.

0 Likes
Message 22 of 23

Moshe-A
Mentor
Mentor
Accepted solution

@rsalastopografia ,

 

enjoy

Moshe

Message 23 of 23

rsalastopografia
Advocate
Advocate

Thank you very much for your contribution and for sharing, greetings.

0 Likes