This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns example.geom | |
(:require [clojure.string :as str])) | |
;; Utils | |
(defn normalize | |
"find the unit vector of the given vector `v`." | |
[v] | |
(when v | |
(let [m (Math/sqrt ^double (reduce + (mapv * v v)))] | |
(mapv / v (repeat m))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This is an experimental FreeCAD macro that will export current scene | |
# as X3D file. Only the visible objects that can be converted to mesh | |
# will be exported with their color. | |
# | |
import FreeCAD | |
import FreeCADGui | |
import xml.etree.ElementTree as et | |
from PySide.QtGui import QFileDialog |