[WIP] Sverchok, parametric nodes for architects

Hi all!
I set a basic live connection from FreeCad to blender via sverchok script lite node.

I used a python 37 build of freecad that could be easily imported in blender like module.
https://github.com/sgrogan/FreeCAD/releases/tag/PY3.7-win

I have zero knowledge about node scripting and I looked for Sverchok / animation node / sorcar script nodes.
At momend I’m working on a cad / freeform model and I just need the Cad part of the model to be visible inside the blender model and merged via boolean modifier in the end.
I’m wondering if this could be interesting for Sverchok developer, besides simple live load of cad parts (it can convert on the fly from step file ecc) we could immagine a collection of freecad nodes?

another example I did on the fly, generating a freecad document from zero:

"""
in dummy v
out verts v
out faces s
"""
import bpy,sys

FREECADPATH = '' #insert freecad py37 path
sys.path.append(FREECADPATH)

import FreeCAD as F

F.newDocument("freecad_blend")

F.setActiveDocument('freecad_blend')
F.ActiveDocument.addObject("Part::Box","B")
F.ActiveDocument.addObject("Part::Sphere","S")
F.ActiveDocument.recompute()

parts = F.ActiveDocument.Objects
boolean = F.ActiveDocument.addObject("Part::Fuse","Fusion")

F.activeDocument().Fusion.Base = F.activeDocument().B
F.activeDocument().Fusion.Tool = F.activeDocument().S
F.ActiveDocument.recompute()

mesh_data=boolean.Shape.tessellate(0.01)
F.ActiveDocument.recompute()
F.closeDocument("freecad_blend")

verts=[mesh_data[0]]
faces=[mesh_data[1]]

6 Likes