I’m playing with one of the nodes from geniusloci package.
It aligns patterns to a corner.
I want to offset my tile by half the width and half the length so the tile centre is aligned rather than the join.
In the API the FillPattern Properties LengthPerArea and LinesPerLength both give me the same number (despite the tiles I’m using being 600 x 1200. And StrokesPerArea give me 0.
How do I offset the tiles by half the length and half the width?
ceiling = IN[0]
elements = UnwrapElement(ceiling) if isinstance(ceiling, list) else [UnwrapElement(ceiling)]
for item in elements:
ext = HostObjectUtils.GetBottomFaces(item)
end = 1
# for (the array containing) the external face reference, get its geometry
for e in ext:
extFace = item.GetGeometryObjectFromReference(e)
# get the external face surface edges as lines, get the first line (the bottom)
for index, cv in enumerate(extFace.GetEdgesAsCurveLoops()[0]):
corner = cv.GetEndPoint(end)
Also, the number I get from the methods above give me an offset of 232 in Revit rather than 300 or 600. Even taking into imperial vs metric I can’t seem to see what this number is.
With a 1200 x 600 ceiling I get
1 >> line 42
2 >> line 43
3 >> line 44
With a 600 x 600 ceiling grid I get
1.016 instead of 0.762
I have no idea what these numbers mean.