#! NX/KF 5.0

DefClass: extension1 (ug_base_part);

(Number Parameter) length: 100;
(Number Parameter) width: 100;

(List UnCached) demandOrder: {block_1:,body_1:,extruded_1:,chamfer_1:,hole_1:};

(Child) body_1: {
	  	Class;		ug_body;
		Feature;	{block_1:};
		Color;		87;
		};
	
(Child) block_1: {
  Class, ug_block;
  Length, length:;
  Width, width:;
  Height, length:/3;
  Origin, Point(0,0,0);
  x_axis, Vector(1,0,0);
  y_axis, Vector(0,1,0);
  Operation, Unite;
  Target, {};
};

(Child) line_1: {
  Class, ug_line;
  Start_Point, Point(block_1:Length:*0.25,block_1:Width:*0.1,block_1:Height:);
  End_Point, Point(block_1:Length:*0.75,block_1:Width:*0.1,block_1:Height:);
};
(Child) line_2: {
  Class, ug_line;
  Start_Point, Point(block_1:Length:*0.75,block_1:Width:*0.1,block_1:Height:);
  End_Point, Point(block_1:Length:*0.5,block_1:Width:*0.1,block_1:Height:*0.4);
};
(Child) line_3: {
  Class, ug_line;
  Start_Point, Point(block_1:Length:*0.5,block_1:Width:*0.1,block_1:Height:*0.4);
  End_Point, Point(block_1:Length:*0.25,block_1:Width:*0.1,block_1:Height:);
};
(Child) extruded_1: {
  Class, ug_extruded;
  Taper_Angle, 0;
  Start_Limit, 0;
  end_limit, block_1:Width:*0.8;
  Direction, Vector(0,1,0);
  profile, {line_1:,line_2:,line_3:};
  Start_Trim, {};
  End_Trim, {};
  Operation, Subtract;
  Target, {body_1:};
};



(Child) 			chamfer_1: 	{
	Class, ug_single_offset_chamfer;
	References, 	ug_feature_askEdgeClosestToPoint(block_1:,Point(0,block_1:Width:/2,block_1:Height:)) ;
 	offset1, 		block_1:Length:/4;
	};


(Child) 			chamfer_2_unsym: 	{
	Class, ug_double_offset_chamfer;
	References, 	ug_feature_askEdgeClosestToPoint(block_1:,Point(block_1:Length:,block_1:Width:/2,block_1:Height:)) ;
 	offset1, 	block_1:Length:/4;
	offset2,	block_1:Length:/8;
	};

(Child) hole_1:
{
  Class, ug_simple_hole;
  Hole_Diameter,  block_1:Width:/4;
  Location,      Point(block_1:Length:/8,block_1:Width:/2,block_1:Height:/2);
  Placement_Face, ug_feature_askFaceClosestToPoint(block_1:, hole_1:Location:);
  Hole_tip_angle,      118;
	Hole_Depth, block_1:Height:/4;
};
#-

