Exemplo n.º 1
0
 public RNNPlugin()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     if (rnn == null)
     {
         rnn = new RNNContext();
     }
 }
Exemplo n.º 2
0
        protected override Result RunCommand(RhinoDoc doc, RunMode mode)
        {
            List <Point3d> points = RNNPlugin.Instance.rnn.GetMarkers();

            Rhino.DocObjects.ObjectAttributes attr = new Rhino.DocObjects.ObjectAttributes();
            int layer_index = Rhino.RhinoDoc.ActiveDoc.Layers.FindByFullPath("RhinoNatNet::RNN_Markers", true);

            if (layer_index < 0)
            {
                RNNContext.CreateLayers();
            }
            attr.LayerIndex = RhinoDoc.ActiveDoc.Layers.FindByFullPath("RhinoNatNet::RNN_Markers", true);
            attr.Name       = "RNN_Marker";

            doc.Objects.AddPoints(points, attr);
            return(Result.Success);
        }