A start, will need to be refined…
bricks.rvt (2.2 MB) Brick.rfa (356 KB) bricks.dyn (14.1 KB)
(You should be able to build with nodes if required by referring to the script below)
wf = List.FirstItem(srf);
p01 = wf.PointAtParameter(([0,0,1,1]),([0,1,1,0]));
p02 = List.SortByKey(p01,p01.Z)["sorted list"];
p = List.GroupByKey(p02,Math.Round(p02.Z))["groups"];
//Brick width and height
bw = 400;
bh = 150;
bd = 200;
//Wall width and height
ww = Math.Round(p[0][0].DistanceTo(p[0][1]));
wh = Math.Round(p[1][0].Z - p[0][0].Z);
//Direction (start to end)
wd = Vector.ByTwoPoints(p[0][0],p[0][1]);
//Brick Course Lines
bcl1 = Line.ByStartPointEndPoint(p[0][0],p[0][1]);
bcl2 = bcl1.Translate(Vector.ZAxis(),(bh/2)..(wh-(bh/2))..bh);
bcl3 = wf<1>.Intersect(bcl2);
bcl4 = List.Transpose([bcl3.StartPoint,bcl3.EndPoint]);
//Brick Course1 Points
bc01 = (p[0][0].Translate(Vector.ZAxis(),bh/2)).Translate(wd,0..ww..bw);
bc02 = bc01.Translate(Vector.ZAxis(),(0..(wh-(bh/2))..(bh*2))<1>);
bc03 = List.FilterByBoolMask(bc02,bc02.DoesIntersect(wf<1>))["in"];
//Brick Course2 Points
bc11 = (p[0][0].Translate(Vector.ZAxis(),bh*1.5)).Translate(wd,bw/2..ww..bw);
bc12 = bc11.Translate(Vector.ZAxis(),(0..(wh-(bh/2))..(bh*2))<1>);
bc13 = List.FilterByBoolMask(bc12,bc12.DoesIntersect(wf<1>))["in"];
bc31 = List.Flatten(List.Transpose([bc03,bc13]),1);
bc32 = List.Flatten(List.AddItemToFront(bcl4<1>,bc31<1>)<1>,-1);
bc33 = bcl2.ParameterAtPoint(bc32);
bc34 = Point.PruneDuplicates(List.SortByKey(bc32<1>,bc33<1>)["sorted list"],0.1);
bc41 = List.DropItems(List.Sublists(bc34<1>,0..1,1)<1>,-1);
bc42 = List.FirstItem(bc41<1><2>).DistanceTo(List.LastItem(bc41<1><2>));
bwdt = Math.Round(List.FilterByBoolMask(bc42,(bc42 <= bw))["in"],1);
bpsn = List.FilterByBoolMask(List.FirstItem(bc41<1><2>),(bc42 <= bw))["in"].Translate(wd,bwdt/2);
brtn = wf.NormalAtParameter(0.1,0.1).Normalized().AngleAboutAxis(Vector.YAxis(),Vector.ZAxis());
//Place in Revit
bjnt = 25;
bfml = FamilyType.ByName("Brick").SetParameterByName(["width","height"],[bd,bh-bjnt]);
bfm1 = FamilyInstance.ByPoint(bfml[1],bpsn).SetRotation(brtn).SetParameterByName("length",bwdt-bjnt);