Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 5
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 1131 times and has 4 replies Next Thread
Xlance
Member
Member's Avatar


Joined: Mar 23, 2020
Post Count: 53
Status: Offline
Reply to this Post  Reply with Quote 
Export CAD to SH3D

Hello smile
A two step method to convert lines from Autocad to walls & polylines in Sweethome3d

1. Run"cad2walls.lsp" in Autocad > will generate "cad2walls.Input.txt"

Put "cad2walls.Input.txt" in same folder as "cad2walls.jar"

2. Run "cad2walls.jar" > will generate "cad2walls.Output.sh3d"


cad2walls.lsp
+ Added a a new function to create a Layer tag at the end of each line.
+ Curves are supported ( Arcs, Circles, Ellipses, and Splines ).
+ Simplified the process of Exporting points.
+ All lines are now saved as not joined and will be recognized as such in SH3D, this will prevent the effect of cross-linking.


cad2walls.jar
+ Added a function to modify Scale before import into SH3D.
+ Added multi level error handling.
+ Added a new function to import coordinates as POLYLINES.
+ Added a new function to import BOTH, Polylines and Walls based on Layer tags.


Notes:
1. Supported Layer tags are "Walls" and "Poly" only.

2. Removing a Layer tag completely, skips reading of item either a wall or a polyline !

3. Added an Experimental option in cad2walls.lsp to mark lines which should be recognized as joined in SH3D.
Lines are marked with a letter "j" at the beginning of each line.
Then cad2walls.jar identifies the 'j' tag and add additional code to join them.

However because the Autolisp script and SH3D read points in a different order, joined lines in output, sometimes do not match with marked lines by the script !

For best results join Outer border lines only :-)


https://sourceforge.net/p/sweethome3d/plug-ins/56/


Cheers
----------------------------------------

Windows 64bit | Intel i7 | 8GB Ram | SH3D 7.5 + Plugins
[Apr 26, 2025, 9:08:35 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
MarioDLCO
Newbie



México
Joined: Jan 14, 2025
Post Count: 7
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export CAD to SH3D

Hi, Xlance.

Q : For best results join Outer border lines only :-)...
means to create polyline?

Could you send me the code?

Don´t run in my SweetHome 7.5

Thank's.
----------------------------------------
Every Day is for Learn...
[Jun 23, 2025, 3:24:55 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Xlance
Member
Member's Avatar


Joined: Mar 23, 2020
Post Count: 53
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export CAD to SH3D

For best results join Outer border lines only, means that it's best to export all walls without using 'join' option in the Autocad .lsp (option is still there but I use it for outer walls to get a closed shape)

This plugin is aimed mainly for Architects / Engineers who wish to integrate Autocad with Sweethome3D, as many expressed their interest for such a bridge :-)
----------------------------------------

Windows 64bit | Intel i7 | 8GB Ram | SH3D 7.5 + Plugins
[Sep 5, 2025, 3:42:40 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
badbadhome
Newbie




Joined: Sep 9, 2025
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export CAD to SH3D

I can't convert the cad2walls.Input.txt file to SH3D.
I updated Sweet Home 3D to the latest version. Same with Java.
I run the script with this: "C:\Program Files (x86)\Java\latest\jre-1.8\bin\java.exe" -jar cad2walls.jar
No luck.

I tried a txt file from my own CAD and with example downloaded from sourceforge, but it just doesn't work.

Error: Can't open home cad2walls.Output.sh3d
[Sep 9, 2025, 5:34:23 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Xlance
Member
Member's Avatar


Joined: Mar 23, 2020
Post Count: 53
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export CAD to SH3D

Hello

-> Put both ( cad2walls.jar) and (cad2walls.Input.txt ) in the same folder
-> Click (cad2walls.jar) do not > java.exe" -jar cad2walls.jar
-> Choose an option
-> (cad2walls.Output.sh3d) wil be Auto generated

Steps have been tested many times and should work :-)

Cheers
----------------------------------------

Windows 64bit | Intel i7 | 8GB Ram | SH3D 7.5 + Plugins
[Sep 12, 2025, 2:38:25 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved