typedef if not exists ParameterValue = double; 
typedef if not exists PlaneAngleMeasure = double; 
typedef if not exists YearNumber = int; 
typedef if not exists WeekInYearNumber = int; 
typedef if not exists MinuteInHour = int; 
typedef if not exists Identifier = text; 
typedef if not exists ShapeTolerance = double; 
typedef if not exists RotAccelerationMeasure = double; 
typedef if not exists VelocityMeasure = double; 
typedef if not exists DimensionCount = int; 
typedef if not exists PositiveLengthMeasure = double; 
typedef if not exists HourInDay = int; 
typedef if not exists RatioMeasure = double; 
typedef if not exists AccelerationMeasure = double; 
typedef if not exists DayInMonthNumber = int; 
typedef if not exists ElectricCurrentMeasure = double; 
typedef if not exists JerkMeasure = double; 
typedef if not exists VolumeMeasure = double; 
typedef if not exists DayInWeekNumber = int; 
typedef if not exists TorqueMeasure = double; 
typedef if not exists TimeMeasure = double; 
typedef if not exists PowerMeasure = double; 
typedef if not exists DayInYearNumber = int; 
typedef if not exists MassMeasure = double; 
typedef if not exists PositiveRatioMeasure = double; 
typedef if not exists MonthInYearNumber = int; 
typedef if not exists SecondInMinute = double; 
typedef if not exists Label = text; 
typedef if not exists RotSpeedMeasure = double; 
typedef if not exists SpeedMeasure = double; 
typedef if not exists PressureMeasure = double; 
typedef if not exists LengthMeasure = double; 
typedef if not exists RotJerkMeasure = double; 
typedef if not exists CountMeasure = int; 

--- define mql enums.

type if not exists ProbeType = enum {
	"0":["nulling"],
	"1":["proportional"],
	"2":["switching"]
};

type if not exists ToolReferencePoint = enum {
	"0":["tcp"],
	"1":["ccp"]
};

type if not exists MachineClass = enum {
	"0":["drilling_machine"],
	"1":["gundrill_machine"],
	"2":["machining_centre"],
	"3":["milling_machine"],
	"4":["multi_tasking_machine"],
	"5":["turning_machine"]
};

type if not exists KnotType = enum {
	"0":["uniform_knots"],
	"1":["quasi_uniform_knots"],
	"2":["piecewise_bezier_knots"],
	"3":["unspecified"]
};

type if not exists UnitsType = enum {
	"0":["inch"],
	"1":["inch_and_metric"],
	"2":["metric"]
};

type if not exists TransitionCode = enum {
	"0":["discontinuous"],
	"1":["continuous"],
	"2":["cont_same_gradient"],
	"3":["cont_same_gradient_same_curvature"]
};

type if not exists MachiningCapabilityProfile = enum {
	"0":["boring_capability"],
	"1":["drilling_capability"],
	"2":["gundrill_capability"],
	"3":["milling_capability"],
	"4":["turning_capability"]
};

type if not exists ContactType = enum {
	"0":["side"],
	"1":["front"]
};

type if not exists RotDirection = enum {
	"0":["cw"],
	"1":["ccw"]
};

type if not exists SpeedName = enum {
	"0":["rapid"]
};

type if not exists PalletStorageConfiguration = enum {
	"0":["carousel"],
	"1":["carousel_2_place"],
	"2":["chain"],
	"3":["fixed_2_place"],
	"4":["multi_storey"],
	"5":["straight_line"]
};

type if not exists BSplineCurveForm = enum {
	"0":["polyline_form"],
	"1":["circular_arc"],
	"2":["elliptic_arc"],
	"3":["parabolic_arc"],
	"4":["hyperbolic_arc"],
	"5":["unspecified"]
};

type if not exists FittingType = enum {
	"0":["shaft"],
	"1":["hole"]
};

type if not exists LeftOrRight = enum {
	"0":["left"],
	"1":["right"]
};

type if not exists FixtureStyle = enum {
	"0":["chuck_fixture"],
	"1":["hole"],
	"2":["t_slot_fixture"],
	"3":["vacuum"]
};

type if not exists TrimmingPreference = enum {
	"0":["cartesian"],
	"1":["parameter"],
	"2":["unspecified"]
};

type if not exists StrokeConnectionStrategy = enum {
	"0":["straghtline"],
	"1":["lift_shift_plunge"],
	"2":["degouge"],
	"3":["loop_back"]
};

type if not exists BSplineSurfaceForm = enum {
	"0":["plane_surf"],
	"1":["cylindrical_surf"],
	"2":["conical_surf"],
	"3":["spherical_surf"],
	"4":["toroidal_surf"],
	"5":["surf_of_revolution"],
	"6":["ruled_surf"],
	"7":["generalised_cone"],
	"8":["quadric_surf"],
	"9":["surf_of_linear_extrusion"],
	"10":["unspecified"]
};

type if not exists ToolStorageConfiguration = enum {
	"0":["bi_directional"],
	"1":["box_matrix"],
	"2":["uni_directional"]
};

type if not exists UnlimitedRange = enum {
	"0":["unlimited"]
};

type if not exists MeansOfCoolantDelivery = enum {
	"0":["external"],
	"1":["thru_spindle"],
	"2":["thru_turret"]
};

type if not exists BottomOrSide = enum {
	"0":["bottom"],
	"1":["side"],
	"2":["bottom_and_side"]
};

type if not exists AheadOrBehind = enum {
	"0":["ahead"],
	"1":["exact"],
	"2":["behind"]
};

type if not exists Hand = enum {
	"0":["left"],
	"1":["right"],
	"2":["neutral"]
};

type if not exists PathmodeType = enum {
	"0":["forward"],
	"1":["zigzag"]
};

type if not exists SensorDimensionality = enum {
	"0":["one_d"],
	"1":["two_d"],
	"2":["three_d"]
};

type if not exists CutmodeType = enum {
	"0":["climb"],
	"1":["conventional"]
};

type if not exists ToolpathType = enum {
	"0":["approach"],
	"1":["lift"],
	"2":["connect"],
	"3":["non_contact"],
	"4":["contact"],
	"5":["trajectory_path"]
};

type if not exists ToolCompensation = enum {
	"0":["tool_length"],
	"1":["tool_radius"]
};

type if not exists Interpolation = enum {
	"0":["circular"],
	"1":["helical"],
	"2":["linear"],
	"3":["nurbs"],
	"4":["other"]
};

type if not exists CoolantType = enum {
	"0":["air"],
	"1":["flood"],
	"2":["micro"],
	"3":["mist"],
	"4":["none"]
};

type if not exists Logical = enum {
	"0":["False"],
	"1":["True"]
};


CREATE CLASS IF NOT EXISTS HoleBottomCondition : Step1 (
  )with version=true;


CREATE CLASS IF NOT EXISTS BlindBottomCondition : HoleBottomCondition (
   )with version=true;


CREATE CLASS IF NOT EXISTS FlatHoleBottom : BlindBottomCondition (
   )with version=true;


CREATE CLASS IF NOT EXISTS BooleanExpression : Step1 (
  )with version=true;


CREATE CLASS IF NOT EXISTS MultipleArityBooleanExpression : BooleanExpression (
 	operands			BooleanExpression[?]
)with version=true;


CREATE CLASS IF NOT EXISTS OrExpression : MultipleArityBooleanExpression (
   )with version=true;


CREATE CLASS IF NOT EXISTS ToolBody : Step1 (
  )with version=true;


CREATE CLASS IF NOT EXISTS DrillingTypeStrategy : Step1 (
	reduced_cut_at_start			double,
	reduced_feed_at_start			double,
	depth_of_start			double,
	reduced_cut_at_end			double,
	reduced_feed_at_end			double,
	depth_of_end			double
)with version=true;


CREATE CLASS IF NOT EXISTS ToolAssembly : Step1 (
	tool_number			text,
	tool_type			text,
	tool_size			text
)with version=true;


CREATE CLASS IF NOT EXISTS NcConstant : Step1 (
	its_name			text,
	its_value			double
)with version=true;


CREATE CLASS IF NOT EXISTS RepresentationItem : Step1 (
    name    varchar
)with version=true;


CREATE CLASS IF NOT EXISTS GeometricRepresentationItem : RepresentationItem (
   )with version=true;


CREATE CLASS IF NOT EXISTS SolidModel : GeometricRepresentationItem (
   )with version=true;


CREATE CLASS IF NOT EXISTS ElementCapability : Step1 (
	description			text
)with version=true;


CREATE CLASS IF NOT EXISTS Executable : Step1 (
	its_id			text
)with version=true;


CREATE CLASS IF NOT EXISTS ProgramStructure : Executable (
   )with version=true;


CREATE CLASS IF NOT EXISTS NonSequential : ProgramStructure (
 	its_elements			Executable[?]
)with version=true;


CREATE CLASS IF NOT EXISTS TopologicalRepresentationItem : RepresentationItem (
   )with version=true;


CREATE CLASS IF NOT EXISTS Vertex : TopologicalRepresentationItem (
   )with version=true;


CREATE CLASS IF NOT EXISTS NcVariable : Step1 (
	its_name			text,
	initial_value			double
)with version=true;


CREATE CLASS IF NOT EXISTS Surface : GeometricRepresentationItem (
   )with version=true;


CREATE CLASS IF NOT EXISTS OrientedSurface : Surface (
 	orientation			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS ToolHandlingUnit : ElementCapability (
   )with version=true;


CREATE CLASS IF NOT EXISTS ToolMagazine : ToolHandlingUnit (
 	number_of_tools			double,
	random_access			boolean,
	diameter_full			double,
	diameter_empty			double,
	tool_length			double,
	tool_weight			double,
	storage_configuration			ToolStorageConfiguration,
	tool_magazine_contents			ToolAssembly[?]
)with version=true;


CREATE CLASS IF NOT EXISTS ToolDirection : Step1 (
  )with version=true;


CREATE CLASS IF NOT EXISTS ToolDirectionForMilling : ToolDirection (
   )with version=true;


CREATE CLASS IF NOT EXISTS Curve : GeometricRepresentationItem (
   )with version=true;


CREATE CLASS IF NOT EXISTS SlotEndType : Step1 (
  )with version=true;


CREATE CLASS IF NOT EXISTS RadiusedSlotEndType : SlotEndType (
   )with version=true;


CREATE CLASS IF NOT EXISTS BoundedSurface : Surface (
   )with version=true;


CREATE CLASS IF NOT EXISTS PocketBottomCondition : Step1 (
  )with version=true;


CREATE CLASS IF NOT EXISTS Hydraulics : Step1 (
	type_of_hydraulic_oil			text,
	pump_outlet_pressure			double,
	capacity_of_hydraulics_tank			double
)with version=true;


CREATE CLASS IF NOT EXISTS BoundedCurve : Curve (
   )with version=true;


CREATE CLASS IF NOT EXISTS CuttingEdgeTechnologicalData : Step1 (
	cutting_angle			double,
	free_angle			double,
	aux_angle			double
)with version=true;


CREATE CLASS IF NOT EXISTS Direction : GeometricRepresentationItem (
 	direction_ratios			Double[?]
)with version=true;


CREATE CLASS IF NOT EXISTS NcFunction : Executable (
   )with version=true;


CREATE CLASS IF NOT EXISTS IndexPallet : NcFunction (
 	its_index			int
)with version=true;


CREATE CLASS IF NOT EXISTS KinematicLink : Step1 (
  )with version=true;


CREATE CLASS IF NOT EXISTS TwoAxes : ToolDirection (
   )with version=true;
   
CREATE CLASS IF NOT EXISTS OffsetVector : Step1 (
	translate			NcVariable[?],
	rotate			NcVariable[?]
)with version=true;


CREATE CLASS IF NOT EXISTS Person : Step1 (
    id    varchar,
	last_name			text,
	first_name			text,
	middle_names			Text[?],
	prefix_titles			Text[?],
	suffix_titles			Text[?]
)with version=true;


CREATE CLASS IF NOT EXISTS Edge : TopologicalRepresentationItem (
 	edge_start			Vertex,
	edge_end			Vertex
)with version=true;


CREATE CLASS IF NOT EXISTS OrientedEdge : Edge (
 	edge_element			Edge,
	orientation			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS Point : GeometricRepresentationItem (
   )with version=true;


CREATE CLASS IF NOT EXISTS PointOnSurface : Point (
 	basis_surface			Surface,
	point_parameter_u			double,
	point_parameter_v			double
)with version=true;


CREATE CLASS IF NOT EXISTS PropertyParameter : Step1 (
	parameter_name			text
)with version=true;


CREATE CLASS IF NOT EXISTS TouchProbe : Step1 (
	its_id			text
)with version=true;


CREATE CLASS IF NOT EXISTS MachineFunctions : Step1 (
  )with version=true;


CREATE CLASS IF NOT EXISTS ThreeAxes : ToolDirection (
   )with version=true;


CREATE CLASS IF NOT EXISTS Electrical : Step1 (
	electric_phase			int,
	electric_power			double,
	electrical_current			double,
	electrical_frequency			text,
	electrical_grounding			text,
	electrical_voltage			double
)with version=true;


CREATE CLASS IF NOT EXISTS RepresentationContext : Step1 (
	context_identifier			text,
	context_type			text
)with version=true;


CREATE CLASS IF NOT EXISTS GeometricRepresentationContext : RepresentationContext (
 	coordinate_space_dimension			int
)with version=true;


CREATE CLASS IF NOT EXISTS FiveAxesConstTiltYaw : ToolDirectionForMilling (
 	tilt_angle			double,
	yaw_angle			double
)with version=true;


CREATE CLASS IF NOT EXISTS ApplicationContext : Step1 (
	application			text
)with version=true;


CREATE CLASS IF NOT EXISTS RectangularOmit : Step1 (
	row_index			int,
	column_index			int
)with version=true;


CREATE CLASS IF NOT EXISTS CartesianPoint : Point (
 	coordinates			Double[?]
)with version=true;


CREATE CLASS IF NOT EXISTS RationalPoint : CartesianPoint (
 	weight			double
)with version=true;


CREATE CLASS IF NOT EXISTS NumericParameter : PropertyParameter (
 	its_parameter_value			double,
	its_parameter_unit			text
)with version=true;


CREATE CLASS IF NOT EXISTS TLink : OrientedEdge (
   )with version=true;


CREATE CLASS IF NOT EXISTS WhileStatement : ProgramStructure (
 	condition			BooleanExpression,
	body			Executable
)with version=true;


CREATE CLASS IF NOT EXISTS Path : TopologicalRepresentationItem (
 	edge_list			OrientedEdge[?]
)with version=true;


CREATE CLASS IF NOT EXISTS MachineToolAxis : ElementCapability (
 	axis_name			text
)with version=true;


CREATE CLASS IF NOT EXISTS RotaryAxis : MachineToolAxis (
 	displacement_angle_error			double,
	repeatability_angle_error			double,
	rapid_traverse_rotation_feed_rate			double,
	minimum_cutting_rotation_feed_rate			double,
	maximum_cutting_rotation_feed_rate			double,
	maximum_rotation_acceleration			double,
	maximum_rotation_deceleration			double,
	maximum_rotation_jerk			double
)with version=true;


CREATE CLASS IF NOT EXISTS ContinuousRotary : RotaryAxis (
   )with version=true;


CREATE CLASS IF NOT EXISTS CoordinatedUniversalTimeOffset : Step1 (
	hour_offset			int,
	minute_offset			int,
	sense			AheadOrBehind
)with version=true;


CREATE CLASS IF NOT EXISTS ThroughPocketBottomCondition : PocketBottomCondition (
   )with version=true;


CREATE CLASS IF NOT EXISTS LoopSlotEndType : SlotEndType (
   )with version=true;


CREATE CLASS IF NOT EXISTS SweptSurface : Surface (
 	swept_curve			Curve
)with version=true;


CREATE CLASS IF NOT EXISTS Representation : Step1 (
    name    varchar,
	items			RepresentationItem[?],
	context_of_items			RepresentationContext
)with version=true;

CREATE CLASS IF NOT EXISTS KinematicLinkRepresentation : Representation (
 	representation_context_of_items			GeometricRepresentationContext
)with version=true;


CREATE CLASS IF NOT EXISTS ToolChanger : ToolHandlingUnit (
 	spindle_name			text,
	cut_to_cut_min_tool_change_time			double,
	cut_to_cut_max_tool_change_time			double
)with version=true;


CREATE CLASS IF NOT EXISTS OpenSlotEndType : SlotEndType (
   )with version=true;


CREATE CLASS IF NOT EXISTS OptionalStop : NcFunction (
   )with version=true;


CREATE CLASS IF NOT EXISTS Loop : TopologicalRepresentationItem (
   )with version=true;


CREATE CLASS IF NOT EXISTS EdgeLoop : Loop (
 	edge_list			OrientedEdge[?]
)with version=true;


CREATE CLASS IF NOT EXISTS Date : Step1 (
	year_component			int
)with version=true;


CREATE CLASS IF NOT EXISTS CalendarDate : Date (
 	day_component			int,
	month_component			int
)with version=true;

CREATE CLASS IF NOT EXISTS Turret : ToolHandlingUnit (
 	spindle_name_xxx			Text[?],
	number_of_fixed_tools			double,
	number_of_rotating_tools			double,
	cut_to_cut_min_turret_index_time			double,
	cut_to_cut_max_turret_index_time			double,
	turret_contents			ToolAssembly[?]
)with version=true;

CREATE CLASS IF NOT EXISTS Vector : GeometricRepresentationItem (
 	orientation_xxx			Direction,
	magnitude			double
)with version=true;

CREATE CLASS IF NOT EXISTS ProfileFloor : Step1 (
	floor_radius			NumericParameter,
	start_or_end			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS Two5dMillingStrategy : Step1 (
	overlap			double,
	allow_multiple_passes			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS BidirectionalContour : Two5dMillingStrategy (
 	feed_direction			Direction,
	stepover_direction			LeftOrRight,
	rotation_direction			RotDirection,
	spiral_cutmode			CutmodeType
)with version=true;


CREATE CLASS IF NOT EXISTS Tailstock : ElementCapability (
 	spindle_name			text,
	taper			text,
	maximum_workpiece_weight_of_quill			double
)with version=true;


CREATE CLASS IF NOT EXISTS TPointset : GeometricRepresentationItem (
 	control_points			RationalPoint[?]
)with version=true;


CREATE CLASS IF NOT EXISTS ProgramStop : NcFunction (
   )with version=true;


CREATE CLASS IF NOT EXISTS ItemDefinedTransformation : Step1 (
    name    varchar,
	description			text,
	transform_item_1			RepresentationItem,
	transform_item_2			RepresentationItem
)with version=true;


CREATE CLASS IF NOT EXISTS CharacterizedObject : Step1 (
    name    varchar,
	description			text
)with version=true;


CREATE CLASS IF NOT EXISTS RepresentationMap : Step1 (
	mapping_origin			RepresentationItem,
	mapped_representation			Representation
)with version=true;


CREATE CLASS IF NOT EXISTS MachiningSize : Step1 (
	description			text,
	x			double,
	y			double,
	z			double
)with version=true;

CREATE CLASS IF NOT EXISTS CircularOmit : Step1 (
	index			int
)with version=true;


CREATE CLASS IF NOT EXISTS DisplayMessage : NcFunction (
 	its_text			text
)with version=true;


CREATE CLASS IF NOT EXISTS LinearAxis : MachineToolAxis (
 	minimum_range_of_motion			double,
	maximum_range_of_motion			double,
	displacement_error			double,
	repeatability_error			double,
	rapid_traverse_feed_rate			double,
	minimum_cutting_feed_rate			double,
	maximum_cutting_feed_rate			double,
	maximum_acceleration			double,
	maximum_deceleration			double,
	maximum_jerk			double
)with version=true;


CREATE CLASS IF NOT EXISTS AngleTaper : Step1 (
	angle			double
)with version=true;


CREATE CLASS IF NOT EXISTS ThroughBottomCondition : HoleBottomCondition (
   )with version=true;


CREATE CLASS IF NOT EXISTS UnaryBooleanExpression : BooleanExpression (
 	operand			BooleanExpression
)with version=true;


CREATE CLASS IF NOT EXISTS ToolDimension : Step1 (
	diameter			double,
	tool_top_angle			double,
	tool_circumference_angle			double,
	cutting_edge_length			double,
	edge_radius			double,
	edge_center_vertical			double,
	edge_center_horizontal			double
)with version=true;


CREATE CLASS IF NOT EXISTS MeasuringCapability : Step1 (
	measuring_accuracy			text,
	description			text
)with version=true;


CREATE CLASS IF NOT EXISTS PlusMinusValue : Step1 (
	upper_limit			double,
	lower_limit			double,
	significant_digits			int
)with version=true;


CREATE CLASS IF NOT EXISTS CurveWithNormalVector : Step1 (
	basiccurve			BoundedCurve,
	surface_normal			BoundedCurve
)with version=true;


CREATE CLASS IF NOT EXISTS OrdinalDate : Date (
 	day_component			int
)with version=true;


CREATE CLASS IF NOT EXISTS Locator : Step1 (
	business_unit			text,
	plant_location			text,
	building			text,
	cell			text
)with version=true;


CREATE CLASS IF NOT EXISTS AndExpression : MultipleArityBooleanExpression (
   )with version=true;


CREATE CLASS IF NOT EXISTS ContourParallel : Two5dMillingStrategy (
 	rotation_direction			RotDirection,
	cutmode			CutmodeType
)with version=true;


CREATE CLASS IF NOT EXISTS WeekOfYearAndDayDate : Date (
 	week_component			int,
	day_component			int
)with version=true;


CREATE CLASS IF NOT EXISTS BinaryBooleanExpression : BooleanExpression (
 	operand1			BooleanExpression,
	operand2			BooleanExpression
)with version=true;


CREATE CLASS IF NOT EXISTS AdaptiveControl : Step1 (
  )with version=true;


CREATE CLASS IF NOT EXISTS CenterMilling : Two5dMillingStrategy (
   )with version=true;


CREATE CLASS IF NOT EXISTS ShapeRepresentation : Representation (
   )with version=true;


CREATE CLASS IF NOT EXISTS AdvancedBrepShapeRepresentation : ShapeRepresentation (
   )with version=true;
   
CREATE CLASS IF NOT EXISTS EdgeCurve : Edge (
 	edge_geometry			Curve,
	same_sense			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS LimitedSwing : RotaryAxis (
 	minimum_angle_of_motion			double,
	maximum_angle_of_motion			double,
	axis_travel_limit			boolean
)with version=true;

CREATE CLASS IF NOT EXISTS Line : Curve (
 	pnt			CartesianPoint,
	dir_xxx			Vector
)with version=true;

CREATE CLASS IF NOT EXISTS SpindleRange : Step1 (
	minimum_drive_speed			double,
	maximum_drive_speed			double,
	minimum_drive_torque			double,
	maximum_drive_torque			double
)with version=true;


CREATE CLASS IF NOT EXISTS SetupInstruction : Step1 (
	description			text,
	external_document			text
)with version=true;


CREATE CLASS IF NOT EXISTS RectangularOffset : Step1 (
	offset_direction			Direction,
	offset_distance			double,
	row_index			int,
	column_index			int
)with version=true;


CREATE CLASS IF NOT EXISTS ExchangePallet : NcFunction (
   )with version=true;


CREATE CLASS IF NOT EXISTS MachineToolElement : Step1 (
    name    varchar,
	description			text,
	weight			double,
	capabilities			ElementCapability[?]
)with version=true;


CREATE CLASS IF NOT EXISTS TSlot : Step1 (
	number_of_t_slots			double,
	t_slots_size			double,
	distance_between_t_slot_centres			double
)with version=true;


CREATE CLASS IF NOT EXISTS NcController : Step1 (
	controller_model			text,
	controller_manufacturer			text,
	units			UnitsType,
	maximum_number_of_simultaneous_control_axes			double,
	maximum_total_number_of_control_feed_axes			double,
	maximum_total_number_of_control_spindles			double,
	minimum_linear_increment			double,
	minimum_angle_increment			double,
	maximum_number_of_multi_channel_control			double,
	cycle_functions			Text[?],
	interpolation_functions			Interpolation[?],
	look_ahead			int,
	adaptive_control			text,
	miscellaneous_controller_functions			text,
	program_memory_size			double,
	cutting_feed_rate_override			Double[?],
	rapid_traverse_override			Double[?],
	tool_compensation_functions			ToolCompensation[?],
	time_sampling			double,
	clock_frequency			double
)with version=true;


CREATE CLASS IF NOT EXISTS Unidirectional : Two5dMillingStrategy (
 	feed_direction			Direction,
	cutmode			CutmodeType
)with version=true;


CREATE CLASS IF NOT EXISTS RepresentationRelationship : Step1 (
    name    varchar,
	description			text,
	rep_1			Representation,
	rep_2			Representation
)with version=true;


CREATE CLASS IF NOT EXISTS Material : Step1 (
	standard_identifier			text,
	material_identifier			text,
	material_property			PropertyParameter[?]
)with version=true;


CREATE CLASS IF NOT EXISTS AxisCapability : Step1 (
	number_of_axes			double,
	number_of_simultanious_axes			double
)with version=true;


CREATE CLASS IF NOT EXISTS XorExpression : BinaryBooleanExpression (
   )with version=true;


CREATE CLASS IF NOT EXISTS KinematicJoint : Step1 (
	first_link			KinematicLink,
	second_link			KinematicLink
)with version=true;


CREATE CLASS IF NOT EXISTS MachineTool : Step1 (
	description			text
)with version=true;


CREATE CLASS IF NOT EXISTS SpindleCapability : Step1 (
	spindle_name			text,
	spindle_power			double,
	maximum_drive_speed			double
)with version=true;


CREATE CLASS IF NOT EXISTS MachiningTool : Step1 (
	its_id			text
)with version=true;


CREATE CLASS IF NOT EXISTS CompositeCurveSegment : Step1 (
	transition			TransitionCode,
	same_sense			boolean,
	parent_curve			Curve
)with version=true;


CREATE CLASS IF NOT EXISTS BarFeeder : ElementCapability (
 	minimum_stock_diameter			double,
	maximum_stock_diameter			double,
	maximum_stock_length			double
)with version=true;


CREATE CLASS IF NOT EXISTS Coolant : ElementCapability (
 	coolant_type			CoolantType,
	means_of_delivery			MeansOfCoolantDelivery,
	capacity_of_coolant_tank			double,
	coolant_weight			double
)with version=true;


CREATE CLASS IF NOT EXISTS DefinitionalRepresentation : Representation (
   )with version=true;


CREATE CLASS IF NOT EXISTS DescriptiveParameter : PropertyParameter (
 	descriptive_string			text
)with version=true;


CREATE CLASS IF NOT EXISTS BidirectionalMilling : Two5dMillingStrategy (
 	feed_direction			Direction,
	stepover_direction			LeftOrRight,
	its_stroke_connection_strategy			StrokeConnectionStrategy
)with version=true;


CREATE CLASS IF NOT EXISTS PlanarPocketBottomCondition : PocketBottomCondition (
   )with version=true;


CREATE CLASS IF NOT EXISTS NotExpression : UnaryBooleanExpression (
   )with version=true;


CREATE CLASS IF NOT EXISTS Parallel : ProgramStructure (
 	branches			Executable[?]
)with version=true;


CREATE CLASS IF NOT EXISTS Indexing : RotaryAxis (
 	index_increment			double
)with version=true;


CREATE CLASS IF NOT EXISTS IfStatement : ProgramStructure (
 	condition			BooleanExpression,
	true_branch			Executable,
	false_branch			Executable
)with version=true;


CREATE CLASS IF NOT EXISTS Selective : ProgramStructure (
 	its_elements			Executable[?]
)with version=true;


CREATE CLASS IF NOT EXISTS Bidirectional : Two5dMillingStrategy (
 	feed_direction			Direction,
	stepover_direction			LeftOrRight,
	its_stroke_connection_strategy			StrokeConnectionStrategy
)with version=true;


CREATE CLASS IF NOT EXISTS MillingToolDimension : Step1 (
	diameter			double,
	tool_top_angle			double,
	tool_circumference_angle			double,
	cutting_edge_length			double,
	edge_radius			double,
	edge_center_vertical			double,
	edge_center_horizontal			double
)with version=true;


CREATE CLASS IF NOT EXISTS SetMark : NcFunction (
   )with version=true;
   
CREATE CLASS IF NOT EXISTS OrientedPath : Path (
 	path_element			Path,
	orientation			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS Technology : Step1 (
	feedrate			double,
	feedrate_reference			ToolReferencePoint
)with version=true;


CREATE CLASS IF NOT EXISTS VertexLoop : Loop (
 	loop_vertex			Vertex
)with version=true;


CREATE CLASS IF NOT EXISTS ApprovalStatus : Step1 (
    name    varchar
)with version=true;


CREATE CLASS IF NOT EXISTS FiveAxesVarTiltYaw : ToolDirectionForMilling (
   )with version=true;


CREATE CLASS IF NOT EXISTS Chuck : ElementCapability (
 	minimum_part_diameter			double,
	maximum_part_diameter			double,
	number_of_jaws			double
)with version=true;


CREATE CLASS IF NOT EXISTS LimitsAndFits : Step1 (
	deviation			double,
--lzg
	grade			double,
	its_fitting_type			FittingType
)with version=true;


CREATE CLASS IF NOT EXISTS ContourSpiral : Two5dMillingStrategy (
 	rotation_direction			RotDirection,
	cutmode			CutmodeType
)with version=true;


CREATE CLASS IF NOT EXISTS ExplicitStrategy : Two5dMillingStrategy (
   )with version=true;


CREATE CLASS IF NOT EXISTS MillingTechnology : Technology (
 	cutspeed			double,
	spindle			double,
	feedrate_per_tooth			double,
	synchronize_spindle_with_feed			boolean,
	inhibit_feedrate_override			boolean,
	inhibit_spindle_override			boolean,
	its_adaptive_control			AdaptiveControl
)with version=true;


CREATE CLASS IF NOT EXISTS SuParameters : GeometricRepresentationItem (
 	a			double,
	alpha			double,
	b			double,
	beta			double,
	c			double,
	gamma			double
)with version=true;


CREATE CLASS IF NOT EXISTS ThroughProfileFloor : Step1 (
  )with version=true;


CREATE CLASS IF NOT EXISTS KinematicLinkRepresentationRelation : Step1 (
	topological_aspects			KinematicLink,
	geometric_aspects			KinematicLinkRepresentation
)with version=true;


CREATE CLASS IF NOT EXISTS Polyline : BoundedCurve (
 	points			CartesianPoint[?]
)with version=true;


CREATE CLASS IF NOT EXISTS KinematicLinkRepresentationAssociation : RepresentationRelationship (
 	representation_relationship_rep_1			KinematicLinkRepresentation
)with version=true;


CREATE CLASS IF NOT EXISTS MachineSize : Step1 (
	machine_length			double,
	machine_width			double,
	machine_height			double
)with version=true;


CREATE CLASS IF NOT EXISTS Collet : ElementCapability (
 	collet_type			text,
	minimum_part_diameter			double,
	maximum_part_diameter			double
)with version=true;


CREATE CLASS IF NOT EXISTS Address : Step1 (
	internal_location			text,
	street_number			text,
	street			text,
	postal_box			text,
	town			text,
--lzg
	region			text,
	postal_code			text,
	country			text,
	facsimile_number			text,
	telephone_number			text,
	electronic_mail_address			text,
	telex_number			text
)with version=true;


CREATE CLASS IF NOT EXISTS ProcessModel : Step1 (
	ini_data_file			text,
	its_type			text
)with version=true;


CREATE CLASS IF NOT EXISTS SpecificationUsageConstraint : Step1 (
	element			text,
	class_id			text
)with version=true;


CREATE CLASS IF NOT EXISTS Tolerances : Step1 (
	chordal_tolerance			double,
	scallop_height			double
)with version=true;

CREATE CLASS IF NOT EXISTS CuttingComponent : Step1 (
	tool_offset_length			double,
	its_material			Material,
	technological_data			CuttingEdgeTechnologicalData,
	expected_tool_life			double,
	its_technology			Technology
)with version=true;


CREATE CLASS IF NOT EXISTS IndexTable : NcFunction (
 	its_index			int
)with version=true;


CREATE CLASS IF NOT EXISTS LocalTime : Step1 (
	hour_component			int,
	minute_component			int,
	second_component			double,
	zone			CoordinatedUniversalTimeOffset
)with version=true;


CREATE CLASS IF NOT EXISTS CircularOffset : Step1 (
	angular_offset			double,
	index			int
)with version=true;


CREATE CLASS IF NOT EXISTS ContourBidirectional : Two5dMillingStrategy (
 	feed_direction			Direction,
	stepover_direction			LeftOrRight,
	rotation_direction			RotDirection,
	spiral_cutmode			CutmodeType
)with version=true;


CREATE CLASS IF NOT EXISTS PolyLoop : Loop (
 	polygon			CartesianPoint[?]
)with version=true;


CREATE CLASS IF NOT EXISTS MappedItem : RepresentationItem (
 	mapping_source			RepresentationMap,
	mapping_target			RepresentationItem
)with version=true;


CREATE CLASS IF NOT EXISTS Channel : Step1 (
	its_id			text
)with version=true;


CREATE CLASS IF NOT EXISTS ProcessModelList : Step1 (
	its_list			ProcessModel[?]
)with version=true;


CREATE CLASS IF NOT EXISTS EmissionProperty : Step1 (
	emission_type			text,
	weight			double
)with version=true;


CREATE CLASS IF NOT EXISTS FoundedItem : Step1 (
  )with version=true;


typedef if not exists TranslationalRangeMeasure = morph <
	LengthMeasure,
	UnlimitedRange
>;


typedef if not exists RotationalRangeMeasure = morph <
	PlaneAngleMeasure,
	UnlimitedRange
>;


typedef if not exists ProfileSelect = morph <
	ThroughProfileFloor,
	ProfileFloor
>;


typedef if not exists AngleOrLength = morph <
	PlaneAngleMeasure,
	LengthMeasure
>;


typedef if not exists FoundedItemSelect = morph <
	FoundedItem,
	RepresentationItem
>;


typedef if not exists VectorOrDirection = morph <
	Vector,
	Direction
>;


typedef if not exists TrimmingSelect = morph <
	CartesianPoint,
	ParameterValue
>;


typedef if not exists ToleranceSelect = morph <
	PlusMinusValue,
	LimitsAndFits
>;


typedef if not exists Rvalue = morph <
	NcConstant,
	NcVariable
>;


CREATE CLASS IF NOT EXISTS Specification : Step1 (
	constraint			SpecificationUsageConstraint[?],
	specification_id			text,
	specification_description			text,
	specification_class			text
)with version=true;


CREATE CLASS IF NOT EXISTS DeviceId : Step1 (
    id    varchar,
	model_name			text,
	serial_number			text,
	manufacturer			text,
	date_manufactured			CalendarDate
)with version=true;


CREATE CLASS IF NOT EXISTS MillingToolBody : ToolBody (
 	dimension			ToolDimension,
	number_of_teeth			int,
	hand_of_cut			Hand,
	coolant_through_tool			boolean,
	pilot_length			double
)with version=true;


CREATE CLASS IF NOT EXISTS Drill : MillingToolBody (
   )with version=true;


CREATE CLASS IF NOT EXISTS Reamer : MillingToolBody (
   )with version=true;


CREATE CLASS IF NOT EXISTS FreeformStrategy : Step1 (
	pathmode			PathmodeType,
	cutmode			CutmodeType,
	its_milling_tolerances			Tolerances,
	stepover			double
)with version=true;


CREATE CLASS IF NOT EXISTS LeadingLineStrategy : FreeformStrategy (
 	its_line			BoundedCurve
)with version=true;


CREATE CLASS IF NOT EXISTS ApplicationContextElement : Step1 (
    name    varchar,
	frame_of_reference			ApplicationContext
)with version=true;


CREATE CLASS IF NOT EXISTS LibraryContext : ApplicationContextElement (
 	library_reference			text
)with version=true;


CREATE CLASS IF NOT EXISTS Sensor : ElementCapability (
 	device_id			DeviceId
)with version=true;


CREATE CLASS IF NOT EXISTS VertexPoint : Vertex (
 	vertex_geometry			Point
)with version=true;


CREATE CLASS IF NOT EXISTS TVertex : VertexPoint (
 	north_link			TLink,
	west_link			TLink,
	south_link			TLink,
	east_link			TLink
)with version=true;


CREATE CLASS IF NOT EXISTS PlaneCcStrategy : FreeformStrategy (
 	its_plane_normal			Direction
)with version=true;

CREATE CLASS IF NOT EXISTS TNode : TopologicalRepresentationItem (
 	vertex			TVertex,
	control_point			RationalPoint
)with version=true;


CREATE CLASS IF NOT EXISTS TaperedReamer : Reamer (
 	taper_angle			double
)with version=true;


CREATE CLASS IF NOT EXISTS PlaneClStrategy : FreeformStrategy (
 	its_plane_normal			Direction
)with version=true;


CREATE CLASS IF NOT EXISTS Spindle : ElementCapability (
 	spindle_power			double,
	spindle_name			text,
	spindle_manufacturer			text,
	manufacturer_model_designation			text,
	range			SpindleRange[?]
)with version=true;


CREATE CLASS IF NOT EXISTS ToolSpindle : Spindle (
 	spindle_tool_holder_style_designation			text,
	coolant_through_spindle			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS PersonAndAddress : Step1 (
	its_person			Person,
	its_address			Address
)with version=true;


CREATE CLASS IF NOT EXISTS WorkSpindle : Spindle (
 	spindle_nose_designation			text,
	spindle_bore_diameter			double,
	round_bar_stock_diameter			double,
	through_hole_diameter			double,
	hex_bar_stock_capacity			double,
	chuck			Chuck
)with version=true;


CREATE CLASS IF NOT EXISTS MillingCutter : MillingToolBody (
   )with version=true;


CREATE CLASS IF NOT EXISTS DovetailMill : MillingCutter (
 	included_angle			double
)with version=true;


CREATE CLASS IF NOT EXISTS ApproachRetractStrategy : Step1 (
	tool_orientation			Direction
)with version=true;


CREATE CLASS IF NOT EXISTS AirStrategy : ApproachRetractStrategy (
   )with version=true;


CREATE CLASS IF NOT EXISTS ApRetractTangent : AirStrategy (
 	radius			double
)with version=true;


CREATE CLASS IF NOT EXISTS MachiningCapability : Step1 (
	capability			MachiningCapabilityProfile,
	machining_accuracy			text,
	description			text,
	machining_size			MachiningSize
)with version=true;


CREATE CLASS IF NOT EXISTS UserDefinedTool : MillingToolBody (
--lzg
 	identifier			text
)with version=true;


CREATE CLASS IF NOT EXISTS WorkTable : ElementCapability (
 	rotatable			boolean,
	workpiece_weight			double,
	fixture_style			FixtureStyle,
	chuck			Chuck,
	t_slot			TSlot
)with version=true;


CREATE CLASS IF NOT EXISTS CircularWorkTable : WorkTable (
 	table_diameter			double
)with version=true;


CREATE CLASS IF NOT EXISTS ThreeAxesTiltedTool : ToolDirectionForMilling (
 	its_tool_direction			Direction
)with version=true;


CREATE CLASS IF NOT EXISTS Assignment : ProgramStructure (
 	its_lvalue			NcVariable,
	its_rvalue			Rvalue
)with version=true;


CREATE CLASS IF NOT EXISTS BSplineSurface : BoundedSurface (
 	u_degree			int,
	v_degree			int,
	control_points_list			CartesianPoint[?],
	surface_form			BSplineSurfaceForm,
	u_closed			Logical,
	v_closed			Logical,
	self_intersect			Logical
)with version=true;


CREATE CLASS IF NOT EXISTS UniformSurface : BSplineSurface (
   )with version=true;


CREATE CLASS IF NOT EXISTS Placement : GeometricRepresentationItem (
--lzg
 	location			CartesianPoint
)with version=true;


CREATE CLASS IF NOT EXISTS Axis1Placement : Placement (
 	axis			Direction
)with version=true;


CREATE CLASS IF NOT EXISTS StandardMachiningProcess : Step1 (
	process_description			text,
	type_of_machining			text,
	power			double,
	electric_power			double,
	process_emission			EmissionProperty[?]
)with version=true;


CREATE CLASS IF NOT EXISTS BSplineCurve : BoundedCurve (
 	degree			int,
	control_points_list			CartesianPoint[?],
	curve_form			BSplineCurveForm,
	closed_curve			Logical,
	self_intersect			Logical
)with version=true;


CREATE CLASS IF NOT EXISTS RationalBSplineCurve : BSplineCurve (
 	weights_data			Double[?]
)with version=true;

CREATE CLASS IF NOT EXISTS ComparisonExpression : BooleanExpression (
 	operand1			NcVariable,
	operand2			Rvalue
)with version=true;


CREATE CLASS IF NOT EXISTS ComparisonGreater : ComparisonExpression (
   )with version=true;


CREATE CLASS IF NOT EXISTS ToolpathSpeed : Step1 (
--lzg
	speed			BSplineCurve
)with version=true;


CREATE CLASS IF NOT EXISTS Endmill : MillingCutter (
   )with version=true;


CREATE CLASS IF NOT EXISTS BallEndmill : Endmill (
   )with version=true;


CREATE CLASS IF NOT EXISTS FaceBound : TopologicalRepresentationItem (
 	bound			Loop,
	orientation			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS CenterDrill : MillingToolBody (
   )with version=true;


CREATE CLASS IF NOT EXISTS Tap : MillingToolBody (
   )with version=true;


CREATE CLASS IF NOT EXISTS CombinedDrillAndTap : Tap (
 	drill_length			double
)with version=true;


CREATE CLASS IF NOT EXISTS MillingMachineFunctions : MachineFunctions (
 	coolant			boolean,
	coolant_pressure			double,
	mist			boolean,
	through_spindle_coolant			boolean,
	through_pressure			double,
	axis_clamping			Text[?],
	chip_removal			boolean,
	oriented_spindle_stop			Direction,
	its_process_model			ProcessModelList,
	other_functions			PropertyParameter[?]
)with version=true;

CREATE CLASS IF NOT EXISTS Approval : Step1 (
	status_xxx			ApprovalStatus,
	level			text
)with version=true;

CREATE CLASS IF NOT EXISTS DateAndTime : Step1 (
	date_component			Date,
	time_component			LocalTime
)with version=true;


CREATE CLASS IF NOT EXISTS ProductContext : ApplicationContextElement (
 	discipline_type			text
)with version=true;


CREATE CLASS IF NOT EXISTS ToolBreakage : Sensor (
   )with version=true;


CREATE CLASS IF NOT EXISTS RightCircularCylinder : GeometricRepresentationItem (
 	position			Axis1Placement,
	height			double,
	radius			double
)with version=true;


CREATE CLASS IF NOT EXISTS TaperedTap : Tap (
 	taper_angle			double
)with version=true;


CREATE CLASS IF NOT EXISTS QuasiUniformSurface : BSplineSurface (
   )with version=true;


CREATE CLASS IF NOT EXISTS ComparisonLess : ComparisonExpression (
   )with version=true;


CREATE CLASS IF NOT EXISTS PartProbe : Sensor (
 	probe_type			ProbeType,
	dimensionality			SensorDimensionality,
	setting_time			double
)with version=true;


CREATE CLASS IF NOT EXISTS QuasiUniformCurve : BSplineCurve (
   )with version=true;


CREATE CLASS IF NOT EXISTS BullnoseEndmill : Endmill (
   )with version=true;


CREATE CLASS IF NOT EXISTS UnloadTool : NcFunction (
 	its_tool			MachiningTool
)with version=true;


CREATE CLASS IF NOT EXISTS PlungeStrategy : ApproachRetractStrategy (
   )with version=true;


CREATE CLASS IF NOT EXISTS PlungeHelix : PlungeStrategy (
 	radius			double,
	angle			double
)with version=true;

CREATE CLASS IF NOT EXISTS MachineElementRelationship : Step1 (
	class_xxx			text,
	former_element			MachineToolElement,
	latter_element			MachineToolElement
)with version=true;

CREATE CLASS IF NOT EXISTS SurfaceOfLinearExtrusion : SweptSurface (
 	extrusion_axis			Vector
)with version=true;


CREATE CLASS IF NOT EXISTS PlungeRamp : PlungeStrategy (
 	angle			double
)with version=true;


CREATE CLASS IF NOT EXISTS UniformCurve : BSplineCurve (
   )with version=true;


CREATE CLASS IF NOT EXISTS BezierCurve : BSplineCurve (
   )with version=true;


CREATE CLASS IF NOT EXISTS KinematicStructure : Step1 (
	joints			KinematicJoint[?]
)with version=true;


CREATE CLASS IF NOT EXISTS TrimmedCurve : BoundedCurve (
 	basis_curve			Curve,
	trim_1			TrimmingSelect[?],
	trim_2			TrimmingSelect[?],
	sense_agreement			boolean,
	master_representation			TrimmingPreference
)with version=true;


CREATE CLASS IF NOT EXISTS Pcurve : Curve (
 	basis_surface			Surface,
	reference_to_curve			DefinitionalRepresentation
)with version=true;


CREATE CLASS IF NOT EXISTS BoundedPcurve : Pcurve (
   )with version=true;


CREATE CLASS IF NOT EXISTS SpadeDrill : Drill (
   )with version=true;


CREATE CLASS IF NOT EXISTS ProductDefinitionContext : ApplicationContextElement (
 	life_cycle_stage			text
)with version=true;


CREATE CLASS IF NOT EXISTS RectangularWorkTable : WorkTable (
 	table_width			double,
	table_length			double
)with version=true;


CREATE CLASS IF NOT EXISTS ThreadedSpindle : ToolSpindle (
 	spindle_thread_diameter			double,
	spindle_thread_pitch			double,
	spindle_thread_form			text
)with version=true;


CREATE CLASS IF NOT EXISTS LoadTool : NcFunction (
 	its_tool			MachiningTool
)with version=true;


CREATE CLASS IF NOT EXISTS ThreadingTool : MillingToolBody (
   )with version=true;


CREATE CLASS IF NOT EXISTS ComparisonGreaterEqual : ComparisonExpression (
   )with version=true;


CREATE CLASS IF NOT EXISTS CompositeCurve : BoundedCurve (
 	segments			CompositeCurveSegment[?],
	self_intersect			Logical
)with version=true;


CREATE CLASS IF NOT EXISTS EnvironmentalEvaluation : Step1 (
	evaluation_name			text,
	power_in_idling			double,
	time_for_warming_up			double,
	power_for_standard_machining			StandardMachiningProcess[?]
)with version=true;


CREATE CLASS IF NOT EXISTS InProcessGeometry : Step1 (
	as_is			AdvancedBrepShapeRepresentation,
	to_be			AdvancedBrepShapeRepresentation,
	removal			AdvancedBrepShapeRepresentation
)with version=true;


CREATE CLASS IF NOT EXISTS WoodruffKeyseatMill : MillingCutter (
 	cutter_width			double
)with version=true;


CREATE CLASS IF NOT EXISTS WaitForMark : NcFunction (
 	its_channel			Channel
)with version=true;


CREATE CLASS IF NOT EXISTS KinematicPair : ItemDefinedTransformation (
 	joint			KinematicJoint
)with version=true;

CREATE CLASS IF NOT EXISTS ElementLinkAssociation : Step1 (
	element_xxx			MachineToolElement,
	machine_link			KinematicLink
)with version=true;

CREATE CLASS IF NOT EXISTS FaceOuterBound : FaceBound (
   )with version=true;


CREATE CLASS IF NOT EXISTS TwistDrill : Drill (
   )with version=true;


CREATE CLASS IF NOT EXISTS TaperedDrill : TwistDrill (
 	taper_angle			double
)with version=true;


CREATE CLASS IF NOT EXISTS CombinedDrillAndReamer : Reamer (
 	drill_length			double
)with version=true;


CREATE CLASS IF NOT EXISTS RevolutePair : KinematicPair (
   )with version=true;


CREATE CLASS IF NOT EXISTS SurfaceOfRevolution : SweptSurface (
 	axis_position			Axis1Placement
)with version=true;


CREATE CLASS IF NOT EXISTS Face : TopologicalRepresentationItem (
 	bounds			FaceBound[?]
)with version=true;


CREATE CLASS IF NOT EXISTS FaceSurface : Face (
 	face_geometry			Surface,
	same_sense			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS OrientedFace : Face (
 	face_element			Face,
	orientation			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS ComparisonNotEqual : ComparisonExpression (
   )with version=true;


CREATE CLASS IF NOT EXISTS ApRetractAngle : AirStrategy (
 	angle			double,
	travel_length			double
)with version=true;


CREATE CLASS IF NOT EXISTS Counterbore : MillingToolBody (
   )with version=true;


CREATE CLASS IF NOT EXISTS Product : Step1 (
    id    varchar,
    name    varchar,
	description			text,
	frame_of_reference			ProductContext[?]
)with version=true;


CREATE CLASS IF NOT EXISTS Countersink : MillingToolBody (
 	countersink_radius			double
)with version=true;


CREATE CLASS IF NOT EXISTS ComparisonEqual : ComparisonExpression (
   )with version=true;


CREATE CLASS IF NOT EXISTS PrismaticPair : KinematicPair (
   )with version=true;


CREATE CLASS IF NOT EXISTS TaperedSpindle : ToolSpindle (
 	spindle_taper_designation			text
)with version=true;


CREATE CLASS IF NOT EXISTS StraightSpindle : ToolSpindle (
 	spindle_bore_depth			double,
	spindle_bore_diameter			double
)with version=true;


CREATE CLASS IF NOT EXISTS ComparisonLessEqual : ComparisonExpression (
   )with version=true;


CREATE CLASS IF NOT EXISTS TSlotMill : MillingCutter (
 	cutting_thickness			double
)with version=true;


CREATE CLASS IF NOT EXISTS BoringTool : MillingToolBody (
   )with version=true;


CREATE CLASS IF NOT EXISTS BacksideCountersink : Countersink (
   )with version=true;


CREATE CLASS IF NOT EXISTS BezierSurface : BSplineSurface (
   )with version=true;


CREATE CLASS IF NOT EXISTS PlungeZigzag : PlungeStrategy (
 	angle			double,
	width			double
)with version=true;


CREATE CLASS IF NOT EXISTS RangeOfMotion : Step1 (
	axis_name			text,
	motion_range			AngleOrLength
)with version=true;


CREATE CLASS IF NOT EXISTS SphericalPair : KinematicPair (
   )with version=true;


CREATE CLASS IF NOT EXISTS BSplineCurveWithKnots : BSplineCurve (
 	knot_multiplicities			Int[?],
	knots			Double[?],
	knot_spec			KnotType
)with version=true;


CREATE CLASS IF NOT EXISTS ToolSetting : Sensor (
 	probe_type			ProbeType,
	measuring_radius			boolean,
	measuring_length			boolean,
	measure_time			double
)with version=true;


CREATE CLASS IF NOT EXISTS Axis2Placement3d : Placement (
 	axis			Direction,
	ref_direction			Direction
)with version=true;


CREATE CLASS IF NOT EXISTS RationalBSplineSurface : BSplineSurface (
 	weights_data			double[?]
)with version=true;

CREATE CLASS IF NOT EXISTS Installation : Step1 (
	weight			double,
	size_xxx			MachineSize,
	electrical			Electrical,
	air_pressure_requirement			double,
	water_flow_rate			double,
	hydraulics			Hydraulics
)with version=true;

CREATE CLASS IF NOT EXISTS TaperedEndmill : Endmill (
 	taper_angle			double
)with version=true;


CREATE CLASS IF NOT EXISTS CylindricalPair : KinematicPair (
   )with version=true;


CREATE CLASS IF NOT EXISTS PartialAreaDefinition : Step1 (
	effective_length			double,
	placement			Axis2Placement3d,
	maximum_length			double
)with version=true;


CREATE CLASS IF NOT EXISTS CuttingTool : MachiningTool (
 	its_tool_body			ToolBody,
	its_cutting_edge			CuttingComponent[?],
	overall_assembly_length			double
)with version=true;


CREATE CLASS IF NOT EXISTS BSplineSurfaceWithKnots : BSplineSurface (
 	u_multiplicities			Int[?],
	v_multiplicities			Int[?],
	u_knots			Double[?],
	v_knots			Double[?],
	knot_spec			KnotType
)with version=true;


CREATE CLASS IF NOT EXISTS TolerancedLengthMeasure : Step1 (
	theoretical_size			double,
	implicit_tolerance			ToleranceSelect
)with version=true;


CREATE CLASS IF NOT EXISTS ProductConceptContext : ApplicationContextElement (
 	market_segment_type			text
)with version=true;

CREATE CLASS IF NOT EXISTS SphericalHoleBottom : BlindBottomCondition (
 	radius_xxx			TolerancedLengthMeasure
)with version=true;

CREATE CLASS IF NOT EXISTS MillingCuttingTool : CuttingTool (
 	direction_for_spindle_orientation			Direction,
	tool_holder_diameter_for_spindle_orientation			double
)with version=true;


CREATE CLASS IF NOT EXISTS Pallet : WorkTable (
 	random_access			boolean,
	table_width			double,
	table_length			double,
	number_of_pallet			double,
	storage_configuration			PalletStorageConfiguration,
	pallet_change_time_minimum			double,
	pallet_change_time_maximum			double,
	pallet_type			text
)with version=true;


CREATE CLASS IF NOT EXISTS AdvancedFace : FaceSurface (
   )with version=true;


CREATE CLASS IF NOT EXISTS ThreadMill : MillingCutter (
   )with version=true;


CREATE CLASS IF NOT EXISTS TNodeV4 : TNode (
 	north_node			TNodeV4,
	west_node			TNodeV4,
	south_node			TNodeV4,
	east_node			TNodeV4
)with version=true;


CREATE CLASS IF NOT EXISTS SideMill : MillingCutter (
 	cutter_width			double
)with version=true;


CREATE CLASS IF NOT EXISTS TConnect : TopologicalRepresentationItem (
 	nodes			TNode[?]
)with version=true;


CREATE CLASS IF NOT EXISTS UvStrategy : FreeformStrategy (
 	forward_direction			Direction,
	sideward_direction			Direction
)with version=true;


CREATE CLASS IF NOT EXISTS Facemill : MillingCutter (
   )with version=true;


CREATE CLASS IF NOT EXISTS BacksideCounterbore : Counterbore (
   )with version=true;


CREATE CLASS IF NOT EXISTS Block : GeometricRepresentationItem (
 	position			Axis2Placement3d,
	x			double,
	y			double,
	z			double
)with version=true;


CREATE CLASS IF NOT EXISTS TFace : Face (
   )with version=true;


CREATE CLASS IF NOT EXISTS PlungeToolaxis : PlungeStrategy (
   )with version=true;


CREATE CLASS IF NOT EXISTS PairActuator : Step1 (
	actuated_pair			KinematicPair,
    name    varchar
)with version=true;


typedef if not exists ToolpathSpeedprofile = morph <
	ToolpathSpeed,
	PositiveRatioMeasure,
	SpeedName
>;


typedef if not exists PcurveOrSurface = morph <
	Pcurve,
	Surface
>;


typedef if not exists CurveWithSurfaceNormal = morph <
	BoundedPcurve,
	CurveWithNormalVector
>;


typedef if not exists BoundingGeometrySelect = morph <
	Block,
	RightCircularCylinder,
	AdvancedBrepShapeRepresentation
>;


typedef if not exists RestrictedAreaSelect = morph <
	BoundedSurface,
	BoundingGeometrySelect
>;


typedef if not exists RigidPlacement = morph <
	Axis2Placement3d,
	SuParameters
>;


CREATE CLASS IF NOT EXISTS TravelPath : Step1 (
	placement			Axis2Placement3d
)with version=true;

CREATE CLASS IF NOT EXISTS CircularPath : TravelPath (
 	radius_xxx			TolerancedLengthMeasure
)with version=true;

CREATE CLASS IF NOT EXISTS CompleteCircularPath : CircularPath (
   )with version=true;
   
CREATE CLASS IF NOT EXISTS Toolpath : Step1 (
	its_priority			boolean,
	its_type_xxx			ToolpathType,
	its_speed			ToolpathSpeedprofile,
	its_technology			Technology,
	its_machine_functions			MachineFunctions
)with version=true;

CREATE CLASS IF NOT EXISTS Trajectory : Toolpath (
 	its_direction			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS CutterContactTrajectory : Trajectory (
 	basiccurve			CurveWithSurfaceNormal,
	its_toolaxis			BoundedCurve,
	its_contact_type			ContactType
)with version=true;


CREATE CLASS IF NOT EXISTS ParameterisedPath : Toolpath (
   )with version=true;


CREATE CLASS IF NOT EXISTS Connector : ParameterisedPath (
   )with version=true;


CREATE CLASS IF NOT EXISTS Conic : Curve (
 	position			Axis2Placement3d
)with version=true;


CREATE CLASS IF NOT EXISTS Hyperbola : Conic (
 	semi_axis			double,
	semi_imag_axis			double
)with version=true;


CREATE CLASS IF NOT EXISTS ConicalHoleBottom : BlindBottomCondition (
 	tip_angle			double,
	tip_radius			TolerancedLengthMeasure
)with version=true;


CREATE CLASS IF NOT EXISTS RadiusedPocketBottomCondition : PocketBottomCondition (
 	floor_radius_center			CartesianPoint,
	floor_radius			TolerancedLengthMeasure
)with version=true;


CREATE CLASS IF NOT EXISTS FlatSlotEndType : SlotEndType (
 	corner_radius1			TolerancedLengthMeasure,
	corner_radius2			TolerancedLengthMeasure
)with version=true;


CREATE CLASS IF NOT EXISTS FlatWithRadiusHoleBottom : BlindBottomCondition (
 	corner_radius			TolerancedLengthMeasure
)with version=true;


CREATE CLASS IF NOT EXISTS Profile : Step1 (
	placement			Axis2Placement3d
)with version=true;


CREATE CLASS IF NOT EXISTS OpenProfile : Profile (
   )with version=true;


CREATE CLASS IF NOT EXISTS ConnectDirect : Connector (
   )with version=true;


CREATE CLASS IF NOT EXISTS ProductDefinitionFormation : Step1 (
    id    varchar,
	description			text,
	of_product			Product
)with version=true;


CREATE CLASS IF NOT EXISTS ClosedProfile : Profile (
   )with version=true;
   
CREATE CLASS IF NOT EXISTS NgonProfile : ClosedProfile (
 	diameter_xxx			TolerancedLengthMeasure,
	number_of_sides			int,
	circumscribed_or_across_flats			boolean
)with version=true;

CREATE CLASS IF NOT EXISTS ElementarySurface : Surface (
 	position			Axis2Placement3d
)with version=true;


CREATE CLASS IF NOT EXISTS SphericalSurface : ElementarySurface (
 	radius			double
)with version=true;


CREATE CLASS IF NOT EXISTS ConnectedFaceSet : TopologicalRepresentationItem (
 	cfs_faces			Face[?]
)with version=true;


CREATE CLASS IF NOT EXISTS OpenShell : ConnectedFaceSet (
   )with version=true;


CREATE CLASS IF NOT EXISTS OrientedOpenShell : OpenShell (
 	open_shell_element			OpenShell,
	orientation			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS RectangularClosedProfile : ClosedProfile (
 	profile_width			TolerancedLengthMeasure,
	profile_length			TolerancedLengthMeasure
)with version=true;

CREATE CLASS IF NOT EXISTS WoodruffSlotEndType : SlotEndType (
 	radius_xxx			TolerancedLengthMeasure
)with version=true;

CREATE CLASS IF NOT EXISTS ApproachLiftPath : ParameterisedPath (
 	fix_point			CartesianPoint,
	fix_point_dir			Direction
)with version=true;


CREATE CLASS IF NOT EXISTS ApLiftPathAngle : ApproachLiftPath (
 	angle			double,
	benddist			double
)with version=true;


CREATE CLASS IF NOT EXISTS SimplePairRange : Step1 (
	applies_to_pair			KinematicPair
)with version=true;


CREATE CLASS IF NOT EXISTS SphericalPairRange : SimplePairRange (
 	simple_pair_range_applies_to_pair			SphericalPair,
	lower_limit_yaw			RotationalRangeMeasure,
	upper_limit_yaw			RotationalRangeMeasure,
	lower_limit_pitch			RotationalRangeMeasure,
	upper_limit_pitch			RotationalRangeMeasure,
	lower_limit_roll			RotationalRangeMeasure,
	upper_limit_roll			RotationalRangeMeasure
)with version=true;

CREATE CLASS IF NOT EXISTS LinearPath : TravelPath (
 	distance			TolerancedLengthMeasure,
	its_direction_xxx			Direction
)with version=true;

CREATE CLASS IF NOT EXISTS Parabola : Conic (
 	focal_dist			double
)with version=true;

CREATE CLASS IF NOT EXISTS PositioningCapability : Step1 (
	maximum_range_of_motion_xxx			RangeOfMotion[?],
	maximum_displacement_error_of_linear_axis			double,
	maximum_repeatability_error_of_linear_axis			double
)with version=true;

CREATE CLASS IF NOT EXISTS CutterLocationTrajectory : Trajectory (
 	basiccurve			BoundedCurve,
	its_toolaxis			BoundedCurve,
	surface_normal			BoundedCurve
)with version=true;


CREATE CLASS IF NOT EXISTS GeneralClosedProfile : ClosedProfile (
 	closed_profile_shape			BoundedCurve
)with version=true;


CREATE CLASS IF NOT EXISTS GeneralProfileFloor : ProfileFloor (
 	floor			Face
)with version=true;

CREATE CLASS IF NOT EXISTS CircularClosedProfile : ClosedProfile (
 	diameter_xxx			TolerancedLengthMeasure
)with version=true;

CREATE CLASS IF NOT EXISTS LinearProfile : OpenProfile (
 	profile_length			NumericParameter
)with version=true;


CREATE CLASS IF NOT EXISTS TEdge : Edge (
 	left_face			TFace,
	right_face			TFace,
	on_boundary			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS Ellipse : Conic (
 	semi_axis_1			double,
	semi_axis_2			double
)with version=true;


CREATE CLASS IF NOT EXISTS GeneralPath : TravelPath (
 	swept_path			BoundedCurve
)with version=true;

CREATE CLASS IF NOT EXISTS SquareUProfile : OpenProfile (
 	width_xxx			TolerancedLengthMeasure,
	first_radius			TolerancedLengthMeasure,
	first_angle			double,
	second_radius			TolerancedLengthMeasure,
	second_angle			double
)with version=true;

CREATE CLASS IF NOT EXISTS TEdgeCondition : TopologicalRepresentationItem (
 	edge			TEdge,
	boundary_condition			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS Plane : ElementarySurface (
   )with version=true;

CREATE CLASS IF NOT EXISTS Circle : Conic (
 	radius			double
)with version=true;

CREATE CLASS IF NOT EXISTS GeneralProfile : OpenProfile (
 	its_profile			BoundedCurve
)with version=true;


CREATE CLASS IF NOT EXISTS VeeProfile : OpenProfile (
 	profile_radius			TolerancedLengthMeasure,
	profile_angle			double,
	tilt_angle			double
)with version=true;


CREATE CLASS IF NOT EXISTS Feedstop : Toolpath (
 	dwell			double
)with version=true;


CREATE CLASS IF NOT EXISTS AxisTrajectory : Trajectory (
 	axis_list			Text[?],
	commands			BoundedCurve[?]
)with version=true;


CREATE CLASS IF NOT EXISTS MachineToolSpecification : MachineTool (
 	machine_class			MachineClass,
	device_id			DeviceId,
	machining_capabilities			MachiningCapability[?],
	measuring_capability			MeasuringCapability,
--lzg
	location			Locator,
	installation			Installation,
	nc_controller_information			NcController,
	environment			EnvironmentalEvaluation,
	its_elements			MachineToolElement[?]
)with version=true;


CREATE CLASS IF NOT EXISTS ClosedShell : ConnectedFaceSet (
   )with version=true;


CREATE CLASS IF NOT EXISTS PartialCircularPath : CircularPath (
 	sweep_angle			double
)with version=true;


CREATE CLASS IF NOT EXISTS ConnectSecplane : Connector (
 	up_dir			Direction,
	down_dir			Direction
)with version=true;


CREATE CLASS IF NOT EXISTS ApLiftPathTangent : ApproachLiftPath (
 	radius			double
)with version=true;


CREATE CLASS IF NOT EXISTS ToolpathList : Step1 (
	its_list			Toolpath[?]
)with version=true;

CREATE CLASS IF NOT EXISTS DiameterTaper : Step1 (
	final_diameter			TolerancedLengthMeasure
)with version=true;


CREATE CLASS IF NOT EXISTS ProductDefinition : Step1 (
    id    varchar,
	description			text,
	formation			ProductDefinitionFormation,
	frame_of_reference			ProductDefinitionContext
)with version=true;


CREATE CLASS IF NOT EXISTS PrismaticPairRange : SimplePairRange (
 	simple_pair_range_applies_to_pair			PrismaticPair,
	lower_limit_actual_translation			TranslationalRangeMeasure,
	upper_limit_actual_translation			TranslationalRangeMeasure
)with version=true;

CREATE CLASS IF NOT EXISTS Workpiece : Step1 (
	its_id			text,
	its_material			Material,
	global_tolerance			double,
	its_rawpiece			Workpiece,
	its_geometry			AdvancedBrepShapeRepresentation,
	its_bounding_geometry			BoundingGeometrySelect,
	clamping_positions			CartesianPoint[?]
)with version=true;

CREATE CLASS IF NOT EXISTS WorkpieceSetup : Step1 (
	its_workpiece			Workpiece,
	its_origin			Axis2Placement3d,
	its_offset			OffsetVector,
	its_restricted_area			RestrictedAreaSelect,
	its_instructions			SetupInstruction[?]
)with version=true;

CREATE CLASS IF NOT EXISTS RevolutePairRange : SimplePairRange (
 	simple_pair_range_applies_to_pair			RevolutePair,
	lower_limit_actual_rotation			RotationalRangeMeasure,
	upper_limit_actual_rotation			RotationalRangeMeasure
)with version=true;


CREATE CLASS IF NOT EXISTS OrientedClosedShell : ClosedShell (
 	closed_shell_element			ClosedShell,
	orientation			boolean
)with version=true;

CREATE CLASS IF NOT EXISTS RoundedUProfile : OpenProfile (
 	width_xxx			TolerancedLengthMeasure
)with version=true;

CREATE CLASS IF NOT EXISTS TeeProfile : OpenProfile (
 	first_angle			double,
	second_angle			double,
	cross_bar_width			TolerancedLengthMeasure,
	cross_bar_depth			TolerancedLengthMeasure,
	radius_xxx			TolerancedLengthMeasure,
	width_xxx			TolerancedLengthMeasure,
	first_offset			TolerancedLengthMeasure,
	second_offset			TolerancedLengthMeasure
)with version=true;

CREATE CLASS IF NOT EXISTS CylindricalSurface : ElementarySurface (
 	radius			double
)with version=true;

CREATE CLASS IF NOT EXISTS AlongPath : ApproachRetractStrategy (
 	path_xxx			ToolpathList
)with version=true;

CREATE CLASS IF NOT EXISTS MachineToolRequirements : MachineTool (
 	number_of_tools_in_tool_magazine			double,
	machining			MachiningCapability[?],
	spindles			SpindleCapability[?],
	positioning			PositioningCapability,
	axis			AxisCapability,
	touch_probing			MeasuringCapability,
	automatically_pallet_changeable			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS ConicalSurface : ElementarySurface (
 	radius			double,
	semi_angle			double
)with version=true;

CREATE CLASS IF NOT EXISTS PartialCircularProfile : OpenProfile (
 	radius_xxx			TolerancedLengthMeasure,
	sweep_angle			double
)with version=true;

typedef if not exists ReversibleTopologyItem = morph <
	Edge,
	Path,
	Face,
	FaceBound,
	ClosedShell,
	OpenShell
>;


typedef if not exists Shell = morph <
	OpenShell,
	ClosedShell
>;


typedef if not exists TaperSelect = morph <
	DiameterTaper,
	AngleTaper
>;


CREATE CLASS IF NOT EXISTS Operation : Step1 (
	its_toolpath			ToolpathList,
	its_tool_direction			ToolDirection
)with version=true;


CREATE CLASS IF NOT EXISTS MachiningOperation : Operation (
 	its_id			text,
	retract_plane			double,
	start_point			CartesianPoint,
	its_tool			MachiningTool,
	its_technology			Technology,
	its_machine_functions			MachineFunctions
)with version=true;


CREATE CLASS IF NOT EXISTS MillingMachiningOperation : MachiningOperation (
 	overcut_length			double
)with version=true;

CREATE CLASS IF NOT EXISTS DrillingTypeOperation : MillingMachiningOperation (
 	cutting_depth			double,
	previous_diameter			double,
	dwell_time_bottom			double,
	feed_on_retract			double,
	its_machining_strategy			DrillingTypeStrategy
)with version=true;


CREATE CLASS IF NOT EXISTS BoringOperation : DrillingTypeOperation (
 	spindle_stop_at_bottom			boolean,
	depth_of_testcut			double,
	waiting_position			CartesianPoint
)with version=true;


CREATE CLASS IF NOT EXISTS Boring : BoringOperation (
   )with version=true;


CREATE CLASS IF NOT EXISTS DrillingOperation : DrillingTypeOperation (
   )with version=true;


CREATE CLASS IF NOT EXISTS CounterSinking : DrillingOperation (
   )with version=true;


CREATE CLASS IF NOT EXISTS ManifoldSolidBrep : SolidModel (
 	outer			ClosedShell
)with version=true;


CREATE CLASS IF NOT EXISTS FacetedBrep : ManifoldSolidBrep (
   )with version=true;


CREATE CLASS IF NOT EXISTS ManufacturingFeature : Step1 (
	its_id			text,
	its_workpiece			Workpiece,
	its_operations			MachiningOperation[?]
)with version=true;


CREATE CLASS IF NOT EXISTS Region : ManufacturingFeature (
 	feature_placement			Axis2Placement3d
)with version=true;


CREATE CLASS IF NOT EXISTS RegionProjection : Region (
 	proj_curve			BoundedCurve,
	proj_dir			Direction,
	depth			TolerancedLengthMeasure
)with version=true;

CREATE CLASS IF NOT EXISTS Workingstep : Executable (
 	its_secplane			ElementarySurface
)with version=true;


CREATE CLASS IF NOT EXISTS TouchProbing : Workingstep (
 	measured_offset			NcVariable,
	its_toolpath			ToolpathList,
	its_tool_direction			ToolDirection
)with version=true;


CREATE CLASS IF NOT EXISTS ToolProbing : TouchProbing (
 	offset			CartesianPoint,
	max_wear			double,
	its_tool			MachiningTool
)with version=true;


CREATE CLASS IF NOT EXISTS Tapping : DrillingTypeOperation (
 	compensation_chuck			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS Two5dManufacturingFeature : ManufacturingFeature (
 	feature_placement			Axis2Placement3d
)with version=true;


CREATE CLASS IF NOT EXISTS MachiningFeature : Two5dManufacturingFeature (
 	depth			ElementarySurface
)with version=true;


CREATE CLASS IF NOT EXISTS ProfileFeature : MachiningFeature (
 	profile_swept_shape			LinearPath
)with version=true;


CREATE CLASS IF NOT EXISTS ShapeProfile : ProfileFeature (
 	floor_condition			ProfileSelect,
	removal_direction			Direction
)with version=true;


CREATE CLASS IF NOT EXISTS RectangularClosedShapeProfile : ShapeProfile (
 	closed_boundary			RectangularClosedProfile
)with version=true;


CREATE CLASS IF NOT EXISTS RectangularOpenShapeProfile : ShapeProfile (
 	open_boundary			SquareUProfile
)with version=true;

CREATE CLASS IF NOT EXISTS ToolpathFeature : MachiningFeature (
   )with version=true;


CREATE CLASS IF NOT EXISTS ToolLengthProbing : ToolProbing (
   )with version=true;


CREATE CLASS IF NOT EXISTS Boss : MachiningFeature (
 	its_boundary			ClosedProfile,
	slope			double
)with version=true;


CREATE CLASS IF NOT EXISTS MachinedSurface : Step1 (
	its_machining_feature			MachiningFeature,
	surface_element			BottomOrSide
)with version=true;


CREATE CLASS IF NOT EXISTS MultistepDrilling : DrillingOperation (
 	retract_distance			double,
	first_depth			double,
	depth_of_step			double,
	dwell_time_step			double
)with version=true;


CREATE CLASS IF NOT EXISTS Thread : MachiningFeature (
 	partial_profile			PartialAreaDefinition,
	applied_shape			MachiningFeature[?],
	inner_or_outer_thread			boolean,
	qualifier			DescriptiveParameter,
	fit_class			DescriptiveParameter,
	form			DescriptiveParameter,
	major_diameter			double,
	number_of_threads			NumericParameter,
	thread_hand			DescriptiveParameter
)with version=true;


CREATE CLASS IF NOT EXISTS DefinedThread : Thread (
 	pitch_diameter			double,
	minor_diameter			double,
	crest			double
)with version=true;


CREATE CLASS IF NOT EXISTS ToolRadiusProbing : ToolProbing (
   )with version=true;


CREATE CLASS IF NOT EXISTS BackBoring : DrillingTypeOperation (
   )with version=true;


CREATE CLASS IF NOT EXISTS CircularClosedShapeProfile : ShapeProfile (
 	closed_boundary			CircularClosedProfile
)with version=true;


CREATE CLASS IF NOT EXISTS MachiningWorkingstep : Workingstep (
 	its_feature			ManufacturingFeature,
	its_operation			MachiningOperation,
	its_effect			InProcessGeometry
)with version=true;

CREATE CLASS IF NOT EXISTS TransitionFeature : ManufacturingFeature (
 	first_feature			MachiningFeature,
	second_feature			MachiningFeature
)with version=true;

CREATE CLASS IF NOT EXISTS EdgeRound : TransitionFeature (
 	radius_xxx			TolerancedLengthMeasure,
	first_offset_amount			TolerancedLengthMeasure,
	second_offset_amount			TolerancedLengthMeasure
)with version=true;

CREATE CLASS IF NOT EXISTS SphericalCap : MachiningFeature (
 	internal_angle			NumericParameter,
	radius_xxx			NumericParameter
)with version=true;

CREATE CLASS IF NOT EXISTS MillingTypeOperation : MillingMachiningOperation (
 	approach			ApproachRetractStrategy,
	retract			ApproachRetractStrategy
)with version=true;


CREATE CLASS IF NOT EXISTS Two5dMillingOperation : MillingTypeOperation (
 	its_machining_strategy			Two5dMillingStrategy
)with version=true;


CREATE CLASS IF NOT EXISTS BottomAndSideMilling : Two5dMillingOperation (
 	axial_cutting_depth			double,
	radial_cutting_depth			double,
	allowance_side			double,
	allowance_bottom			double
)with version=true;


CREATE CLASS IF NOT EXISTS BottomAndSideFinishMilling : BottomAndSideMilling (
   )with version=true;


CREATE CLASS IF NOT EXISTS WorkpieceCompleteProbing : TouchProbing (
 	its_workpiece			Workpiece,
	probing_distance			TolerancedLengthMeasure,
	its_probe			TouchProbe,
	computed_offset			OffsetVector
)with version=true;


CREATE CLASS IF NOT EXISTS GeneralOutsideProfile : ProfileFeature (
 	feature_boundary			Profile
)with version=true;


CREATE CLASS IF NOT EXISTS PlaneMilling : Two5dMillingOperation (
 	axial_cutting_depth			double,
	allowance_bottom			double
)with version=true;


CREATE CLASS IF NOT EXISTS PlaneRoughMilling : PlaneMilling (
   )with version=true;


CREATE CLASS IF NOT EXISTS SideMilling : Two5dMillingOperation (
 	axial_cutting_depth			double,
	radial_cutting_depth			double,
	allowance_side			double
)with version=true;


CREATE CLASS IF NOT EXISTS SideFinishMilling : SideMilling (
   )with version=true;


CREATE CLASS IF NOT EXISTS Pocket : MachiningFeature (
 	its_boss			Boss[?],
	slope			double,
	bottom_condition			PocketBottomCondition,
	planar_radius			TolerancedLengthMeasure,
	orthogonal_radius			TolerancedLengthMeasure
)with version=true;


CREATE CLASS IF NOT EXISTS ClosedPocket : Pocket (
 	feature_boundary			ClosedProfile
)with version=true;


CREATE CLASS IF NOT EXISTS TImage : BoundedSurface (
 	faces			TFace[?],
	links			TLink[?],
	edges			TEdge[?],
	vertices			TVertex[?]
)with version=true;


CREATE CLASS IF NOT EXISTS ProductDefinitionRelationship : Step1 (
    id    varchar,
    name    varchar,
	description			text,
	relating_product_definition			ProductDefinition,
	related_product_definition			ProductDefinition
)with version=true;


CREATE CLASS IF NOT EXISTS Slot : MachiningFeature (
 	course_of_travel			TravelPath,
	swept_shape			OpenProfile,
	end_conditions			SlotEndType[?]
)with version=true;

CREATE CLASS IF NOT EXISTS PlanarProfileFloor : ProfileFloor (
 	floor			Plane
)with version=true;


CREATE CLASS IF NOT EXISTS Reaming : BoringOperation (
   )with version=true;


CREATE CLASS IF NOT EXISTS FreeformOperation : MillingTypeOperation (
 	its_machining_strategy			FreeformStrategy
)with version=true;


CREATE CLASS IF NOT EXISTS TopologicalRegion : Region (
    name    varchar,
	cfs_faces			Face[?]
)with version=true;


CREATE CLASS IF NOT EXISTS OpenPocket : Pocket (
 	open_boundary			OpenProfile,
	wall_boundary			OpenProfile
)with version=true;


CREATE CLASS IF NOT EXISTS Drilling : DrillingOperation (
   )with version=true;


CREATE CLASS IF NOT EXISTS CenterDrilling : DrillingOperation (
   )with version=true;


CREATE CLASS IF NOT EXISTS SurfaceTextureParameter : Step1 (
	its_value			double,
	parameter_name			text,
	measuring_method			text,
	parameter_index			text,
	applied_surfaces			MachinedSurface[?]
)with version=true;


CREATE CLASS IF NOT EXISTS Step1 : MachiningFeature (
 	open_boundary			LinearPath,
	wall_boundary			VeeProfile,
	its_boss			Boss[?]
)with version=true;


CREATE CLASS IF NOT EXISTS ThreadDrilling : DrillingTypeOperation (
 	helical_movement_on_forward			boolean
)with version=true;


CREATE CLASS IF NOT EXISTS ReplicateFeature : Two5dManufacturingFeature (
 	replicate_base_feature			Two5dManufacturingFeature
)with version=true;


CREATE CLASS IF NOT EXISTS CircularPattern : ReplicateFeature (
 	angle_increment			double,
	number_of_feature			int,
	relocated_base_feature			CircularOffset[?],
	missing_base_feature			CircularOmit[?],
	base_feature_diameter			TolerancedLengthMeasure,
	base_feature_rotation			double
)with version=true;


CREATE CLASS IF NOT EXISTS GeneralPocketBottomCondition : PocketBottomCondition (
 	shape			Region
)with version=true;


CREATE CLASS IF NOT EXISTS CatalogueThread : Thread (
 	documentation			Specification
)with version=true;


CREATE CLASS IF NOT EXISTS RapidMovement : Workingstep (
 	its_toolpath			ToolpathList,
	its_tool_direction			ToolDirection
)with version=true;

CREATE CLASS IF NOT EXISTS RoundHole : MachiningFeature (
 	diameter_xxx			TolerancedLengthMeasure,
	change_in_diameter			TaperSelect,
	bottom_condition			HoleBottomCondition
)with version=true;

CREATE CLASS IF NOT EXISTS TSplineSurface : BoundedSurface (
 	s_degree			int,
	t_degree			int,
	force_bezier_end_condition			boolean,
	image			TImage,
	connect			TConnect,
	pointset			TPointset
)with version=true;

CREATE CLASS IF NOT EXISTS WorkpieceProbing : TouchProbing (
 	start_position			Axis2Placement3d,
	its_workpiece			Workpiece,
	its_direction_xxx			Direction,
	expected_value			TolerancedLengthMeasure,
	its_probe			TouchProbe
)with version=true;

CREATE CLASS IF NOT EXISTS RoundedEnd : MachiningFeature (
 	course_of_travel			LinearPath,
	partial_circular_boundary			PartialCircularProfile
)with version=true;


CREATE CLASS IF NOT EXISTS Setup : Step1 (
	its_id			text,
	its_origin			Axis2Placement3d,
	its_secplane			ElementarySurface,
	its_workpiece_setup			WorkpieceSetup[?]
)with version=true;


CREATE CLASS IF NOT EXISTS PlanarFace : MachiningFeature (
 	course_of_travel			LinearPath,
	removal_boundary			LinearProfile,
	face_boundary			ClosedProfile,
	its_boss			Boss[?]
)with version=true;


CREATE CLASS IF NOT EXISTS PartialCircularShapeProfile : ShapeProfile (
 	open_boundary			PartialCircularProfile
)with version=true;


CREATE CLASS IF NOT EXISTS ReturnHome : RapidMovement (
   )with version=true;


CREATE CLASS IF NOT EXISTS RegionSurfaceList : Region (
 	surface_list			BoundedSurface[?]
)with version=true;


CREATE CLASS IF NOT EXISTS Chamfer : TransitionFeature (
 	angle_to_plane			double,
	first_offset_amount			TolerancedLengthMeasure
)with version=true;


CREATE CLASS IF NOT EXISTS SideRoughMilling : SideMilling (
   )with version=true;


CREATE CLASS IF NOT EXISTS PlaneFinishMilling : PlaneMilling (
   )with version=true;
   
CREATE CLASS IF NOT EXISTS RectangularPattern : ReplicateFeature (
 	spacing			TolerancedLengthMeasure,
	its_direction_xxx			Direction,
	number_of_rows			int,
	number_of_columns			int,
	row_spacing			TolerancedLengthMeasure,
	row_layout_direction			Direction,
	relocated_base_feature			RectangularOffset[?],
	missing_base_feature			RectangularOmit[?]
)with version=true;

CREATE CLASS IF NOT EXISTS GeneralShapeProfile : ShapeProfile (
 	profile_boundary			Profile
)with version=true;


CREATE CLASS IF NOT EXISTS BottomAndSideRoughMilling : BottomAndSideMilling (
   )with version=true;


CREATE CLASS IF NOT EXISTS GeneralPattern : ReplicateFeature (
 	replicate_locations			Axis2Placement3d[?]
)with version=true;


typedef if not exists CharacterizedProductDefinition = morph <
	ProductDefinition,
	ProductDefinitionRelationship
>;


typedef if not exists CompoundFeatureSelect = morph <
	MachiningFeature,
	TransitionFeature
>;


CREATE CLASS IF NOT EXISTS Workplan : ProgramStructure (
 	its_elements			Executable[?],
	its_channel			Channel,
	its_setup			Setup,
	its_effect			InProcessGeometry
)with version=true;


CREATE CLASS IF NOT EXISTS CompoundFeature : Two5dManufacturingFeature (
 	elements			CompoundFeatureSelect[?]
)with version=true;


CREATE CLASS IF NOT EXISTS CountersunkHole : CompoundFeature (
   )with version=true;


CREATE CLASS IF NOT EXISTS WorkplanPhysicalResourceAssociation : Step1 (
	workplan_of_resource			Workplan,
	physical_resource			MachineToolRequirements
)with version=true;


CREATE CLASS IF NOT EXISTS Project : Step1 (
	its_id			text,
	main_workplan			Workplan,
	its_workpieces			Workpiece[?],
	its_owner			PersonAndAddress,
	its_release			DateAndTime,
	its_status			Approval
)with version=true;


CREATE CLASS IF NOT EXISTS CounterboreHole : CompoundFeature (
   )with version=true;


CREATE CLASS IF NOT EXISTS ProjectPhysicalResourceAssociation : Step1 (
	project_of_resource			Project,
	physical_resource			MachineToolRequirements
)with version=true;

typedef if not exists ShapeDefinition = morph <
	ProductDefinitionShape,
	ShapeAspect,
	ShapeAspectRelationship
>;

typedef if not exists CharacterizedDefinition = morph <
	CharacterizedObject,
	CharacterizedProductDefinition,
	ShapeDefinition
>;

typedef if not exists ReversibleTopology = morph <
	ReversibleTopologyItem,
	ListOfReversibleTopologyItem,
	SetOfReversibleTopologyItem
>;

CREATE CLASS IF NOT EXISTS PropertyDefinition : Step1 (
    name    varchar,
	description			text,
	definition			CharacterizedDefinition
)with version=true;

CREATE CLASS IF NOT EXISTS KinematicPropertyDefinition : PropertyDefinition (
 	ground_definition			CharacterizedDefinition
)with version=true;

CREATE CLASS IF NOT EXISTS Mechanism : Step1 (
	structure_definition			KinematicStructure,
	base			KinematicLink,
	containing_property			KinematicPropertyDefinition
)with version=true;

CREATE CLASS IF NOT EXISTS MachineKinematicAssociation : Step1 (
	machine			MachineToolSpecification,
	kinematics			Mechanism
)with version=true;

CREATE CLASS IF NOT EXISTS ProductDefinitionShape : PropertyDefinition (
   )with version=true;
   
CREATE CLASS IF NOT EXISTS ShapeAspect : Step1 (
    name    varchar,
	description			text,
	of_shape			ProductDefinitionShape,
	product_definitional			Logical
)with version=true;

CREATE CLASS IF NOT EXISTS ShapeAspectRelationship : Step1 (
    name    varchar,
	description			text,
	relating_shape_aspect			ShapeAspect,
	related_shape_aspect			ShapeAspect
)with version=true;
