Sevus,
betrifft jetzt nicht direkt KF. Habe noch ein Paar Befehle gefunden im NX-Check-Mate-Ordner, die man jetzt in NX8 nicht zu finden sind. Gibt es die Möglichkeit diese noch einzubetten?
Wie bekomme ich NX dazu, diese dfa zu lesen? Ich würde gerne nach einem Radius checken
#! NX/KF 5.0
#+
#============================================================================
#
# Copyright 2007 Siemens Product Lifecycle Management Software Inc.
#
# All Rights Reserved.
#
#============================================================================
#-
#
#
# DOCUMENTATION
#++
<Description>
This checker checks whether the inside radius around which the metal
bends to form a flange conforms to the Flange Break Radius criteria.
This checker, unlike the NX DFM advisor in the Die Engineering application, does not require the
die lineup feature to be in the part file.
</Description>
<Parameters>
********************** Use Die Lineup Feature Option **********************
(Boolean) use_die_lineup_feature - Determines whether or not
to use the Die Lineup Feature during checking.
The default value is True.
************************* Geometry Identification *************************
( List ) filter - Indicates whether or not to display
the filter option button in the
Checker Customization dialog box.
This parameter is also used to collect objects
selected by the Class Selection dialog box.
The default value is empty.
( Name ) filter_type_mode - Sets the mode for the object type filter.
Include - Collects objects with the specified object
types in the filter_type_filter list.
Exclude - Collects objects without the specified object
types in the filter_type_filter list.
The default value is Include.
( List ) filter_type_filter - Lists the object types for the filter.
The list contains object type names.
The default is:
{sheet body};
( Name ) filter_layer_mode - Sets the mode for the layer filter.
Options are: Include and Exclude.
See filter_type_mode for more information.
The default value is Include.
( List ) filter_layer_filter- Lists the layers for the layer filter.
The list can contain a mix of layer strings and category
name strings. For example: {"8,10-12", "SOLID"}
The default value is {ALL}.
( Name ) filter_color_mode - Sets the mode for the color filter.
Options are: Include and Exclude.
See filter_type_mode for more information.
The default value is Include.
( List ) filter_color_filter- Lists the colors for the color filter.
The list can contain a mix of RGB colors,
such as {{255,0,0},{102,102,102}},
and color indexes, such as {1,2,3}
The default value is {ALL}.
( Any )filter_class_selection- Adds a Class Selection dialog box
for the selection of face or solid objects.
The available object types are set by the filter_type_filter
parameter.
( Boolean) check_invisible_layers - Indicates whether or not to check for
objects on invisible layers.
The default value is False.
1. If the selection list is empty, and the filter parameters are set to the defaults,
the checker collects all the sheet bodies in the part for validation.
2. If the selection list is empty, and the filter parameters are not set to the defaults,
the checker uses the filter option to collect sheet bodies for validation.
3. If the selection list is not empty, and the filter parameters are set to the defaults,
the checker validates the sheet bodies in the selection list.
4. If the selection list is not empty, and the filter parameters are not set to the defaults,
the checker uses the common objects from the selection list and filter parameters
to collect sheet bodies for validation.
****************** Base Faces Identification *****************************
( List ) baseface - Specifies the base face that is used to
form a flange object.
All the parameters are similar to those for Geometry Identifications.
A base face is required to form a flange object. If a base face is not specified,
the checker looks for the face with the maximum area, and uses that as the base face for
the flange.
************************ Designate Punch Direction ***********************
(Vector)punch_direction_vector - Designates the user direction.
The default is the negative-Z direction of the WCS.
**************************** Analyze Parameters ***************************
(Name) unit - Sets the units for the distance tolerance. Options are:
grams_and_millimeters and pounds_and_inches.
The default is grams_and_millimeters.
(Number) sheet_metal_thickness - Sets the thickness of the sheet metal in the
default units of the system.
The default value is 0.8.
(Number) material_yield_strength - Sets the yield strength of the material
in the default units of the system.
The default value is 235000.
(Name) panel - Indicates whether the part being analyzed is an
Inner or Outer panel.
The default is Inner.
(Name) sampling_rate - Controls the number of iterations performed on
each part feature. The iterations can be:
Fine
Medium
Coarse
The default is Fine.
*************************** Log Setting ***************************
(Name) log_type - Specifies the log type to use to report
a violation:
LOG_ERROR
LOG_WARNING
LOG_INFO
The default is LOG_ERROR.
(String) log_msg - Adds a user-defined message when the system reports a violation.
The default is an empty string.
*************************** Others ***************************
(Boolean) disabled? - Disables the checker when the value is True.
The default value is False.
(Boolean) save_log_in_part- Saves the checker results to the part file.
The default value is True.
</Parameters>
<Results>
Passed - All flange break radii conform to the specified Flange Break Radius criteria.
Failed - One or more flange break radii do not conform to the specified Flange Break Radius criteria.
</Results>
#-
DefClass: %mqc_dfm_flange_break_radius ( %ug_base_checker %mqc_dfm_methods_mixin );
# Check-Mate Attributes and Parameters
( String ) %test_category: "DFM.Flange";
( String ) %displayed_name: "Flange Break Radius";
( Boolean Parameter ) disabled?: False;
( Boolean Parameter ) save_log_in_part: True;
# Use Die Lineup Feature or not
( Boolean Parameter ) use_die_lineup_feature: True;
( String ) use_die_lineup_feature_label: "Use Die Lineup Feature";
# Checker specific Attributes and Parameters
# Geometry Selection and Filters
( String ) filter_begin_group: "Select Objects to Be Analyzed"; # Group begin
( List Parameter ) filter: {};
( String ) filter_label: "Filter Methods";
( Name Parameter ) filter_Type_Mode: Include;
( List Parameter ) filter_Type_Filter: {Sheet_Body};
( Name Parameter ) filter_Layer_Mode: Include;
( List Parameter ) filter_Layer_Filter: {ALL};
( Name Parameter ) filter_Color_Mode: Include;
( List Parameter ) filter_Color_Filter: {ALL};
( Any ) filter_Class_Selection: "Selections";
# Check invisible Layers or not
( Boolean Parameter ) filter_check_invisible_layers: False;
( String ) filter_check_invisible_layers_label: "Check Invisible Layers";
( Any ) filter_end_group:; # Group end
# Flanged Base Faces Selection and Filters
( String ) baseface_begin_group: "Select Base Face"; # Group begin
( List Parameter ) baseface: {};
( String ) baseface_label: "Filter Methods";
( Name Parameter ) baseface_Type_Mode: Include;
( List Parameter ) baseface_Type_Filter: {face};
( Name Parameter ) baseface_Layer_Mode: Include;
( List Parameter ) baseface_Layer_Filter: {ALL};
( Name Parameter ) baseface_Color_Mode: Include;
( List Parameter ) baseface_Color_Filter: {ALL};
( Any ) baseface_Class_Selection: "Selections";
( Any ) baseface_end_group:; # Group end
# User direction
( Vector Parameter ) punch_direction_vector: vector( 0, 0, 0 );
( String ) punch_direction_vector_label: "Punch Direction";
# Parameter for unit
( String ) parameter_begin_group: "Analyze Parameters"; # Group begin
( Name Parameter ) unit: grams_and_millimeters ;
( List ) unit_option:{grams_and_millimeters, pounds_and_inches};
( String ) unit_label: "Unit";
# Set sheet metal thickness
( Number Parameter ) sheet_metal_thickness: 0.8;
( String ) sheet_metal_thickness_label: "Thickness";
# Set material yield strength
( Number Parameter ) material_yield_strength: 235000.0;
( String ) material_yield_strength_label: "Yield Strength";
# Set analyze panel option
( Name Parameter ) panel: Inner;
( List ) panel_option: { Inner, Outer };
( String ) panel_label: "Panel";
# Set sampling rate option
( Name Parameter ) sampling_rate: Fine;
( List ) sampling_rate_option: { Fine, Medium, Coarse };
( String ) sampling_rate_label: "Sampling Rate";
( Any ) parameter_end_group:; # Group end
# Log attributes and parameters
( Boolean ) log_detail: True;
( Name Parameter ) log_type: LOG_ERROR;
( List ) log_type_option: { LOG_ERROR,
LOG_WARNING,
LOG_INFO };
( String ) log_type_label: "Log Option";
( String Parameter ) log_msg: "";
( String ) log_msg_label: "Log Message";
# Attributes for sheet body collection and selection
( List ) filter_allowed_object_types: {Sheet_Body};
( List ) sheetbody_list: mqc_dfm_ask_object_list
filter:,
filter_Type_Mode:, filter_Type_Filter:,
filter_Layer_Mode:,filter_Layer_Filter:,
filter_Color_Mode:,filter_Color_Filter:,
filter_allowed_object_types:,
filter_check_invisible_layers:,
False);
# Attributes for base faces collection and selection
( List ) baseface_list:
mqc_convertHandlesToTags ( baseface: );
#-
# Checker function
(Any Uncached) do_check:
@{
$sheetbody_list << Second(sheetbody_list ;
If (Empty?($sheetbody_list) )
Then mqc_log( LOG_SKIP, {}, "No sheet body to check." )
Else
@{
$sheet_metal_thickness << mqc_convertUnitForTolerance( sheet_metal_thickness:, unit ;
$material_yield_strength << mqc_convertUnitForTolerance( material_yield_strength:, unit ;
$punch_direction_vector << mqc_dfm_get_default_punch_direction punch_direction_vector: );
$panel << Position( panel:, panel_option: ) - 1;
$sampling_rate << Position( sampling_rate:, sampling_rate_option: ) - 1;
$criteria_name << "flange break radius";
$error_message << " Break radius doesn't meet the criteria limit range.";
$sheetbody_list_all << mqc_dfm_get_valid_sheetbody_list $sheetbody_list, use_die_lineup_feature ;
If (Empty?($sheetbody_list_all))
Then donothing
Else
@{
mqc_dfm_sheetbody_check $sheetbody_list_all, baseface_list:, $punch_direction_vector, $sheet_metal_thickness, $material_yield_strength,
$panel, $sampling_rate, $criteria_name, $error_message, log_detail:, log_type_option:, log_type:, log_msg: );
};
};
};
MFG
linc
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP