Wall chamfer

Hi Team,

I’m trying to automate some chamfers to my walls in Revit. Manually, Even with a family, it takes too much time.

I started to use the Genius Loci package, but I’m still stuck. I think I’m doing something wrong,

I want to apply a chamfer to the 4 vertical edges of the wall.

Any advice on what I am doing wrong?

Cheers


better luck with this one from Data-Shapes. i think the first pin was called “Walls” not “input”, in case it confuses u.

Hi @BimAmbit,

Thanks for the comment, still not getting there.

i didnt thought something simple was going to be a battle.

Cheers

Hi @break113 try open the node and rename input to walls e.g, and seems you dont input a cornice or reveal element type…

Hi @sovitek,

im no getting there i figure out the issue, and is the family a line based family only can be sorted in horizontal and not vertical

yeah my example was only if you want use datashapes wallsweep tool as @BimAmbit suggest…anyway seems you use a linebased family and could work as well., with that node you already use, if you want you could share that linebased family and we could take a look

2 Likes

Yes, please. Here are the files. Thanks for looking.
15X15 SUPER CHAMFER PROFILE.rfa (416 KB)
CHAMFER BETA.dyn (12.4 KB)

thanks…yeah thats a 2d profile family, try open the family and set it to wallsweep as i assume you want and then try datashapes wallsweep node…something here maybe..


Hi, @sovitek

For some reason its not working for me hehe..

Thanks fors the screenshot

If you are in 23-24 be sure you have dynamoironpython package 2.7 version 2.5 installed as well

i am using revit 2025, but i installed python 2.7

arhh then use 2.7 version 3.2.1

Its updated and still null… LOL

1 Like

allright and you have removed the 2.5 python package ? and when i look at your image you feed in a reveal but in the node you have reveal set to false try set it to true…cant test in the moment, but if i remember it could run with ironpython3 and cpython3 as well so try that and see if it could be better and be sure you have the latest datashapes package installed

Hi, here’s a possibility.

It’s definitely still improvable. I’ve taken into account common connections (no chamfers).
Here’s the script and family.


Code Python + script + family

Python 1: Determine the longest vertical edges

import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
lines=IN[0]
#Found the lines with vector Z
a=[l for l in lines if l.Direction.Normalized().Z!=0]
#Found the lines biggest
b=[l for l in a if l.Length == max([l.Length for l in a])]
OUT = b

Python 2 :Keep the edges where the chamfers must be applied

import sys
import clr
import System
from System.Collections.Generic import List
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager 
clr.AddReference("RevitAPI")
import Autodesk 
from Autodesk.Revit.DB import XYZ,Outline,FilteredElementCollector,BoundingBoxIntersectsFilter,Wall

doc = DocumentManager.Instance.CurrentDBDocument
pts=IN[0]
rep=[]
for p in pts:
    #Create outline to intersect element
    p1=p.ToRevitType()
    pb=XYZ(p1.X-0.01/0.3048,p1.Y-0.01/0.3048,p1.Z)
    pe=XYZ(p1.X+0.01/0.3048,p1.Y+0.01/0.3048,p1.Z)
    ol=Outline(pb,pe)
    filter=BoundingBoxIntersectsFilter(ol)
    le=FilteredElementCollector(doc).OfClass(Wall).WherePasses(filter).ToElements()
    rep.append(len(le)<=1)

OUT = rep

Python 3 : Cut the walls with the chamfers and mask them

import sys
import clr
import System
from System.Collections.Generic import List
clr.AddReference("RevitAPI")
import Autodesk 
from Autodesk.Revit.DB import SolidSolidCutUtils,ElementId
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Transactions import TransactionManager

sc=UnwrapElement(IN[0])
w=UnwrapElement(IN[1])
l=List[ElementId]()

doc=sc[0].Document
actv=doc.ActiveView
TransactionManager.Instance.EnsureInTransaction(doc)
for s in sc:
    SolidSolidCutUtils.AddCutBetweenSolids(doc,w,s)
    doc.Regenerate()
    l.Add(s.Id)
actv.HideElements(l)

TransactionManager.Instance.TransactionTaskDone()
OUT = 0

Script:
essai avec chanfrein sur arete.dyn (64.2 KB)
Family:
chanfrein.rfa (404 KB)

edit: Please take into account Mr. Sovitek’s remarks regarding python versions.

Sincerely,
christian.stan

1 Like