NX二次开发源码分享: 选择相切面的方法
NX二次开发源码分享: 选择相切面的方法static Face[] AskTangentFaces(Face baseFace)
{
FaceTangentRule faceTangent =
workPart.ScRuleFactory.CreateRuleFaceTangent(baseFace, new Face[] { });
ScCollector scCollector1 = workPart.ScCollectors.CreateCollector();
scCollector1.ReplaceRules(new SelectionIntentRule[] { faceTangent }, false);
TaggedObject[] tanFaces = scCollector1.GetObjects();
System.Collections.Generic.List<Face> faceList =
new System.Collections.Generic.List<Face>();
foreach (Face aFace in tanFaces) faceList.Add(aFace);
return faceList.ToArray();
}
页:
[1]