Hi!
I’m using the “Wall Sweep on Wall” of Data-Shapes package. I’m creating vertical wall sweep on 4 walls. But, there was a problem with final wall (highlight in image).
Please help me solve this.
Hi,
after some tests, the vertical distances for the node “WallSweepOnWall” seem to be set from the origin of the face and not from that of the curve of the wall (StartPoint).
And the origin of the face and the origin of the curve are not necessarily the same
an example
import clr
import sys
import System
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
import Autodesk.DesignScript.Geometry as DS
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
import Autodesk.Revit.DB as DB
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
pf_path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ProgramFilesX86)
sys.path.append(pf_path + '\\IronPython 2.7\\Lib')
import math
wall = UnwrapElement(IN[0])
start =IN[1]
step = IN[2]
out = []
ref = DB.HostObjectUtils.GetSideFaces(wall, ShellLayerType.Exterior)[0]
face = wall.GetGeometryObjectFromReference(ref)
bbxUV = face.GetBoundingBox()
uMin = bbxUV.Min.U
uMax = bbxUV.Max.U
# convert decimal feet to Millimeters
uMin = int(math.floor(uMin * 304.8))
minfactor = 1 if uMin >= 0 else -1
uMax = int(math.floor(uMax * 304.8))
maxfactor = 1 if uMax >= 0 else -1
#
for i in range(start * minfactor, uMin, step * minfactor):
out.append(i * -1)
for i in range(start * minfactor, uMax, step * maxfactor):
out.append(i * -1)
# remove duplicate
out = sorted(set(out))
OUT = out