Example #1
0
 private static bool IsUnsupportedObject(RhinoObject InObject)
 {
     // Geometry objects without meshes are currently not supported, unless they are points.
     return(InObject.ComponentType == ModelComponentType.ModelGeometry &&
            !InObject.IsMeshable(MeshType.Render) &&
            InObject.ObjectType != ObjectType.Point);
 }
            public static bool IsSupportedObject(
                RhinoObject rhinoObject, bool add)
            {
                if (rhinoObject.IsInstanceDefinitionGeometry)
                {
                    return(false);
                }

                if (add && !rhinoObject.IsValid)
                {
                    return(false);
                }

                if (rhinoObject is PointObject po)
                {
                    return(!add || po.PointGeometry.IsValid);
                }

                if (rhinoObject is PointCloudObject pco)
                {
                    return(!add || pco.PointCloudGeometry.Count > 0);
                }

                if (rhinoObject is CurveObject co)
                {
                    return(!add || !co.CurveGeometry.IsShort(Revit.ShortCurveTolerance * Revit.ModelUnits));
                }

                if (rhinoObject is MeshObject mo)
                {
                    return(!add || mo.MeshGeometry.Faces.Count > 0);
                }

                if (rhinoObject is BrepObject bo)
                {
                    return(!add || bo.BrepGeometry.Faces.Count > 0);
                }

                if (rhinoObject.IsMeshable(MeshType.Render))
                {
                    return(true);
                }

                return(false);
            }
 public override bool UseInTransparentPass(DB.View dBView) => rhinoObject.IsMeshable(MeshType.Render);