Ejemplo n.º 1
0
 private void Preview()
 {
     if (Points.Count == 2)
     {
         InitSession();
         var polygon = GlobalLibraryShapeFactory.Instance.Get(BooShapeNames.RegularPolygon);
         polygon.Set(0, Points[0]);
         polygon.Set(1, Points[1]);
         polygon.Set(2, _steps);
         polygon.Execute(Document);
         return;
     }
     if (Points.Count < 3)
     {
         return;
     }
     InitSession();
     _poly = GlobalLibraryShapeFactory.Instance.Get(BooShapeNames.BooGearShape);
     _poly.Set(0, Points[0]);
     _poly.Set(1, Points[0].Distance(Points[1]));
     _poly.Set(2, Points[0].Distance(Points[2]));
     _poly.Set(3, _steps);
     _poly.Set(4, _extrudeSize);
     _poly.Execute(Document);
     UpdateView();
 }
Ejemplo n.º 2
0
        public override void OnActivate()
        {
            base.OnActivate();

            RegisterRegularPoly();

            _poly = GlobalLibraryShapeFactory.Instance.Get(BooShapeNames.RegularPolygon);
            Reset();
        }