예제 #1
0
        public IEnumerable <HB.Shade> GetHBShades()
        {
            var brep  = this.HostObjRef.Brep();
            var prop  = this.HBObject.Properties;
            var id    = this.HostObjRef.ObjectId;
            var faces = brep.Faces;
            var shds  = new List <HB.Shade>();

            for (int i = 0; i < faces.Count; i++)
            {
                var face   = faces[i];
                var face3D = face.ToHBFace3D();
                var obj    = new HB.Shade($"Shade_{id}_{i}", face3D, prop);
                obj.DisplayName = $"My Shade {id.ToString().Substring(0, 5)} ({i})";
                shds.Add(obj);
            }
            return(shds);
        }
예제 #2
0
 public ShadeEntity(HB.Shade hbObj)
 {
     this.HBObject = hbObj;
 }