Check for suppressed bends
This commit is contained in:
@@ -470,6 +470,11 @@ namespace ExportDXF.Forms
|
||||
var drawingModel = templateDrawing as ModelDoc2;
|
||||
drawingModel.ViewZoomtofit2();
|
||||
|
||||
if (HasSupressedBends(view))
|
||||
{
|
||||
Print("A bend is suppressed, please check flat pattern!", Color.Red);
|
||||
}
|
||||
|
||||
if (HideModelSketches(view))
|
||||
{
|
||||
// delete the current view that has sketches shown
|
||||
@@ -504,6 +509,25 @@ namespace ExportDXF.Forms
|
||||
}
|
||||
}
|
||||
|
||||
private bool HasSupressedBends(IView view)
|
||||
{
|
||||
var model = view.ReferencedDocument;
|
||||
var refConfig = view.ReferencedConfiguration;
|
||||
model.ShowConfiguration(refConfig);
|
||||
|
||||
var flatPattern = model.GetFeatureByTypeName("FlatPattern");
|
||||
var bends = flatPattern.GetAllSubFeaturesByTypeName("UiBend");
|
||||
|
||||
foreach (var bend in bends)
|
||||
{
|
||||
if (bend.IsSuppressed())
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
private bool HideModelSketches(IView view)
|
||||
{
|
||||
var model = view.ReferencedDocument;
|
||||
|
||||
Reference in New Issue
Block a user