Monday, January 20, 2025

Sweethome3D web viewer

 Sweethome3D web viewable.


I've made a Sweethome3d model that I want to share online. I exported from Sweehome3d as an OBJ and then imported into FreeCAD. I removed the window panes and room ceiling with this:

FreeCAD.Console.PrintMessage("Making Sweethome3D OBJ more viewable\n")

for obj in App.ActiveDocument.findObjects():
  if obj.Name.startswith("room_"):
    if int(obj.Name[-1]) % 2 != 0:
      print(f"name: {obj.Name}")
      App.ActiveDocument.removeObject(obj.Name)
  if obj.Name.startswith("sweethome3d_window_pane"):
    print(f"name: {obj.Name}")
    App.ActiveDocument.removeObject(obj.Name)

App.ActiveDocument.recompute()

FreeCAD.Console.PrintMessage("Done!\n")

This can then be loaded into https://3dviewer.net/, for example.

Saturday, January 18, 2025

 Garden hose adapter


I'm playing with plumbing parts. It turns out I need a GHT (garden hose 3/4INCH) thread. The excellent BOSL2 in OpenSCAD doesn't have a pre-defined GHT threaded_rod, so I've hacked together my own:


edit: /home/richard/.local/share/OpenSCAD/libraries/BOSL2-master/threading.scad


replace the TPI in npt_threaded_rod with the value from here:

https://pickhose.com/garden-hose-thread-vs-npt/


re-render.