public override bool ShouldDisplay(ObjectPropertiesPageEventArgs e) { if (!e.Objects.Any()) { return(false); } //check if a subsurface is selected. var selectedObj = e.Objects.Last(); var subObjes = selectedObj.GetSelectedSubObjects(); var isSelectedBrepFace = null != subObjes; if (isSelectedBrepFace) { var comIndex = subObjes.Last(); if (comIndex.ComponentIndexType != Rhino.Geometry.ComponentIndexType.BrepFace) { return(false); } var faceIndex = comIndex.Index; var hostRoomObjRef = new ObjRef(selectedObj.Id); this._HBObjEntity = hostRoomObjRef.TryGetFaceEntity(comIndex); return(this._HBObjEntity.IsValid); } return(false); }
public override void UpdatePage(ObjectPropertiesPageEventArgs e) { var spheres = SpheresController.GetSpheres(e.Objects).ToList(); if (spheres.Count != 0) { _control.SetData(spheres); } }
public override void UpdatePage(ObjectPropertiesPageEventArgs e) { var rectangles = RectanglesController.GetRectangles(e.Objects).ToList(); if (rectangles.Count != 0) { _control.SetData(rectangles); } }
public override void UpdatePage(ObjectPropertiesPageEventArgs e) { if (!this._HBObjEntity.IsValid) { return; } if (this._HBObjEntity is RoomEntity rm) { this.panelUI.updateRoomPanel(rm); } }
public override void UpdatePage(ObjectPropertiesPageEventArgs e) { if (!this._HBObjEntity.IsValid) { return; } if (this._HBObjEntity is ShadeEntity apt) { this.panelUI.updateShadePanel(apt); } }
public override void UpdatePage(ObjectPropertiesPageEventArgs e) { if (!this._HBObjEntity.IsValid) { return; } if (this._HBObjEntity is FaceEntity face) { this.panelUI.updateFacePanel(face); } }
public override bool ShouldDisplay(ObjectPropertiesPageEventArgs e) { if (e.ObjectCount == 0) { return(false); } var spheres = SpheresController.GetSpheres(e.Objects).ToList(); if (spheres.Count == 0) { return(false); } _control.SetData(spheres); return(true); }
public override bool ShouldDisplay(ObjectPropertiesPageEventArgs e) { if (RhinoDoc.ActiveDoc == null || RhinoDoc.ActiveDoc.Views.ActiveView == null) { return(false); } if (!RhinoCyclesCore.Core.RcCore.It.EngineSettings.AllowViewportSettingsOverride) { return(false); } var dm = RhinoDoc.ActiveDoc.Views.ActiveView.RealtimeDisplayMode as Viewport.RenderedViewport; return(dm != null); }
public override bool ShouldDisplay(ObjectPropertiesPageEventArgs e) { if (!e.Objects.Any()) { return(false); } //if (e.ObjectCount !=1) return false; if (e.Objects.Count() != 1) { return(false); } var obj = e.Objects.Last(); var ent = obj.Geometry.TryGetShadeEntity(); this._HBObjEntity = ent; return(this._HBObjEntity.IsValid); }
public override bool ShouldDisplay(ObjectPropertiesPageEventArgs e) { var rc = false; // One object selected if (1 == e.ObjectCount) { rc = true; } else { // Multiple objects selected foreach (var rh_obj in e.Objects) { rc = true; break; } } return(rc); }
public override bool ShouldDisplay(ObjectPropertiesPageEventArgs e) { //reset _HBObjEntity = new RoomEntity(); if (!e.Objects.Any()) { return(false); } var roomEnts = e.Objects.Where(_ => _.Geometry.TryGetRoomEntity().IsValid); if (!roomEnts.Any()) { return(false); } //var isApertureOnly = e.Objects.Count() == 1 && e.Objects[0].Geometry.TryGetApertureEntity().IsValid; //if (isApertureOnly) // return false; this._HBObjEntity = roomEnts.First().Geometry.TryGetRoomEntity(); return(this._HBObjEntity.IsValid); }
public override void UpdatePage(ObjectPropertiesPageEventArgs e) { // TODO... }
public override void UpdatePage(ObjectPropertiesPageEventArgs e) { Debug.WriteLine("SampleCsEtoPropertiesPage.UpdatePage()"); }
public override bool ShouldDisplay(ObjectPropertiesPageEventArgs e) { Debug.WriteLine("SampleCsEtoPropertiesPage.ShouldDisplay()"); return(true); }