Complete the code to start the undercut detection feature in SolidWorks.
model.Extension.SelectByID2("[1]", "FACE", 0, 0, 0, false, 0, null, 0);
The correct identifier to select the undercut feature is "Undercut".
Complete the code to check if undercut detection is enabled.
if (model.FeatureManager.[1]()) {
The method IsUndercutEnabled() checks if undercut detection is active.
Fix the error in the code to correctly get the undercut faces count.
int count = model.FeatureManager.GetUndercut[1]();The correct method is GetUndercutFaceCount() to get the number of undercut faces.
Fill both blanks to correctly enable undercut detection and set the draft angle.
model.FeatureManager.[1](true); model.FeatureManager.SetUndercutDraftAngle([2]);
Use EnableUndercutDetection(true) to turn on detection and set draft angle to 15.0 degrees.
Fill all three blanks to create a report of undercut faces with their IDs and draft angles.
var report = new Dictionary<int, double>(); foreach (var face in model.FeatureManager.GetUndercutFaces()) { int id = face.[1]; double angle = face.[2]; if (angle > [3]) { report.Add(id, angle); } }
Use Id to get face ID, DraftAngle for angle, and filter angles greater than 10.0 degrees.
