AutoLISP code to draw a heating cable layout in a selected object

AutoLISP code to draw a heating cable layout in a selected object

vipul_mandloi2021
Participant Participant
1,063 Views
23 Replies
Message 1 of 24

AutoLISP code to draw a heating cable layout in a selected object

vipul_mandloi2021
Participant
Participant

I have tried to make an AutoLISP code that will create a Heating Cable layout inside a selected closed polygon.
I am not able to debug the code properly and not able to generate results.
Can anyone help me with this. 
I have attached the code.

0 Likes
1,064 Views
23 Replies
Replies (23)
Message 21 of 24

vipul_mandloi2021
Participant
Participant

Hello Sea-Haven,

I appreciate your response and understand that the forum is a place for community-driven support, with answers provided voluntarily. I am currently making a sincere effort to find a solution, but as AutoCAD is a new domain for me, the learning curve has been quite steep.

Your idea is certainly interesting, and I appreciate the suggestion. However, in this particular case, I am struggling with the part where the cable should reach the least critical area (typically the farthest point) while ensuring enough space remains for other cables before the layout process begins. If you have any insights on how this could be achieved, I would greatly appreciate your guidance.

Thank you for your time and support.

Vipul

0 Likes
Message 22 of 24

vipul_mandloi2021
Participant
Participant

Hi -didier-,

This is a very great idea. But is it possible to figure out the part where the cable is to reach the farthest area first and then get laid out leaving space for other cables to laid out. I have been struggling about this for a lot of time. But I do appreciate your help, I am starting to figure something out the way you have shown to me. If you have any more suggestions, I will be glad to know them.

PS - The site you gave is VERY HELPFUL. Thanks a lot.

Vipul

0 Likes
Message 23 of 24

Sea-Haven
Mentor
Mentor

I did give it a bit of thought one of the task I have done is fitting shapes to an outline, the way I got around it was by over creating the pattern, so it exists out side of the boundary shape you then trim all outside objects. You can set an internal offset when trimming to the edges. This was done for concrete waffle panels so it even trimmed on curves. 

Dummied up image showing idea.

SeaHaven_0-1741330388172.png

Yes still a fair bit of manual work but may be able to add some functions.

 

Thinking about it now it may need an answer like that,  get as much as possible then have different clean up routines, look at bottom trimmed shape could do a lisp to add curved ends with offset from line. Just drag over line work to select this finds end points.

 

I did some concrete slab stuff and its done that way use option1 then option3 then option5 etc.

 

The green arcs would be added line work adjusted based on the red line. Ie offset from boundary edge.

SeaHaven_1-1741330913661.png

 

 

 

 

 

 

0 Likes
Message 24 of 24

Moshe-A
Mentor
Mentor

@vipul_mandloi2021 ,

 

As you can understand i do not familiar with heating cables, for me it's another design \ drawing so explain that:

"1. The HATCH pattern fills the block with a single cable. I want to make it to be able to generate 'N' number of cables in the given block"

 

"2. The HATCH pattern will not be able to figure out the part where each cable starts from a single origin point and first reaches the farthest area. After that it starts getting laid down as the HATCH pattern fills out a block"

 

the hatch command is design to fills with pre designed pattern (also know as Raster - stored in data file of type .pat) a closed region. you can not expect it to make design decisions like a human?!

 

Given the tools provided by AutoCAD, i think the hatch is good solution. of course as already said, a manual work must be done to connect

the cable. remember that the dynamic block i offers earlier "heatcoil" is built so after you explode it, you can delete half of a coil for easy connection.

 

Moshe

 

 

 

 

 

Moshe

 

0 Likes