样式demo

This commit is contained in:
GG Z
2025-12-28 11:47:54 +08:00
parent ceccab9abb
commit 1fd8d2ced7
65 changed files with 2369 additions and 799 deletions

View File

@@ -9,16 +9,13 @@ namespace ShrlAlgoToolkit.Revit.Assists;
public class FuncFilter(Func<Element, bool> allowElement, Func<Reference, XYZ, bool> allowReference = null)
: ISelectionFilter
{
private readonly Func<Element, bool> elementFunc = allowElement;
private readonly Func<Reference, XYZ, bool> referenceFunc = allowReference;
public bool AllowElement(Element elem)
{
return elementFunc(elem);
return allowElement(elem);
}
public bool AllowReference(Reference reference, XYZ position)
{
return referenceFunc == null || referenceFunc(reference, position);
return allowReference == null || allowReference(reference, position);
}
}