8 Replies Latest reply on Feb 29, 2016 6:07 AM by Artem Taturevych

    GetEntitiesNeedUserId returns null for faces and edges. Is this ok?

    Johannes Kronberger

      I've written a macro feature that cuts up a solid body into N equal sized pieces. Then at the end I run this function on each body.

       

              public static void AddIdsToBody(this IMacroFeatureData macroFeatureData, IBody2 body)

              {

                  if (body == null) throw new ArgumentNullException(nameof(body));

                  {

                      object FacesNeedId;

                      object EdgesNeedId;

                      macroFeatureData.GetEntitiesNeedUserId((object)body, out FacesNeedId, out EdgesNeedId);

                      var edgesNeedId = (object[]) EdgesNeedId;

                      var facesNeedId = (object[]) FacesNeedId;

                      int i = 0;

                      var empty = new object[] {};

                      foreach (var edge in edgesNeedId ?? empty)

                      {

                          macroFeatureData.SetEdgeUserId((Edge) edge, i, 0);

                          i++;

                      }

                      foreach (var face in facesNeedId ?? empty)

                      {

                          macroFeatureData.SetFaceUserId((Face2) face, i, 0);

                          i++;

                      }

                  }

              }

       

      The out parameters are always null. Is this to be expected if nothing is required to be done? I'm suspicious because I can't correctly fillet my final objects. The fillets always jump from one object to the other like the tracking ids are not right.