public static bool IsSupportedObject(Rhino.DocObjects.RhinoObject rhinoObject, bool add) { if (add && !rhinoObject.IsValid) { return(false); } if (rhinoObject is Rhino.DocObjects.PointObject po) { return(!add || po.PointGeometry.IsValid); } if (rhinoObject is Rhino.DocObjects.PointCloudObject pco) { return(!add || pco.PointCloudGeometry.Count > 0); } if (rhinoObject is Rhino.DocObjects.CurveObject co) { return(!add || co.CurveGeometry.GetLength() > Revit.ShortCurveTolerance * Revit.ModelUnits); } if (rhinoObject is Rhino.DocObjects.MeshObject mo) { return(!add || mo.MeshGeometry.Faces.Count > 0); } if (rhinoObject is Rhino.DocObjects.BrepObject bo) { return(!add || bo.BrepGeometry.Faces.Count > 0); } if (rhinoObject.IsMeshable(MeshType.Render)) { return(true); } return(false); }
public override bool UseInTransparentPass(View dBView) => rhinoObject.IsMeshable(MeshType.Render);