Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A FreeCAD macro that checks all visible objects for lines too tiny for Revit
import FreeCAD,FreeCADGui,Part
minl = 0.8 # 0.8 millimeters is the minimum line size that Revit is able to swallow. Pitiful, I know...
edges = []
if FreeCAD.ActiveDocument:
for o in FreeCAD.ActiveDocument.Objects:
if o.ViewObject.Visibility == True:
if o.isDerivedFrom("Part::Feature"):
if o.Shape:
for e in o.Shape.Edges:
if e.Length <= minl:
if edges:
result = Part.makeCompound(edges)
r = FreeCAD.ActiveDocument.Objects[-1]
r.ViewObject.LineWidth = 3

This comment has been minimized.

Copy link
Owner Author

@yorikvanhavre yorikvanhavre commented Dec 4, 2018


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.