admin管理员组文章数量:1397166
In SOLIDWORKS, for a hole drawn by the wizardHole, it can be easily obtained through the hole feature in SOLIDWORKS, and its diameter and hole type can be obtained, but the hole drawn by extrusion cut, how to identify that the feature of the extruded cut is a hole? And to get information about its size, etc.?
while ((swFeat != null))
{
Debug.Print(swFeat.Name.ToString());
switch (swFeat.GetTypeName())
{
case "SM3dBend":
break;
case "SMMiteredFlange":
break;
case "Cut":
Body2 body = (Body2)swFeat.GetBody();
if (body != null)
{
Face2[] faces = body.GetFaces() as Face2[];
if (faces != null)
{
foreach (Face2 face in faces)
{
Surface surf = (Surface)face.GetSurface();
if (surf.IsCylinder())
{
Console.WriteLine(swFeat.Name);
}
}
}
}
break;
case "HoleWzd":
GetWizardHoleInfo(swFeat);
break;
case "FlatPattern":
GetFlatPatternLength(swFeat, swModel,partFile);
break;
}
swFeat = (Feature)swFeat.GetNextFeature();
}
本文标签: solidworksHow to distinguish holes drawn using extrude cutStack Overflow
版权声明:本文标题:solidworks - How to distinguish holes drawn using extrude cut? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744107386a2591127.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论