DirectShape ceiling pattern alignment

Hi everyone,
I’m automating ceiling creation in Revit with the DirecShape command.
After the “fake” ceiling elements are placed, I’d like to align their material pattern with project geometry.

I dug into solid/face/material/grid…etc deconstruction, but didn’t find the proper functionality.
This is what I know so far:

import clr
import Autodesk
from Autodesk.Revit.DB import *
import System
from System import Guid
import Revit
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

#get directshape ceiling elements
elems = UnwrapElement(IN[0])

#get single element for testing
ceiling = elems[0]

#geometric objects from ceiling element
geoobj = ceiling.GetGeometryObjectFromReference(Reference(ceiling))

faces = [obj.Faces for obj in geoobj][0]
surfs = [face.GetSurface() for face in faces]

#materials parsing
matids = [face.MaterialElementId for face in faces]
mats, matnames = [doc.GetElement(id) for id in matids],[doc.GetElement(id).Name for id in matids]
pats = [doc.GetElement(mat.SurfaceForegroundPatternId).GetFillPattern() for mat in mats]
patgrids = [pat.GetFillGrids()[0] for pat in pats]
griddir = [grid.GetHatchingDirection().ToProtoType() for grid in patgrids]
gridangles = [grid.Angle for grid in patgrids]

#DS geometry
origin = [face.Origin.ToPoint() for face in faces]
edges = [face.EdgeLoops[0] for face in faces][0]
protocrvs = [edge.AsCurve().ToProtoType() for edge in edges]


OUT = faces, surfs, mats, matnames, origin, protocrvs, pats, patgrids, griddir, gridangles