Ejemplo n.º 1
0
        public static bool getFacePlaneByLabel(out BCOM.Plane3d plane,
                                               BCOM.Element element, TFCOM.TFdFaceLabel faceLabel)
        {
            TFCOM.TFBrepList brepList;

            var formRecipeList = new TFCOM.TFFormRecipeListClass();

            formRecipeList.InitFromElement(element);

            string options = string.Empty;

            formRecipeList.GetBrepList(out brepList, false, false, false, ref options);

            return(getFacePlaneByLabel(out plane, brepList, faceLabel));
        }
Ejemplo n.º 2
0
        private void projectLocationToTFForm(TFCOM.TFElementList tfForm,
                                             ref SortedDictionary <double, BCOM.Point3d> projPoints)
        {
            BCOM.Element element;
            tfForm.AsTFElement.GetElement(out element);

            var recipeList = new TFCOM.TFFormRecipeListClass();

            recipeList.InitFromElement(element);

            TFCOM.TFBrepList brepList;
            recipeList.GetBrepList(out brepList, false, false, false, "");

            BCOM.Point3d projPoint;
            brepList.FindClosestPoint(out projPoint, Location);

            double dist = App.Point3dDistance(Location, projPoint);

            if (!projPoints.ContainsKey(dist))
            {
                projPoints.Add(dist, projPoint);
            }
        }