Using Yorik's SweetHome3D importer

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Manticore
Posts: 2
Joined: Fri Apr 29, 2016 10:21 am

Using Yorik's SweetHome3D importer

Post by Manticore »

Should be mentioned that:
1) You need the 'Export to HTML5' plugin for Sweethome3D.
2) This produces a zip file <Building name>.zip. This file will not work. it contains (among other things) a file also called <Building name>.zip. This is the one you need.
Last edited by Kunda1 on Mon Dec 23, 2019 1:24 pm, edited 1 time in total.
Reason: fixed typo in thread title
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Using Yoric's SweetHome3D importer

Post by PrzemoF »

Welcome to the forum! Thanks for your comments!

I'm not familiar with that plugin, but I guess that 1) needs to go into our wiki documentation and 2) is a bug (zip in zip)?
Manticore
Posts: 2
Joined: Fri Apr 29, 2016 10:21 am

Re: Using Yoric's SweetHome3D importer

Post by Manticore »

The plugin was only released on May 5th, so it's still in early stages.
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Using Yoric's SweetHome3D importer

Post by yorik »

Wow you're fast!

Yes, it's still very early, and I'm discussing with the sweethome3d people, so there might still be changes (on their side too), so I didn't want to advertise something that could change afterwards.

But since we are there now... :)

- you need sweethome3d >= 5.2
- you need the OBJ/XML plugin from http://www.sweethome3d.com/plugins/Expo ... J-1.1.sh3p

Otherwise the zip produced will not contain the walls as XML. With this plugin, there is only one zip produced, not a zip in a zip.

The walls get imported reasonably well, but there are some problems because in sweethome3d it is hard to make endpoint coincidents. So walls often import with bad geometry. This is often solved by editing the sketch that is the baseline of walls, and add a "point-to-point" constraint on coincident points.

The geometry of windows get turned into shapes, which can produce some crappy invalid shapes.

The furniture works well already, but they are still meshes, not sure yet about what to do with them next.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Using Yoric's SweetHome3D importer

Post by Kunda1 »

Linking issue #2584
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
briancady413
Posts: 1
Joined: Sun Dec 22, 2019 3:57 pm

Re: Using Yoric's SweetHome3D importer

Post by briancady413 »

I've had trouble importing SweetHome3D exports into FreeCAD. In SweetHome 3D, the original file has four levels, four feet apart vertically (it's a split level house).
Exporting from SweetHome3D via Tools | HTML5 and importing as SweetHome3D .zip file yields nothing.
Exporting via Tools | XML/OBJ and importing as SweetHome3D .zip file yields all levels at the same elevation, and horizontally misplaced windows and doors.

Brian
-
Later, I updated the SweetHome3D Export XML/OBJ plugin to 1.3, with results identical to the original 1.1 plugin. ( I got it from here: www.sweethome3d.com/plugins/ExportToXMLOBJ-1.3.sh3p)
laschrocket
Posts: 11
Joined: Fri Dec 27, 2019 3:54 pm

Re: Using Yorik's SweetHome3D importer

Post by laschrocket »

Just wanted to report that I tried the export/import procedure from sh3d to freecad and experienced some problems.
Most things seems to have been mirrored, and the wall, door and window elements are not placed correctly. The shades seems to not have been mirrored.

Screenshot from sh3d before export:
sweethome 3d.png
sweethome 3d.png (335.57 KiB) Viewed 3025 times
Screenshot from freecad after import:
sh3d to freecad.png
sh3d to freecad.png (254.15 KiB) Viewed 3025 times
Using the same plugin (www.sweethome3d.com/plugins/ExportToXMLOBJ-1.3.sh3p) as been linked previously in this thread.


OS: Ubuntu Impish Indri (development branch) (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.25645 (Git)
Build type: Unknown
Branch: master
Hash: 37d9757399b4c2ec30318eb88d7cd7c508246345
Python version: 3.9.6
Qt version: 5.15.2
Coin version: 4.0.0
OCC version: 7.5.1
Locale: English/United States (en_US)
Last edited by laschrocket on Mon Sep 06, 2021 8:57 am, edited 1 time in total.
laschrocket
Posts: 11
Joined: Fri Dec 27, 2019 3:54 pm

Re: Using Yorik's SweetHome3D importer

Post by laschrocket »

Made some more observations,

After messing around a bit in the document tree, I got some sub shapes of doors and windows visible in almost the right position:
sh3d import fc1.png
sh3d import fc1.png (228.39 KiB) Viewed 3015 times
But it seems like all objects are anchored to the "ground plane":
sh3d import fc2.png
sh3d import fc2.png (328.41 KiB) Viewed 3015 times
Also some of the wall lines are a bit off:
sh3d import fc3.png
sh3d import fc3.png (234.46 KiB) Viewed 3015 times
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Using Yorik's SweetHome3D importer

Post by Kunda1 »

laschrocket wrote: Mon Sep 06, 2021 8:57 am After messing around a bit in the document tree, I got some sub shapes of doors and windows visible in almost the right position:
Nice!
I'll notate issue #2584
Can we use git to track/merge your changes so far?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
ragohix769
Posts: 568
Joined: Sat Jul 18, 2020 7:04 am
Location: Rome - Italy

Re: Using Yorik's SweetHome3D importer

Post by ragohix769 »

Very interesting.
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough :-(
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same :-)
Post Reply