Beispiel #1
0
        private static void Compare(Face2 faceTarget, Face2 faceCompare, IModelDoc2 modDoc)
        {
            //比较面
            Measure      measure;
            SelectionMgr selMgr;
            SelectData   selData;

            DispatchWrapper[] arrObjIn = new DispatchWrapper[2];
            int ret;

            measure     = modDoc.Extension.CreateMeasure();
            selMgr      = modDoc.SelectionManager;
            selData     = (SelectData)selMgr.CreateSelectData();
            arrObjIn[0] = new DispatchWrapper(faceTarget);
            arrObjIn[1] = new DispatchWrapper(faceCompare);
            ret         = selMgr.SuspendSelectionList();

            selMgr.AddSelectionListObjects((arrObjIn), selData);
            //如果两面贴合,且不为同一面
            if (measure.IsParallel & !faceTarget.IsSame(faceCompare) & measure.Distance <= 0.01)
            {
                //查找所有圆形
                //孔是否贯通
                //若否且孔到比较面的距离小于0.01则认为是漏打孔
                //
                //查找所有圆柱面
                //查找圆柱面的接合面
                //接合面是否有贴合面
                //贴合面是否至少存在一个对应孔
            }
        }