Questions about running Ladybug Tools in the FreeCAD environment

Not sure where to post this question so apologies if this is not the correct place and feel free to move.

I would like to investigate the possibility of running the various ladybug tools in the FreeCAD environment.

I have had a Quick Look at https://discourse.ladybug.tools/pub/ladybug-tools-core-sdk-documentation

And note that there are Rhino/Grasshopper Libraries. and these implement the required functions to Rhino and Grasshopper Scenes.

FreeCAD does not have scenes as such but I think the equivalent could be implemented using a FreeCAD feature python object that in effect implements the equivalent of a scene in Rhino/Grasshopper.

Somewhere I think I saw a reference to some .Net facility for downloading file in a secure way. Is this required? is there Open Source equivalent for MacOS, Linux Windows.

What would be a good way to start? How could I tell/point lady-bug to use say GitHub - KeithSloan/ladybug_freeCAD: Ladybug FreeCAD versions rather than Rhino or Grasshopper

Hi @KeithSloan ,

I am sorry for such a late response. I had been busy getting the latest stable release of Ladybug Tools out. I moved your question to it’s own topic since the one you originally posted on is just an info topic explaining how topics should be categorized.

I have personally not tested running Ladybug Tools in the FreeCAD environment yet but I don’t see any reason why you would not be able to run the LBT core libraries over there. We wrote the libraries that you see listed as part of the Ladybug Tools SDK to run in a wide range of Python versions (from IronPython 2.7 all of the way through cPython 3.12). We have even run them on Pyodide with a lot of success recently. The only packages that have not been written to run in all of these environments are the " Rhino/Grasshopper Libraries", which are primarily made to run in the IronPython environment of Rhino. There are also a couple of packages with C dependencies (namely, ladybug-vtk, honeybee-radiance-postprocess and honeybee-openstudio), which may create challenges in some environments but they have CLIs that make it easy to interact with them from environments that cannot load C dependencies.

So the general plan of just rewriting a lot of the ladybug-rhino methods to communicate between the ladybug-geometry objects used by Ladybug Tools and the geometry used in the FreeCAD environment is a good one.

This is exactly what Dion Moultdid when he put together the ladybug-blender plugin:

So I would recommend checking that repo out to see generally how we recommend setting up a new CAD interface for Ladybug Tools.

Let us know if you have any other questions. And definitely let us know if you end up releasing anything for people to try. We’ll be happy to feature it in the forum here to drive some traffic of testers towards your work.

Just a quick note about this:

That is the method that we use in the .NET/IronPython environment of Rhino. But, if you are running the LBT core libraries in cPython, this is the right method to use to download the weather data: