#!/usr/bin/python #author: Bryan Bishop #url: http://heybryan.org/ #date: 2010-06-23 #license: gpl2+ #url: http://designfiles.org/~bryan/step_importer.py #url: http://designfiles.org/~bryan/step.py #url: http://designfiles.org/~bryan/chats/step_problem.log #see: /home/kanzure/local/step/parts/web.archive.org/web/www.nist.gov/sc4/step/parts/part214/cd2/p214unx.exp #see: /home/kanzure/local/step/parts/web.archive.org/web/www.nist.gov/sc4/step/parts/part203/current/part203.exp ################################ # FIXME: most classes inherit from some other class # # parameters should also be inherited so that the first parameter of # the supertype is the first parameter of the current type. # # here's how i was planning on doing inheritance: # class SomethingSomethingLine(StepLine): # new_parameters = {"hello": str} # parameters = deepcopy(StepLine.parameters) # parameters.update(new_parameters) # # FIXME: parameters = {"something": (list, Blah123)} # means that 'something' can be a list with elements of type Blah123 # but apparently, in STEP, it could be just Blah123 that gets passed # .. without the list part. # to make matters worse, STEP sometimes also specifies how many list elements there can be (2 to 3, max 5, etc.) # .. so there needs to be a way to account for this (this has been done now) # #this is just a custom ISO 10303-21 STEP exporter #the real way to do this is to use the SDAI library from NIST #however, there are advantages to this approach (like maintainability) ################################ #cd ~/local/opencascade/OpenCASCADE6.3.0/ros/src/RWStepShape/ #grep -H -r "(num," * | less import unittest from operator import itemgetter from string import join from copy import copy, deepcopy import math Unknown = None debug = True raises = False #for now these are just going to be constants step_file_header = """ISO-10303-21; HEADER; FILE_DESCRIPTION(('pySTEP model'),'2;1'); FILE_NAME('pySTEP model', '2010-06-21T10:04:18', ('Author'), ('your name here'), 'pySTEP alpha', 'pySTEP alpha', 'Unknown'); FILE_SCHEMA(('AUTOMOTIVE_DESIGN_CC2 { 1 2 10303 214 -1 1 5 4 }')); ENDSEC; DATA;""" step_file_footer = """ENDSEC; END-ISO-10303-21;""" def isnumeric(some_value): try: int(some_value) return True except ValueError: return False #def Literal(blah): return "%s" % (str(blah)) class Literal: def __init__(self, value): self.value = value class StepList(list): '''this provides a way for export_step to deal with lists found in step_objects and to print out "lists" in ISO 10303-21 format example: say that step_objects either directly or indirectly contains a reference to this line: line_28 = [ LengthUnit(), NamedUnit(Literal("*")), SiUnit(Literal(".MILLI."), Literal(".METRE.")) ] on output, it should look like this: #28 = (LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.)) ''' line_number = None hidden = False #a hack used in export_step def right_hand_side(self): return_value = "(" for entity in self: if isinstance(entity, StepElement) or isinstance(entity, StepList): return_value = return_value + " " + entity.right_hand_side() else: if isinstance(entity, Literal): return_value = return_value + " %s" % (str(entity.value)) else: try: #try to convert it to a float if possible my_float = float(str(entity)) return_value = return_value + " %E" % (my_float) except ValueError: if isnumeric(entity): #assuming it is a string return_value = return_value + " %d." % (entity) else: return_value = return_value + " " + str(entity) #FIXME: this doesn't account for booleans and all the weird types (see the other right_hand_side) return_value = return_value + ")" return return_value def __repr__(self): '''spits out a string representation of this object in valid STEP''' if hasattr(self, "line_number"): return "#" + str(self.line_number) + " = " + str(self.right_hand_side()) else: return str(self.right_hand_side()) def export_step(step_objects): '''given a list of STEP objects, do a few things: (1) number all of the objects (2) spit out the objects in correct numerical order ''' original_step_objects = copy(step_objects) #keep a copy of the list numbered_lines = 1 #start numbering lines at n=1 while True: if len(step_objects) == 0: break step_object = step_objects.pop() step_object.line_number = numbered_lines print "giving a line number %s to %s" % (numbered_lines, step_object.__class__.__name__) numbered_lines = numbered_lines + 1 if hasattr(step_object, "parameters"): for attr_name in step_object.parameters.keys(): if hasattr(step_object, attr_name): #grab the value of the attribute attr_val = getattr(step_object, attr_name) #print "type(step_object) = " + str(type(step_object)) + " --- type(attr_val) = " + str(type(attr_val)) #check if it is an instance of StepElement if isinstance(attr_val, StepElement): #throw it into the list for processing if not attr_val in original_step_objects: original_step_objects.append(attr_val) #add it to the list (refactor this, move it down) step_objects.append(attr_val) elif isinstance(attr_val, StepList): step_objects.append(attr_val) original_step_objects.append(attr_val) elif isinstance(attr_val, list): for each in attr_val: if isinstance(each, StepElement): #each.hidden = True if not each in original_step_objects: original_step_objects.append(each) step_objects.append(each) ######################################## #actually we don't want this here because this could pick up legitimate "lists" of parameters (like BLAH(0, (1, 2, 3))) #elif isinstance(attr_val, list): # temp = StepList(attr_val) # step_objects.append(temp) # original_step_objects.append(temp) # # #in StepElement.right_hand_side we have a way to deal with StepList objects # #so we have to put the StepList into the object # setattr(step_object, attr_name, temp) ######################################## #this isn't relevant here.. #elif isinstance(attr_val, dict): # if attr_val.has_key("list"): # the_list = attr_val["list"] #don't know what to do for "else" here #elif type(step_object) == StepList: elif isinstance(step_object, StepList): #a StepList is a way to process lists provided to export_step #at this point this step_object has already been assigned a line number #so now we go through the objects in the list and add those to step_object for hidden_entity in step_object: if isinstance(hidden_entity, StepElement) or isinstance(hidden_entity, StepList): #check if it's already known and processed if not hidden_entity in original_step_objects: #later in export_step we go through original_step_objects and print out everything #so we use hidden_entity.hidden = True (StepElement.hidden) because we don't want it to do that for these hidden_entity.hidden = True original_step_objects.append(hidden_entity) step_objects.append(hidden_entity) #add the StepList into the original set of step objects if not step_object in original_step_objects: original_step_objects.append(step_object) #elif type(step_object) == list: # #how did we get here? well, there was a list within the step_objects list that was not referenced by anything else # #presumably it still needs to be processed, but are there any cases where this is actually legitimate and valid? # temp = StepList(step_object) # step_objects.append(temp) # original_step_objects.append(temp) # # #in StepElement.right_hand_side we have a way to deal with StepList objects # #so we have to put the StepList into the object # setattr(step_object, attr_name, temp) #this was done in an attempt to elliminate the two "#20" lines in the sphere test output (this didn't work, so it might be unnecessary) #first we're going to make sure each object claims it hasn't been used before in this output for step_object in original_step_objects: if hasattr(step_object, "used_in_output"): step_object.used_in_output = False else: setattr(step_object, "used_in_output", False) #now go through the list and print out the relevant line lines = [] used_line_numbers = [] #so that duplicate lines don't get printed out for step_object in original_step_objects: if not step_object.hidden and not step_object.used_in_output: if step_object.line_number in used_line_numbers: continue line = (step_object.line_number, str(step_object)) lines.append(line) step_object.used_in_output = False used_line_numbers.append(step_object.line_number) lines = sorted(lines, key=itemgetter(0)) new_lines = [] for line in lines: #"replace" is being used here because i'm a terrible hack and don't want to deal with proper quotting right now new_lines.append(line[1].replace("\"", "'") + ";") return step_file_header + "\n" + join(new_lines, "\n") + "\n" + step_file_footer class Entity: pass class Member: pass class StepElementMetaclass(type): def __init__(cls, name, bases, kwds): super(StepElementMetaclass, cls).__init__(name, bases, kwds) class StepElement(object): __metaclass__ = StepElementMetaclass __slots__ = () step_keyword = None hidden = False #a hack used in export_step def __init__(self, *params): #does this STEP element have any known parameters? if hasattr(self, "parameters"): #show off which parameters are acceptable for this STEP element #print "len(self.parameters) = ", len(self.parameters) #print "self.parameters = ", str(self.parameters) #are any parameters given? if len(params) > 0 and len(params) <= len(self.parameters): #map the given input parameters to self.parameters max_parameters = len(self.parameters) count_parameters = len(params) - 1 counter = count_parameters #in case the input has less parameters than required while counter >= 0: #construct the current parameter we want to solve for current_parameter = self.parameters.items() current_parameter = current_parameter[counter] #now for the given param_value = params[counter] #TODO: do a check here that isinstance(param_value, current_parameter[1]) #set the value for all time #print "setting self." + str(current_parameter[0]) + " to " + str(param_value) setattr(self, current_parameter[0], param_value) #almighty incrementer! counter = counter - 1 elif len(params) > 0: print "warning: " + self.__class__.__name__ + " has no parameters (some were given)" def to_step(self): '''converts self to a STEP file as best it can''' return str(step_file_header + step_data + step_file_footer) def right_hand_side(self): attributes = "" if hasattr(self, "parameters"): for param in self.parameters: if not hasattr(self, param): break param_val = getattr(self, param) if isinstance(param_val, StepElement) or isinstance(param_val, StepList): if not len(attributes) == 0: attributes = attributes + ", " attributes = attributes + "#" + str(param_val.line_number) elif isinstance(param_val, list): #do something different part_attributes = [] for thing in param_val: if isinstance(thing, StepElement): if hasattr(thing, "line_number"): part_attributes.append("#" + str(thing.line_number)) else: #we already numbered every StepElement in a previous place in the script #so it should already have the attribute 'line_number' print "ERROR: thing does not have a line_number when it clearly should.." raise Exception, "uhh dunno what to do here" else: part_attributes.append(thing) if not len(attributes) == 0: attributes = attributes + ", " attributes = attributes + "(" first = True #FIXME: what happens when you have a parameter in this list that has to be in quotes? #FIXME: or when you have a float that needs to be %4E or something? for attr_thing in part_attributes: if first: try: if not float(attr_thing) == 0: if math.log10(float(attr_thing)) > 4 or math.log10(float(attr_thing)) < -4: my_float = float(str(attr_thing)) attributes = attributes + "%4E" % (my_float) else: raise ValueError else: raise ValueError except ValueError: if isnumeric(str(attr_thing)): attributes = attributes + str(attr_thing) + "." else: attributes = attributes + str(attr_thing) first = False else: try: if not float(attr_thing) == 0: if math.log10(float(attr_thing)) > 4 or math.log10(float(attr_thing)) < -4: my_float = float(str(attr_thing)) attributes = attributes + ", %4E" % (my_float) else: raise ValueError else: raise ValueError except ValueError: if isnumeric(str(attr_thing)): attributes = attributes + ", " + str(attr_thing) + "." else: attributes = attributes + ", " + str(attr_thing) attributes = attributes + ")" elif isinstance(param_val, bool): if not len(attributes) == 0: attributes = attributes + ", " if param_val == True: attributes = attributes + ".T." else: attributes = attributes + ".F." #FIXME: this is where you fix the 1997 problem #also where you fix "5" -> "5." (i..e if it's a rational whole number) else: #it wasn't a boolean, list or StepElement if not len(attributes) == 0: attributes = attributes + ", " guh = getattr(self, param) if isinstance(guh, Literal): attributes = attributes + "%s" % (str(guh.value)) else: #see if it's a float or not try: if not float(str(guh)) == 0: if math.log10(float(guh)) > 4 or math.log10(float(guh)) < -4: my_float = float(str(guh)) attributes = attributes + " %4E" % (float(str(guh))) else: raise ValueError else: raise ValueError except ValueError: if isinstance(guh, int): attributes = attributes + (str(guh)) + "." else: attributes = attributes + "\"" + str(guh) + "\"" #FIXME: dunno what to do on 'else' here :/ else: attributes = "" return str(self.step_keyword + "(" + attributes + ")") def __repr__(self): '''spits out a string representation of this object in valid STEP''' if hasattr(self, "line_number"): return "#" + str(self.line_number) + " = " + str(self.right_hand_side()) else: return str(self.right_hand_side()) class Trouble: '''a StepElement with problems needing to be fixed''' class NamedUnit(StepElement): # ENTITY named_unit # SUPERTYPE OF (ONEOF(si_unit,conversion_based_unit, # expression_conversion_based_unit,context_dependent_unit) ANDOR # ONEOF(length_unit,mass_unit,time_unit,electric_current_unit, # thermodynamic_temperature_unit,amount_of_substance_unit, # luminous_intensity_unit,plane_angle_unit,solid_angle_unit, # area_unit,volume_unit,ratio_unit)); # dimensions : dimensional_exponents; # END_ENTITY; step_keyword = "NAMED_UNIT" parameters = {"dimensions": str} class SiUnit(NamedUnit): # ENTITY si_unit # SUBTYPE OF (named_unit); # prefix : OPTIONAL si_prefix; # name : si_unit_name; # DERIVE # SELF\named_unit.dimensions : dimensional_exponents := dimensions_for_si_unit # (SELF.name); # END_ENTITY step_keyword = "SI_UNIT" new_parameters = {"prefix": str, "name": str} parameters = deepcopy(NamedUnit.parameters) parameters.update(new_parameters) class SolidAngleUnit(NamedUnit): # ENTITY solid_angle_unit # SUBTYPE OF (named_unit); # WHERE # wr1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\ # named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit. # dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions. # electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions. # thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit. # dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit. # dimensions.luminous_intensity_exponent = 0.0); # END_ENTITY; step_keyword = "SOLID_ANGLE_UNIT" class MeasureWithUnit(StepElement): # ENTITY measure_with_unit # SUPERTYPE OF (ONEOF(length_measure_with_unit,mass_measure_with_unit, # time_measure_with_unit,electric_current_measure_with_unit, # thermodynamic_temperature_measure_with_unit, # amount_of_substance_measure_with_unit, # luminous_intensity_measure_with_unit, # plane_angle_measure_with_unit,solid_angle_measure_with_unit, # area_measure_with_unit,volume_measure_with_unit, # ratio_measure_with_unit)); # value_component : measure_value; # unit_component : unit; # WHERE # wr1 : valid_units(SELF); # END_ENTITY; step_keyword = "MEASURE_WITH_UNIT" #FIXME: should we use MeasureValue and Unit (STEP classes) or just stick with python stuff #parameters = {"value_component": MeasureValue, "unit_component": Unit} parameters = {"value_component": float, "unit_component": str} #FIXME: should "unit_component" be of type skdb.Unit? class LengthMeasure(MeasureWithUnit): #it's basically just a number, it could be anything # ENTITY length_measure_with_unit # SUBTYPE OF (measure_with_unit); # WHERE # wr1 : 'AUTOMOTIVE_DESIGN.LENGTH_UNIT' IN TYPEOF(SELF\measure_with_unit. # unit_component); # END_ENTITY; step_keyword = "LENGTH_MEASURE" parameters = deepcopy(MeasureWithUnit.parameters) class UncertaintyMeasureWithUnit(MeasureWithUnit): # ENTITY uncertainty_measure_with_unit # SUBTYPE OF (measure_with_unit); # name : label; # description : text; # WHERE # wr1 : (NOT ('NUMBER' IN TYPEOF(SELF\measure_with_unit.value_component))) OR # (SELF\measure_with_unit.value_component >= 0); # END_ENTITY; step_keyword = "UNCERTAINTY_MEASURE_WITH_UNIT" new_parameters = {"name": str, "description": str} parameters = deepcopy(MeasureWithUnit.parameters) parameters.update(new_parameters) class LengthUnit(StepElement): step_keyword = "LENGTH_UNIT" class PlaneAngleUnit(StepElement): step_keyword = "PLANE_ANGLE_UNIT" class RepresentationContext(StepElement): # ENTITY representation_context; # context_identifier : identifier; # context_type : text; # INVERSE # representations_in_context : SET[1:?] OF representation FOR context_of_items # ; # END_ENTITY; step_keyword = "REPRESENTATION_CONTEXT" parameters = {"context_identifier": str, "context_type": str} class GlobalUncertaintyAssignedContext(RepresentationContext): # ENTITY global_uncertainty_assigned_context # SUBTYPE OF (representation_context); # uncertainty : SET[1:?] OF uncertainty_measure_with_unit; # END_ENTITY; step_keyword = "GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT" new_parameters = {"uncertainty": {"list": {"types": [UncertaintyMeasureWithUnit], "min_len": 1}}} parameters = deepcopy(RepresentationContext.parameters) parameters.update(new_parameters) class GlobalUnitAssignedContext(RepresentationContext): # ENTITY global_unit_assigned_context # SUBTYPE OF (representation_context); # units : SET [1:?] OF unit; # END_ENTITY; -- global_unit_assigned_context step_keyword = "GLOBAL_UNIT_ASSIGNED_CONTEXT" new_parameters = {"units": {"list": {"types": [str], "min_len": 1}}} parameters = deepcopy(RepresentationContext.parameters) parameters.update(new_parameters) class RatioUnit(StepElement): step_keyword = "RATIO_UNIT" class AreaUnit(StepElement): step_keyword = "AREA_UNIT" class TimeMeasureWithUnit(StepElement): step_keyword = "TIME_MEASURE_WITH_UNIT" class ConversionBasedUnit(StepElement): step_keyword = "CONVERSION_BASED_UNIT" class VolumeUnit(StepElement): step_keyword = "VOLUME_UNIT" class LengthMeasureWithUnit(StepElement): step_keyword = "LENGTH_MEASURE_WITH_UNIT" class MassMeasureWithUnit(StepElement): step_keyword = "MASS_MEASURE_WITH_UNIT" class DerivedUnitElement(StepElement): step_keyword = "DERIVED_UNIT_ELEMENT" class RatioMeasureWithUnit(StepElement): step_keyword = "RATIO_MEASURE_WITH_UNIT" class TimeUnit(StepElement): step_keyword = "TIME_UNIT" class PlaneAngleMeasureWithUnit(StepElement): step_keyword = "PLANE_ANGLE_MEASURE_WITH_UNIT" class DerivedUnit(StepElement): step_keyword = "DERIVED_UNIT" class MassUnit(StepElement): step_keyword = "MASS_UNIT" class SolidAngleMeasureWithUnit(StepElement): step_keyword = "SOLID_ANGLE_MEASURE_WITH_UNIT" class ThermodynamicTemperatureUnit(StepElement): step_keyword = "THERMODYNAMIC_TEMPERATURE_UNIT" class RepresentationItem(StepElement): # ENTITY representation_item; # name : label; # WHERE # wr1 : SIZEOF(using_representations(SELF)) > 0; # END_ENTITY step_keyword = "REPRESENTATION_ITEM" parameters = {"name": str} class GeometricRepresentationItem(RepresentationItem): # ENTITY geometric_representation_item # SUPERTYPE OF (ONEOF(point,direction,vector,placement, # cartesian_transformation_operator,curve,surface,edge_curve, # face_surface,poly_loop,vertex_point,solid_model,boolean_result, # sphere,right_circular_cone,right_circular_cylinder,torus,block, # right_angular_wedge,half_space_solid,shell_based_surface_model, # face_based_surface_model,edge_based_wireframe_model, # geometric_set)) # SUBTYPE OF (representation_item); # DERIVE # dim : dimension_count := dimension_of(SELF); # WHERE # wr1 : SIZEOF(QUERY(using_rep <* using_representations(SELF) | NOT ( # 'AUTOMOTIVE_DESIGN.GEOMETRIC_REPRESENTATION_CONTEXT' IN TYPEOF( # using_rep.context_of_items)))) = 0; # END_ENTITY; step_keyword = "GEOMETRIC_REPRESENTATION_ITEM" parameters = deepcopy(RepresentationItem.parameters) class SolidModel(GeometricRepresentationItem): # ENTITY solid_model # SUPERTYPE OF (ONEOF(csg_solid,manifold_solid_brep,swept_face_solid, # solid_replica)) # SUBTYPE OF (geometric_representation_item); # END_ENTITY; step_keyword = "SOLID_MODEL" parameters = deepcopy(GeometricRepresentationItem.parameters) class TopologicalRepresentationItem(RepresentationItem): # ENTITY topological_representation_item # SUPERTYPE OF (ONEOF(vertex,edge,face_bound,face,connected_edge_set, # connected_face_set,(loop ANDOR path))) # SUBTYPE OF (representation_item); # END_ENTITY; step_keyword = "TOPOLOGICAL_REPRESENTATION_ITEM" parameters = deepcopy(RepresentationItem.parameters) class Loop(TopologicalRepresentationItem): # ENTITY loop # SUPERTYPE OF (ONEOF(vertex_loop,edge_loop,poly_loop)) # SUBTYPE OF (topological_representation_item); # END_ENTITY step_keyword = "LOOP" parameters = deepcopy(TopologicalRepresentationItem.parameters) class FaceBound(TopologicalRepresentationItem): # ENTITY face_bound # SUBTYPE OF (topological_representation_item); # bound : loop; # orientation : BOOLEAN; # END_ENTITY; step_keyword = "FACE_BOUND" new_parameters = {"bound": Loop, "orientation": bool} parameters = deepcopy(TopologicalRepresentationItem.parameters) parameters.update(new_parameters) class Face(TopologicalRepresentationItem): # ENTITY face # SUPERTYPE OF (ONEOF(face_surface,oriented_face)) # SUBTYPE OF (topological_representation_item); # bounds : SET[1:?] OF face_bound; # WHERE # wr1 : NOT (mixed_loop_type_set(list_to_set(list_face_loops(SELF)))); # wr2 : SIZEOF(QUERY(temp <* bounds | 'AUTOMOTIVE_DESIGN.FACE_OUTER_BOUND' IN # TYPEOF(temp))) <= 1; # END_ENTITY step_keyword = "FACE" new_parameters = {"bounds": { "list": { "types": [FaceBound], "min_len": 1, } }, } parameters = deepcopy(TopologicalRepresentationItem.parameters) parameters.update(new_parameters) class Vertex(TopologicalRepresentationItem): # ENTITY vertex # SUBTYPE OF (topological_representation_item); # END_ENTITY; step_keyword = "VERTEX" parameters = deepcopy(TopologicalRepresentationItem.parameters) class ConnectedFaceSet(TopologicalRepresentationItem): # ENTITY connected_face_set # SUPERTYPE OF (ONEOF(closed_shell,open_shell)) # SUBTYPE OF (topological_representation_item); # cfs_faces : SET[1:?] OF face; # END_ENTITY; step_keyword = "CONNECTED_FACE_SET" new_parameters = {"cfs_faces": {"list": {"types": [Face], "min_len": 1}}} parameters = deepcopy(TopologicalRepresentationItem.parameters) parameters.update(new_parameters) class ClosedShell(ConnectedFaceSet): # ENTITY closed_shell # SUBTYPE OF (connected_face_set); # END_ENTITY; step_keyword = "CLOSED_SHELL" parameters = deepcopy(ConnectedFaceSet.parameters) class Point(GeometricRepresentationItem): # ENTITY point # SUPERTYPE OF (ONEOF(cartesian_point,point_on_curve,point_on_surface, # point_replica,degenerate_pcurve)) # SUBTYPE OF (geometric_representation_item); # END_ENTITY; step_keyword = "POINT" parameters = deepcopy(GeometricRepresentationItem.parameters) class CartesianPoint(Point): #FIXME: 'coordinates' should be a list of points, not just anything :) # ENTITY cartesian_point # SUBTYPE OF (point); # coordinates : LIST[1:3] OF length_measure; # END_ENTITY; step_keyword = "CARTESIAN_POINT" new_parameters = {"coordinates": {"list": {"types": [LengthMeasure], "min_len": 1, "max_len": 3}}} parameters = deepcopy(Point.parameters) parameters.update(new_parameters) class Direction(GeometricRepresentationItem): #FIXME: "direction_ratios" must be 2 to 3 entites long of (real) numbers # ENTITY direction # SUBTYPE OF (geometric_representation_item); # direction_ratios : LIST[2:3] OF REAL; # WHERE # wr1 : SIZEOF(QUERY(tmp <* direction_ratios | tmp <> 0.0)) > 0; # END_ENTITY; step_keyword = "DIRECTION" new_parameters = {"direction_ratios": {"list": {"types": [int], "min_len": 2, "max_len": 3}}} parameters = deepcopy(GeometricRepresentationItem.parameters) parameters.update(new_parameters) class Placement(GeometricRepresentationItem): # ENTITY placement # SUPERTYPE OF (ONEOF(axis1_placement,axis2_placement_2d,axis2_placement_3d)) # SUBTYPE OF (geometric_representation_item); # location : cartesian_point; # END_ENTITY; step_keyword = "PLACEMENT" new_parameters = {"location": CartesianPoint} parameters = deepcopy(GeometricRepresentationItem.parameters) parameters.update(new_parameters) class Axis1Placement(Placement): # ENTITY axis1_placement # SUBTYPE OF (placement); # axis : OPTIONAL direction; # DERIVE # z : direction := NVL(normalise(axis),direction([0.0,0.0,1.0])); # WHERE # wr1 : SELF\geometric_representation_item.dim = 3; # END_ENTITY; step_keyword = "AXIS1_PLACEMENT" new_parameters = {"axis": Direction} parameters = deepcopy(Placement.parameters) parameters.update(new_parameters) class ApplicationContext(StepElement): # ENTITY application_context; # name : label; # description : text; # INVERSE # context_elements : SET[1:?] OF application_context_element FOR # frame_of_reference; # END_ENTITY; #FIXME: dunno what "INVERSE" means above step_keyword = "APPLICATION_CONTEXT" parameters = {"name": str, "description": str} class ApplicationContextElement(StepElement): # ENTITY application_context_element # SUPERTYPE OF (ONEOF(product_context,product_definition_context, # product_concept_context,configuration_item_context)); # name : label; # frame_of_reference : SET[1:?] OF application_context; # END_ENTITY; step_keyword = "APPLICATION_CONTEXT_ELEMENT" parameters = {"name": str, "frame_of_reference": {"list": {"types": [ApplicationContext], "min_len": 1}}} class ProductDefinitionContext(ApplicationContextElement): # ENTITY product_definition_context # SUBTYPE OF (application_context_element); # life_cycle_stage : label; # END_ENTITY; step_keyword = "PRODUCT_DEFINITION_CONTEXT" new_parameters = {"life_cycle_stage": str} parameters = deepcopy(ApplicationContextElement.parameters) parameters.update(new_parameters) class ProductContext(ApplicationContextElement): # ENTITY product_context # SUBTYPE OF (application_context_element); # discipline_type : label; # END_ENTITY; step_keyword = "PRODUCT_CONTEXT" new_parameters = {"discipline_type": str} parameters = deepcopy(ApplicationContextElement.parameters) parameters.update(new_parameters) class Product(StepElement): # ENTITY product; # id : identifier; # name : label; # description : text; # frame_of_reference : SET[1:?] OF product_context; # END_ENTITY; step_keyword = "PRODUCT" parameters = {"id": str, "name": str, "description": str, "frame_of_reference": {"list": {"types": [ProductContext], "min_len": 1}}} class ProductDefinitionFormation(StepElement): # ENTITY product_definition_formation; # id : identifier; # description : text; # of_product : product; # UNIQUE # ur1 : id,of_product; # END_ENTITY; step_keyword = "PRODUCT_DEFINITION_FORMATION" parameters = {"id": str, "description": str, "of_product": Product} class ProductDefinition(StepElement): # ENTITY product_definition; # id : identifier; # name : label; # description : text; # formation : product_definition_formation; # frame_of_reference : product_definition_context; # END_ENTITY; step_keyword = "PRODUCT_DEFINITION" parameters = {"id": str, "name": str, "description": str, "formation": ProductDefinitionFormation, "frame_of_reference": ProductDefinitionContext} class PropertyDefinition(StepElement): # ENTITY property_definition; # name : label; # description : text; # definition : characterized_definition; # END_ENTITY; step_keyword = "PROPERTY_DEFINITION" #FIXME: "definition" should be CharacterizedDefinition parameters = {"name": str, "description": str, "definition": str} class ProductDefinitionShape(PropertyDefinition): # ENTITY product_definition_shape # SUBTYPE OF (property_definition); # UNIQUE # ur1 : SELF\property_definition.definition; # WHERE # wr1 : NOT ('AUTOMOTIVE_DESIGN.SHAPE_DEFINITION' IN TYPEOF(SELF\ # property_definition.definition)); # END_ENTITY; step_keyword = "PRODUCT_DEFINITION_SHAPE" parameters = {"name": str, "description": str, "definition": ProductDefinition} class ApplicationProtocolDefinition(StepElement): # ENTITY application_protocol_definition; # status : label; # application_interpreted_model_schema_name : label; # application_protocol_year : year_number; # application : SET[1:?] OF application_context; # END_ENTITY; step_keyword = "APPLICATION_PROTOCOL_DEFINITION" #ApplicationProtocolDefinition("committee draft", "automotive_design", 1997, application_context) parameters = {"status": str, "application_interpreted_model_schema_name": str, "application_protocol_year": int, "application_context": {"list": {"types": [ApplicationContext], "min_len":1}}} class Surface(GeometricRepresentationItem): # ENTITY surface # SUPERTYPE OF (ONEOF(elementary_surface,swept_surface,bounded_surface, # offset_surface,surface_replica)) # SUBTYPE OF (geometric_representation_item); # END_ENTITY; step_keyword = "SURFACE" parameters = deepcopy(GeometricRepresentationItem.parameters) class Axis2Placement3d(Placement): # ENTITY axis2_placement_3d # SUBTYPE OF (placement); # axis : OPTIONAL direction; # ref_direction : OPTIONAL direction; # DERIVE # p : LIST[3:3] OF direction := build_axes(axis,ref_direction); # WHERE # wr1 : SELF\placement.location.dim = 3; # wr2 : (NOT (EXISTS(axis))) OR (axis.dim = 3); # wr3 : (NOT (EXISTS(ref_direction))) OR (ref_direction.dim = 3); # wr4 : (NOT (EXISTS(axis))) OR (NOT (EXISTS(ref_direction))) OR ( # cross_product(axis,ref_direction).magnitude > 0.0); # END_ENTITY; #FIXME: "axis" and "ref_direction" are both optional step_keyword = "AXIS2_PLACEMENT_3D" new_parameters = {"axis": Direction, "ref_direction": Direction} parameters = deepcopy(Placement.parameters) parameters.update(new_parameters) class ElementarySurface(Surface): # ENTITY elementary_surface # SUPERTYPE OF (ONEOF(plane,cylindrical_surface,conical_surface, # spherical_surface,toroidal_surface)) # SUBTYPE OF (surface); # position : axis2_placement_3d; # END_ENTITY; step_keyword = "ELEMENTARY_SURFACE" new_parameters = {"position": Axis2Placement3d} parameters = deepcopy(Surface.parameters) parameters.update(new_parameters) class SphericalSurface(ElementarySurface): # ENTITY spherical_surface # SUBTYPE OF (elementary_surface); # radius : positive_length_measure; # END_ENTITY; step_keyword = "SPHERICAL_SURFACE" new_parameters = {"radius": float} parameters = deepcopy(ElementarySurface.parameters) parameters.update(new_parameters) class BoundedSurface(Surface): # ENTITY bounded_surface # SUPERTYPE OF (ONEOF(b_spline_surface,rectangular_trimmed_surface, # curve_bounded_surface,rectangular_composite_surface)) # SUBTYPE OF (surface); # END_ENTITY; step_keyword = "BOUNDED_SURFACE" parameters = deepcopy(Surface.parameters) class Curve(GeometricRepresentationItem): # ENTITY curve # SUPERTYPE OF (ONEOF(line,conic,pcurve,surface_curve,offset_curve_2d, # offset_curve_3d,curve_replica)) # SUBTYPE OF (geometric_representation_item); # END_ENTITY; step_keyword = "CURVE" parameters = deepcopy(GeometricRepresentationItem.parameters) class BoundedCurve(Curve): # ENTITY bounded_curve # SUPERTYPE OF (ONEOF(polyline,b_spline_curve,trimmed_curve,composite_curve)) # SUBTYPE OF (curve); # END_ENTITY; step_keyword = "BOUNDED_CURVE" parameters = deepcopy(Curve.parameters) class CompositeCurveSegment(StepElement): # ENTITY composite_curve_segment; # transition : transition_code; # same_sense : BOOLEAN; # parent_curve : curve; # INVERSE # using_curves : BAG[1:?] OF composite_curve FOR segments; # WHERE # wr1 : ('AUTOMOTIVE_DESIGN.BOUNDED_CURVE' IN TYPEOF(parent_curve)); # END_ENTITY; # TYPE transition_code = ENUMERATION OF # (discontinuous,continuous,cont_same_gradient, # cont_same_gradient_same_curvature); # END_TYPE; #FIXME: what do i do about 'transition_code'? step_keyword = "COMPOSITE_CURVE_SEGMENT" parameters = {"transition": Unknown, "same_sense": bool, "parent_curve": Curve} class CompositeCurve(BoundedCurve): # ENTITY composite_curve # SUBTYPE OF (bounded_curve); # segments : LIST[1:?] OF composite_curve_segment; # self_intersect : LOGICAL; # DERIVE # n_segments : INTEGER := SIZEOF(segments); # closed_curve : LOGICAL := segments[n_segments].transition <> discontinuous; # WHERE # wr1 : ((NOT closed_curve) AND (SIZEOF(QUERY(temp <* segments | temp. # transition = discontinuous)) = 1)) OR ((closed_curve) AND (SIZEOF( # QUERY(temp <* segments | temp.transition = discontinuous)) = 0)); # END_ENTITY; step_keyword = "COMPOSITE_CURVE" #FIXME: "self_intersect" was of type LOGICAL. what does that mean? new_parameters = {"segments": {"list": {"types": [CompositeCurveSegment], "min_len": 1}}, "self_intersect": bool} parameters = deepcopy(BoundedCurve.parameters) parameters.update(new_parameters) class CompositeCurveOnSurface(CompositeCurve): # ENTITY composite_curve_on_surface # SUPERTYPE OF (boundary_curve) # SUBTYPE OF (composite_curve); # DERIVE # basis_surface : SET[0:2] OF surface := get_basis_surface(SELF); # WHERE # wr1 : SIZEOF(basis_surface) > 0; # wr2 : constraints_composite_curve_on_surface(SELF); # END_ENTITY step_keyword = "COMPOSITE_CURVE_ON_SURFACE" parameters = deepcopy(CompositeCurve.parameters) class BoundaryCurve(CompositeCurveOnSurface): # ENTITY boundary_curve # SUBTYPE OF (composite_curve_on_surface); # WHERE # wr1 : SELF\composite_curve.closed_curve; # END_ENTITY; step_keyword = "BOUNDARY_CURVE" parameters = deepcopy(CompositeCurveOnSurface.parameters) class CurveBoundedSurface(BoundedSurface): # ENTITY curve_bounded_surface # SUBTYPE OF (bounded_surface); # basis_surface : surface; # boundaries : SET[1:?] OF boundary_curve; # implicit_outer : BOOLEAN; # WHERE # wr1 : NOT (implicit_outer AND ('AUTOMOTIVE_DESIGN.OUTER_BOUNDARY_CURVE' IN # TYPEOF(boundaries))); # wr2 : (NOT (implicit_outer)) OR ('AUTOMOTIVE_DESIGN.BOUNDED_SURFACE' IN # TYPEOF(basis_surface)); # wr3 : SIZEOF(QUERY(temp <* boundaries | # 'AUTOMOTIVE_DESIGN.OUTER_BOUNDARY_CURVE' IN TYPEOF(temp))) <= 1; # wr4 : SIZEOF(QUERY(temp <* boundaries | (temp\composite_curve_on_surface. # basis_surface[1] :<>: SELF.basis_surface))) = 0; # END_ENTITY; step_keyword = "CURVE_BOUNDED_SURFACE" new_parameters = {"basis_surface": Surface, "boundaries": {"list": {"types": [BoundaryCurve], "min_len": 1}}, "implicit_outer": bool} parameters = deepcopy(BoundedSurface.parameters) parameters.update(new_parameters) class Edge(TopologicalRepresentationItem): # ENTITY edge # SUPERTYPE OF (ONEOF(edge_curve,oriented_edge)) # SUBTYPE OF (topological_representation_item); # edge_start : vertex; # edge_end : vertex; # END_ENTITY; step_keyword = "EDGE" new_parameters = {"edge_start": Vertex, "edge_end": Vertex} parameters = deepcopy(TopologicalRepresentationItem.parameters) parameters.update(new_parameters) class ConnectedEdgeSet(TopologicalRepresentationItem): # ENTITY connected_edge_set # SUBTYPE OF (topological_representation_item); # ces_edges : SET[1:?] OF edge; # END_ENTITY; step_keyword = "CONNECTED_EDGE_SET" #new_parameters = {"ces_edges": list, "connected_face_set": list, "cfs_faces": list} new_parameters = {"ces_edges": {"list": {"types": [Edge], "min_len": 1}}} parameters = deepcopy(TopologicalRepresentationItem.parameters) parameters.update(new_parameters) class EdgeBasedWireframeModel(GeometricRepresentationItem): # ENTITY edge_based_wireframe_model # SUBTYPE OF (geometric_representation_item); # ebwm_boundary : SET[1:?] OF connected_edge_set; # END_ENTITY; step_keyword = "EDGE_BASED_WIREFRAME_MODEL" new_parameters = {"ebwm_boundary": {"list": {"types": [ConnectedEdgeSet], "min_len": 1}}} parameters = deepcopy(GeometricRepresentationItem.parameters) parameters.update(new_parameters) class ShapeAspect(StepElement): # ENTITY shape_aspect; # name : label; # description : text; # of_shape : product_definition_shape; # product_definitional : LOGICAL; # END_ENTITY; step_keyword = "SHAPE_ASPECT" parameters = {"name": str, "description": str, "of_shape": ProductDefinitionShape, "product_definitional": bool} class DimensionalSize(StepElement): # ENTITY dimensional_size # SUPERTYPE OF (angular_size); # applies_to : shape_aspect; # name : label; # WHERE # wr1 : applies_to.product_definitional = TRUE; # END_ENTITY; step_keyword = "DIMENSIONAL_SIZE" parameters = {"applies_to": ShapeAspect, "name": str} #yes the order is correct #2010-06-29: BAB is taking a break from this. kthx class PersonAndOrganizationAssignment(StepElement): #url: http://alvarestech.com/temp/0steptools/EsquemaPart238Java/238html/t_person_and_organization_assignment.html # ENTITY person_and_organization_assignment # ABSTRACT SUPERTYPE; # assigned_person_and_organization : person_and_organization; # role : person_and_organization_role; # END_ENTITY; -- 10303-41: management_resources_schema step_keyword = "PERSON_AND_ORGANIZATION_ASSIGNMENT" class CcDesignPersonAndOrganizationAssignment(StepElement): #url: http://www.steptools.com/support/stdev_docs/express/ap203/html/t_cc_de-06.html # ENTITY cc_design_person_and_organization_assignment # SUBTYPE OF (person_and_organization_assignment); # items : SET [1:?] OF person_organization_item; # WHERE # wr1: cc_design_person_and_organization_correlation(SELF); # END_ENTITY; -- cc_design_person_and_organization_assignment step_keyword = "CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT" class PlusMinusTolerance(StepElement): step_keyword = "PLUS_MINUS_TOLERANCE" parameters = {"range": Entity, "2dtolerance_dimensionrange": Entity} class AnnotationSymbolOccurrence(StepElement): step_keyword = "ANNOTATION_SYMBOL_OCCURRENCE" class AutoDesignDateAndPersonAssignment(StepElement): step_keyword = "AUTO_DESIGN_DATE_AND_PERSON_ASSIGNMENT" class DimensionalExponents(StepElement): step_keyword = "DIMENSIONAL_EXPONENTS" class TextStyleWithMirror(StepElement): step_keyword = "TEXT_STYLE_WITH_MIRROR" class FeaRepresentationItem(StepElement): step_keyword = "FEA_REPRESENTATION_ITEM" class DegenerateToroidalSurface(StepElement): step_keyword = "DEGENERATE_TOROIDAL_SURFACE" class TransitionalShapeRepresentation(StepElement): step_keyword = "TRANSITIONAL_SHAPE_REPRESENTATION" parameters = {"name": str, "items": list, "context_of_items": RepresentationContext} class CcDesignCertification(StepElement): step_keyword = "CC_DESIGN_CERTIFICATION" class Path(StepElement): step_keyword = "PATH" parameters = {"name": str, "edge_list": list} class EdgeLoop(Loop, Path): step_keyword = "EDGE_LOOP" parameters = {"name": str, "edge_list": list} class RightCircularCone(StepElement): step_keyword = "RIGHT_CIRCULAR_CONE" parameters = {"name": str, "position": Axis1Placement, "height": float, "radius": float, "semi_angle": float} class TextStyleForDefinedFont(StepElement): step_keyword = "TEXT_STYLE_FOR_DEFINED_FONT" class CcDesignSpecificationReference(StepElement): step_keyword = "CC_DESIGN_SPECIFICATION_REFERENCE" class ProductCategoryRelationship(StepElement): step_keyword = "PRODUCT_CATEGORY_RELATIONSHIP" class DraughtingModel(StepElement): step_keyword = "DRAUGHTING_MODEL" class BackgroundColour(StepElement): step_keyword = "BACKGROUND_COLOUR" class DraughtingSubfigureRepresentation(StepElement): step_keyword = "DRAUGHTING_SUBFIGURE_REPRESENTATION" class PreDefinedCurveFont(StepElement): step_keyword = "PRE_DEFINED_CURVE_FONT" class BrepWithVoids(StepElement, Trouble): '''first parameter might be faceted_brep or geometric_representation_item? see RWRWFacetedBrepAndBrepWithVoids.cxx''' step_keyword = "BREP_WITH_VOIDS" parameters = {"name": str, "outer": ClosedShell, "voids": Unknown} class MappedItem(StepElement): step_keyword = "MAPPED_ITEM" class DateTimeRole(StepElement): step_keyword = "DATE_TIME_ROLE" class Certification(StepElement): step_keyword = "CERTIFICATION" class Circle(StepElement): step_keyword = "CIRCLE" class AlignedSurface3dElementCoordinateSystem(StepElement): step_keyword = "ALIGNED_SURFACE_3D_ELEMENT_COORDINATE_SYSTEM" class QuantifiedAssemblyComponentUsage(StepElement): step_keyword = "QUANTIFIED_ASSEMBLY_COMPONENT_USAGE" class PersonalAddress(StepElement): step_keyword = "PERSONAL_ADDRESS" class CircularRunoutTolerance(StepElement): step_keyword = "CIRCULAR_RUNOUT_TOLERANCE" class CurveReplica(StepElement): step_keyword = "CURVE_REPLICA" class PresentationView(StepElement): step_keyword = "PRESENTATION_VIEW" class AutoDesignOrganizationAssignment(StepElement): step_keyword = "AUTO_DESIGN_ORGANIZATION_ASSIGNMENT" class IntersectionCurve(StepElement): step_keyword = "INTERSECTION_CURVE" class UniformSurfaceSection(StepElement): step_keyword = "UNIFORM_SURFACE_SECTION" class NodeGroup(StepElement): step_keyword = "NODE_GROUP" class Colour(StepElement): step_keyword = "COLOUR" class StructuralResponsePropertyDefinitionRepresentation(StepElement): step_keyword = "STRUCTURAL_RESPONSE_PROPERTY_DEFINITION_REPRESENTATION" class CcDesignContract(StepElement): step_keyword = "CC_DESIGN_CONTRACT" class MechanicalContext(ProductContext): # ENTITY mechanical_context # SUBTYPE OF (product_context); # WHERE # WR1: SELF.discipline_type = 'mechanical'; # END_ENTITY; -- mechanical_context step_keyword = "MECHANICAL_CONTEXT" parameters = deepcopy(ProductContext.parameters) class DraughtingPreDefinedCurveFont(StepElement): step_keyword = "DRAUGHTING_PRE_DEFINED_CURVE_FONT" class ContractAssignment(StepElement): step_keyword = "CONTRACT_ASSIGNMENT" class SurfaceCurve(StepElement): step_keyword = "SURFACE_CURVE" class WeekOfYearAndDayDate(StepElement): step_keyword = "WEEK_OF_YEAR_AND_DAY_DATE" class FeaSecantCoefficientOfLinearThermalExpansion(StepElement): step_keyword = "FEA_SECANT_COEFFICIENT_OF_LINEAR_THERMAL_EXPANSION" class ParametricSurface3dElementCoordinateSystem(StepElement): step_keyword = "PARAMETRIC_SURFACE_3D_ELEMENT_COORDINATE_SYSTEM" class FeaMassDensity(StepElement): step_keyword = "FEA_MASS_DENSITY" class DescriptiveRepresentationItem(StepElement): step_keyword = "DESCRIPTIVE_REPRESENTATION_ITEM" class RepresentationRelationshipWithTransformation(StepElement): step_keyword = "REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION" class IdentificationRole(StepElement): step_keyword = "IDENTIFICATION_ROLE" class Volume3dElementDescriptor(StepElement): step_keyword = "VOLUME_3D_ELEMENT_DESCRIPTOR" class DegeneratePcurve(StepElement): step_keyword = "DEGENERATE_PCURVE" class DraughtingCallout(StepElement): step_keyword = "DRAUGHTING_CALLOUT" class ExternallyDefinedGeneralProperty(StepElement): step_keyword = "EXTERNALLY_DEFINED_GENERAL_PROPERTY" class Vector(StepElement): step_keyword = "VECTOR" class Line(Curve): #note that CartesianPoint and Vector must have the same dimensions step_keyword = "LINE" parameters = {"point": CartesianPoint, "direction": Vector} class GeometricSet(StepElement): step_keyword = "GEOMETRIC_SET" parameters = {"name": str, "elements": list} class PersonAndOrganizationRole(StepElement): step_keyword = "PERSON_AND_ORGANIZATION_ROLE" class DatumFeature(StepElement): step_keyword = "DATUM_FEATURE" class RepresentationMap(StepElement): step_keyword = "REPRESENTATION_MAP" class TextStyle(StepElement): step_keyword = "TEXT_STYLE" class AnnotationTextOccurrence(StepElement): step_keyword = "ANNOTATION_TEXT_OCCURRENCE" class EdgeCurve(StepElement): step_keyword = "EDGE_CURVE" parameters = {"name": str, "edge_start": Vertex, "edge_end": Vertex, "edge_geometry": Curve, "same_sense": bool} class ApprovalPersonOrganization(StepElement): step_keyword = "APPROVAL_PERSON_ORGANIZATION" class DateAndTimeAssignment(StepElement): step_keyword = "DATE_AND_TIME_ASSIGNMENT" class ProductConcept(StepElement): step_keyword = "PRODUCT_CONCEPT" class FillAreaStyleTileSymbolWithStyle(StepElement): step_keyword = "FILL_AREA_STYLE_TILE_SYMBOL_WITH_STYLE" class FeaAxis2Placement3d(StepElement): step_keyword = "FEA_AXIS2_PLACEMENT_3D" class CameraImage2dWithScale(StepElement): step_keyword = "CAMERA_IMAGE_2D_WITH_SCALE" class Surface3dElementRepresentation(StepElement): step_keyword = "SURFACE_3D_ELEMENT_REPRESENTATION" class ProductDefinitionEffectivity(StepElement): step_keyword = "PRODUCT_DEFINITION_EFFECTIVITY" class RightAngularWedge(StepElement): step_keyword = "RIGHT_ANGULAR_WEDGE" parameters = {"name": str, "position": Axis2Placement3d, "x": float, "y": float, "z": float, "ltx": float} class MechanicalDesignGeometricPresentationRepresentation(StepElement): step_keyword = "MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION" class ExternallyDefinedClass(StepElement): step_keyword = "EXTERNALLY_DEFINED_Class" class ApprovalRole(StepElement): step_keyword = "APPROVAL_ROLE" class FillAreaStyleTiles(StepElement): step_keyword = "FILL_AREA_STYLE_TILES" class FeaMaterialPropertyRepresentationItem(StepElement): step_keyword = "FEA_MATERIAL_PROPERTY_REPRESENTATION_ITEM" class AppliedExternalIdentificationAssignment(StepElement): step_keyword = "APPLIED_EXTERNAL_IDENTIFICATION_ASSIGNMENT" class FeaCurveSectionGeometricRelationship(StepElement): step_keyword = "FEA_CURVE_SECTION_GEOMETRIC_RELATIONSHIP" class SurfaceStyleBoundary(StepElement): step_keyword = "SURFACE_STYLE_BOUNDARY" class GeometricTolerance(StepElement): step_keyword = "GEOMETRIC_TOLERANCE" class HalfSpaceSolid(StepElement): step_keyword = "HALF_SPACE_SOLID" parameters = {"name": str, "base_surface": Surface, "agreement_flag": bool} class OpenShell(StepElement): step_keyword = "OPEN_SHELL" parameters = {"name": str, "cfs_faces": list} class Conic(StepElement): step_keyword = "CONIC" class FillAreaStyleHatching(StepElement): step_keyword = "FILL_AREA_STYLE_HATCHING" class ConcentricityTolerance(StepElement): step_keyword = "CONCENTRICITY_TOLERANCE" class Change(StepElement): step_keyword = "CHANGE" class Document(StepElement): step_keyword = "DOCUMENT" class SurfaceSectionFieldVarying(StepElement): step_keyword = "SURFACE_SECTION_FIELD_VARYING" class SweptAreaSolid(StepElement): step_keyword = "SWEPT_AREA_SOLID" parameters = {"name": str, "swept_area": CurveBoundedSurface} class FeaTangentialCoefficientOfLinearThermalExpansion(StepElement): step_keyword = "FEA_TANGENTIAL_COEFFICIENT_OF_LINEAR_THERMAL_EXPANSION" class RightCircularCylinder(StepElement): step_keyword = "RIGHT_CIRCULAR_CYLINDER" parameters = {"name": str, "position": Axis1Placement, "height": float, "radius": float} class SurfaceSectionField(StepElement): step_keyword = "SURFACE_SECTION_FIELD" class NodeRepresentation(StepElement): step_keyword = "NODE_REPRESENTATION" class MaterialPropertyRepresentation(StepElement): step_keyword = "MATERIAL_PROPERTY_REPRESENTATION" class SurfaceElementProperty(StepElement): step_keyword = "SURFACE_ELEMENT_PROPERTY" class DateAndTime(StepElement): step_keyword = "DATE_AND_TIME" class GeometricCurveSet(StepElement): step_keyword = "GEOMETRIC_CURVE_SET" parameters = {"name": str, "elements": list} class Parabola(StepElement): step_keyword = "PARABOLA" class CompositeTextWithAssociatedCurves(StepElement): step_keyword = "COMPOSITE_TEXT_WITH_ASSOCIATED_CURVES" class OrientedPath(StepElement): step_keyword = "ORIENTED_PATH" parameters = {"name": str, "edge_list": list, "path_element": EdgeLoop, "orientation": bool} class SurfaceStyleSilhouette(StepElement): step_keyword = "SURFACE_STYLE_SILHOUETTE" class ParametricRepresentationContext(StepElement): step_keyword = "PARAMETRIC_REPRESENTATION_CONTEXT" class ExternallyDefinedItem(StepElement): step_keyword = "EXTERNALLY_DEFINED_ITEM" class TotalRunoutTolerance(StepElement): step_keyword = "TOTAL_RUNOUT_TOLERANCE" class ChangeRequest(StepElement): step_keyword = "CHANGE_REQUEST" class SurfaceStyleFillArea(StepElement): step_keyword = "SURFACE_STYLE_FILL_AREA" class FeaMoistureAbsorption(StepElement): step_keyword = "FEA_MOISTURE_ABSORPTION" class PointOnSurface(StepElement): step_keyword = "POINT_ON_SURFACE" class DocumentType(StepElement): step_keyword = "DOCUMENT_TYPE" class RevolvedAreaSolid(StepElement): step_keyword = "REVOLVED_AREA_SOLID" parameters = {"name": str, "swept_area": CurveBoundedSurface, "axis": Axis1Placement, "angle": float} class AssemblyComponentUsage(StepElement): step_keyword = "ASSEMBLY_COMPONENT_USAGE" class AutoDesignNominalDateAssignment(StepElement): step_keyword = "AUTO_DESIGN_NOMINAL_DATE_ASSIGNMENT" class CompoundShapeRepresentation(StepElement): step_keyword = "COMPOUND_SHAPE_REPRESENTATION" parameters = {"name": str, "items": list, "context_of_items": RepresentationContext} class PreDefinedColour(StepElement): step_keyword = "PRE_DEFINED_COLOUR" class AnnotationFillAreaOccurrence(StepElement): step_keyword = "ANNOTATION_FILL_AREA_OCCURRENCE" class PropertyDefinitionRelationship(StepElement): step_keyword = "PROPERTY_DEFINITION_RELATIONSHIP" class BezierSurface(StepElement): step_keyword = "BEZIER_SURFACE" class ProductRelatedProductCategory(StepElement): step_keyword = "PRODUCT_RELATED_PRODUCT_CATEGORY" class GeometricRepresentationContext(RepresentationContext): # ENTITY geometric_representation_context # SUBTYPE OF (representation_context); # coordinate_space_dimension : dimension_count; # END_ENTITY step_keyword = "GEOMETRIC_REPRESENTATION_CONTEXT" new_parameters = {"coordinate_space_dimension": int} #where coordinate_space_dimension > 0 parameters = deepcopy(RepresentationContext.parameters) parameters.update(new_parameters) class ContractType(StepElement): step_keyword = "CONTRACT_TYPE" class ExternallyDefinedCurveFont(StepElement): step_keyword = "EXTERNALLY_DEFINED_CURVE_FONT" class ShapeRepresentation(StepElement): step_keyword = "SHAPE_REPRESENTATION" parameters = {"name": str, "items": list, "context_of_items": RepresentationContext} class ExternallyDefinedTileStyle(StepElement): step_keyword = "EXTERNALLY_DEFINED_TILE_STYLE" class IdentificationAssignment(StepElement): step_keyword = "IDENTIFICATION_ASSIGNMENT" class PresentationArea(StepElement): step_keyword = "PRESENTATION_AREA" class BezierCurve(StepElement): step_keyword = "BEZIER_CURVE" class DrawingRevision(StepElement): step_keyword = "DRAWING_REVISION" class CartesianTransformationOperator2d(StepElement): step_keyword = "CARTESIAN_TRANSFORMATION_OPERATOR_2D" class PreDefinedSymbol(StepElement): step_keyword = "PRE_DEFINED_SYMBOL" class PresentationRepresentation(StepElement): step_keyword = "PRESENTATION_REPRESENTATION" class DerivedShapeAspect(StepElement): step_keyword = "DERIVED_SHAPE_ASPECT" class CompoundRepresentationItem(StepElement): step_keyword = "COMPOUND_REPRESENTATION_ITEM" class DummyNode(StepElement): step_keyword = "DUMMY_NODE" class Pcurve(StepElement): step_keyword = "PCURVE" class Datum(StepElement): step_keyword = "DATUM" class OrganizationRole(StepElement): step_keyword = "ORGANIZATION_ROLE" class AssemblyComponentUsageSubstitute(StepElement): step_keyword = "ASSEMBLY_COMPONENT_USAGE_SUBSTITUTE" class CylindricalSurface(StepElement): step_keyword = "CYLINDRICAL_SURFACE" class ProductDefinitionWithAssociatedDocuments(StepElement): step_keyword = "PRODUCT_DEFINITION_WITH_ASSOCIATED_DOCUMENTS" class SurfaceStyleParameterLine(StepElement): step_keyword = "SURFACE_STYLE_PARAMETER_LINE" class DimensionCurve(StepElement): step_keyword = "DIMENSION_CURVE" class DesignContext(StepElement): step_keyword = "DESIGN_CONTEXT" class CurveElementIntervalConstant(StepElement): step_keyword = "CURVE_ELEMENT_INTERVAL_CONSTANT" class ReparametrisedCompositeCurveSegment(StepElement): step_keyword = "REPARAMETRISED_COMPOSITE_CURVE_SEGMENT" class RectangularCompositeSurface(StepElement): step_keyword = "RECTANGULAR_COMPOSITE_SURFACE" class RationalBSplineSurface(StepElement): step_keyword = "RATIONAL_B_SPLINE_SURFACE" class OrganizationalAddress(StepElement): step_keyword = "ORGANIZATIONAL_ADDRESS" class UniformCurve(StepElement): step_keyword = "UNIFORM_CURVE" class TextLiteralWithDelineation(StepElement): step_keyword = "TEXT_LITERAL_WITH_DELINEATION" class CurveElementLocation(StepElement): step_keyword = "CURVE_ELEMENT_LOCATION" class TwoDirectionRepeatFactor(StepElement): step_keyword = "TWO_DIRECTION_REPEAT_FACTOR" class FreedomsList(StepElement): step_keyword = "FREEDOMS_LIST" class AppliedPersonAndOrganizationAssignment(StepElement): step_keyword = "APPLIED_PERSON_AND_ORGANIZATION_ASSIGNMENT" class ParallelismTolerance(StepElement): step_keyword = "PARALLELISM_TOLERANCE" class PreDefinedTextFont(StepElement): step_keyword = "PRE_DEFINED_TEXT_FONT" class DraughtingAnnotationOccurrence(StepElement): step_keyword = "DRAUGHTING_ANNOTATION_OCCURRENCE" class PlacedDatumTargetFeature(StepElement): step_keyword = "PLACED_DATUM_TARGET_FEATURE" class Extension(StepElement): step_keyword = "EXTENSION" class EffectivityAssignment(StepElement): step_keyword = "EFFECTIVITY_ASSIGNMENT" class CsgShapeRepresentation(StepElement): step_keyword = "CSG_SHAPE_REPRESENTATION" parameters = {"name": str, "items": list, "context_of_items": RepresentationContext} class Subface(StepElement): step_keyword = "SUBFACE" parameters = {"name": str, "bounds": list, "parent_face": Face} class ExternallyDefinedHatchStyle(StepElement): step_keyword = "EXTERNALLY_DEFINED_HATCH_STYLE" class AngularSize(StepElement): step_keyword = "ANGULAR_SIZE" parameters = {"name": str, "applies_to": ShapeAspect, "text": str} class Ellipse(StepElement): step_keyword = "ELLIPSE" class CompositeTextWithBlankingBox(StepElement): step_keyword = "COMPOSITE_TEXT_WITH_BLANKING_BOX" class AnnotationFillArea(StepElement): step_keyword = "ANNOTATION_FILL_AREA" class StyledItem(StepElement): step_keyword = "STYLED_ITEM" class ShellBasedSurfaceModel(StepElement): step_keyword = "SHELL_BASED_SURFACE_MODEL" parameters = {"name": str, "sbsm_boundary": list} class PresentationSize(StepElement): step_keyword = "PRESENTATION_SIZE" class LocalTime(StepElement): step_keyword = "LOCAL_TIME" class CurveStyleFontPattern(StepElement): step_keyword = "CURVE_STYLE_FONT_PATTERN" class ExternalIdentificationAssignment(StepElement): step_keyword = "EXTERNAL_IDENTIFICATION_ASSIGNMENT" class ShapeRepresentationWithParameters(StepElement): '''an alias for ShapeRepresentation?''' step_keyword = "SHAPE_REPRESENTATION_WITH_PARAMETERS" parameters = {"name": str, "items": list, "context_of_items": RepresentationContext} class Node(StepElement): step_keyword = "NODE" class AlignedCurve3dElementCoordinateSystem(StepElement): step_keyword = "ALIGNED_CURVE_3D_ELEMENT_COORDINATE_SYSTEM" class PolyLoop(StepElement): step_keyword = "POLY_LOOP" parameters = {"name": str, "polygon": list} class AppliedOrganizationAssignment(StepElement): step_keyword = "APPLIED_ORGANIZATION_ASSIGNMENT" class QuasiUniformCurve(StepElement): step_keyword = "QUASI_UNIFORM_CURVE" class CurveElementInterval(StepElement): step_keyword = "CURVE_ELEMENT_INTERVAL" class AppliedDocumentReference(StepElement): step_keyword = "APPLIED_DOCUMENT_REFERENCE" class LimitsAndFits(StepElement): step_keyword = "LIMITS_AND_FITS" parameters = {"form_variance": str, "zone_variance": str, "grade": str, "source": str} class Subedge(StepElement): step_keyword = "SUBEDGE" parameters = {"name": str, "edge_start": Vertex, "edge_end": Vertex, "parent_edge": Edge} class CertificationType(StepElement): step_keyword = "CERTIFICATION_TYPE" class ItemDefinedTransformation(StepElement): step_keyword = "ITEM_DEFINED_TRANSFORMATION" class CurveElementEndRelease(StepElement): step_keyword = "CURVE_ELEMENT_END_RELEASE" class SurfacePatch(StepElement): step_keyword = "SURFACE_PATCH" class ElementGeometricRelationship(StepElement): step_keyword = "ELEMENT_GEOMETRIC_RELATIONSHIP" class SurfaceSideStyle(StepElement): step_keyword = "SURFACE_SIDE_STYLE" class CurveElementEndReleasePacket(StepElement): step_keyword = "CURVE_ELEMENT_END_RELEASE_PACKET" class CameraImage(StepElement): step_keyword = "CAMERA_IMAGE" class FaceSurface(StepElement): step_keyword = "FACE_SURFACE" parameters = {"name": str, "bounds": Unknown, "face_geometry": Surface, "same_sense": bool} class AutoDesignSecurityClassificationAssignment(StepElement): step_keyword = "AUTO_DESIGN_SECURITY_CLASSIFICATION_ASSIGNMENT" class QuasiUniformSurface(StepElement): step_keyword = "QUASI_UNIFORM_SURFACE" class Address(StepElement): step_keyword = "ADDRESS" class ExternallyDefinedTextFont(StepElement): step_keyword = "EXTERNALLY_DEFINED_TEXT_FONT" class Template(StepElement): step_keyword = "TEMPLATE" class Person(StepElement): step_keyword = "PERSON" class SpecifiedHigherUsageOccurrence(StepElement): step_keyword = "SPECIFIED_HIGHER_USAGE_OCCURRENCE" class DimensionalSizeWithPath(StepElement): step_keyword = "DIMENSIONAL_SIZE_WITH_PATH" class ConfigurationEffectivity(StepElement): step_keyword = "CONFIGURATION_EFFECTIVITY" class AdvancedBrepShapeRepresentation(StepElement): step_keyword = "ADVANCED_BREP_SHAPE_REPRESENTATION" parameters = {"name": str, "items": list, "context_of_items": RepresentationContext} class SurfaceReplica(StepElement): step_keyword = "SURFACE_REPLICA" class ApprovalStatus(StepElement): step_keyword = "APPROVAL_STATUS" class ConnectedFaceSubSet(StepElement): step_keyword = "CONNECTED_FACE_SUB_SET" parameters = {"name": str, "cfs_faces": list, "parent_face_set": ConnectedFaceSet} class ShapeAspectRelationship(StepElement): step_keyword = "SHAPE_ASPECT_RELATIONSHIP" class ValueRange(StepElement): step_keyword = "VALUE_RANGE" class RepresentationRelationship(StepElement): step_keyword = "REPRESENTATION_RELATIONSHIP" class AppliedSecurityClassificationAssignment(StepElement): step_keyword = "APPLIED_SECURITY_CLASSIFICATION_ASSIGNMENT" class CoaxialityTolerance(StepElement): step_keyword = "COAXIALITY_TOLERANCE" class ArbitraryVolume3dElementCoordinateSystem(StepElement): step_keyword = "ARBITRARY_VOLUME_3D_ELEMENT_COORDINATE_SYSTEM" class CurveStyleFont(StepElement): step_keyword = "CURVE_STYLE_FONT" class OrientedFace(StepElement): step_keyword = "ORIENTED_FACE" parameters = {"name": str, "bounds": Unknown, "face_element": Face, "orientation": bool} class CoordinatedUniversalTimeOffset(StepElement): step_keyword = "COORDINATED_UNIVERSAL_TIME_OFFSET" class SurfaceProfileTolerance(StepElement): step_keyword = "SURFACE_PROFILE_TOLERANCE" class GeneralProperty(StepElement): step_keyword = "GENERAL_PROPERTY" class Surface3dElementDescriptor(StepElement): step_keyword = "SURFACE_3D_ELEMENT_DESCRIPTOR" class NameAssignment(StepElement): step_keyword = "NAME_ASSIGNMENT" class MakeFromUsageOption(StepElement): step_keyword = "MAKE_FROM_USAGE_OPTION" class ProductDefinitionRelationship(StepElement): step_keyword = "PRODUCT_DEFINITION_RELATIONSHIP" class AutoDesignPresentedItem(StepElement): step_keyword = "AUTO_DESIGN_PRESENTED_ITEM" class StructuralResponseProperty(StepElement): step_keyword = "STRUCTURAL_RESPONSE_PROPERTY" class RevolvedFaceSolid(StepElement): step_keyword = "REVOLVED_FACE_SOLID" parameters = {"name": str, "swept_face": FaceSurface, "axis": Axis1Placement, "angle": float} class OrientedSurface(StepElement): step_keyword = "ORIENTED_SURFACE" class ExternallyDefinedSymbol(StepElement): step_keyword = "EXTERNALLY_DEFINED_SYMBOL" class NextAssemblyUsageOccurrence(StepElement): step_keyword = "NEXT_ASSEMBLY_USAGE_OCCURRENCE" class AutoDesignActualDateAssignment(StepElement): step_keyword = "AUTO_DESIGN_ACTUAL_DATE_ASSIGNMENT" class ElementGroup(StepElement): step_keyword = "ELEMENT_GROUP" class ColourRgb(StepElement): step_keyword = "COLOUR_RGB" class NodeDefinition(StepElement): step_keyword = "NODE_DEFINITION" class ShapeRepresentationRelationship(StepElement): step_keyword = "SHAPE_REPRESENTATION_RELATIONSHIP" class FillAreaStyleColour(StepElement): step_keyword = "FILL_AREA_STYLE_COLOUR" class AdvancedFace(StepElement): step_keyword = "ADVANCED_FACE" parameters = {"name": str, "bounds": Unknown, "face_geometry": Surface, "same_sense": False} class CsgRepresentation(StepElement): step_keyword = "CSG_REPRESENTATION" class ToroidalSurface(StepElement): step_keyword = "TOROIDAL_SURFACE" class OverRidingStyledItem(StepElement): step_keyword = "OVER_RIDING_STYLED_ITEM" class TextStyleWithBoxCharacteristics(StepElement): step_keyword = "TEXT_STYLE_WITH_BOX_CHARACTERISTICS" class CameraModel(StepElement): step_keyword = "CAMERA_MODEL" class CommonDatum(StepElement): step_keyword = "COMMON_DATUM" class TemplateInstance(StepElement): step_keyword = "TEMPLATE_INSTANCE" class Action(StepElement): step_keyword = "ACTION" class PresentationLayerUsage(StepElement): step_keyword = "PRESENTATION_LAYER_USAGE" class ApprovalAssignment(StepElement): step_keyword = "APPROVAL_ASSIGNMENT" class SymbolRepresentationMap(StepElement): step_keyword = "SYMBOL_REPRESENTATION_MAP" class Sphere(StepElement): step_keyword = "SPHERE" parameters = {"name": str, "radius": float, "center": Point} class ContextDependentShapeRepresentation(StepElement): step_keyword = "CONTEXT_DEPENDENT_SHAPE_REPRESENTATION" parameters = {"representation_relation": ShapeRepresentationRelationship, "represented_product_relation": ProductDefinitionShape} class ViewVolume(StepElement): step_keyword = "VIEW_VOLUME" class PlanarExtent(StepElement): step_keyword = "PLANAR_EXTENT" class AppliedDateAssignment(StepElement): step_keyword = "APPLIED_DATE_ASSIGNMENT" class CurveStyle(StepElement): step_keyword = "CURVE_STYLE" class ShapeAspectDerivingRelationship(StepElement): step_keyword = "SHAPE_ASPECT_DERIVING_RELATIONSHIP" class AppliedDateAndTimeAssignment(StepElement): step_keyword = "APPLIED_DATE_AND_TIME_ASSIGNMENT" class PointOnCurve(StepElement): step_keyword = "POINT_ON_CURVE" class CompositeShapeAspect(StepElement): step_keyword = "COMPOSITE_SHAPE_ASPECT" class PhysicallyModeledProductDefinition(StepElement): step_keyword = "PHYSICALLY_MODELED_PRODUCT_DEFINITION" class FeaModel(StepElement): step_keyword = "FEA_MODEL" class AnalysisItemWithinRepresentation(StepElement): step_keyword = "ANALYSIS_ITEM_WITHIN_REPRESENTATION" class SecurityClassificationLevel(StepElement): step_keyword = "SECURITY_CLASSIFICATION_LEVEL" class FeaAreaDensity(StepElement): step_keyword = "FEA_AREA_DENSITY" class OffsetCurve3d(StepElement): step_keyword = "OFFSET_CURVE_3D" class AppliedGroupAssignment(StepElement): step_keyword = "APPLIED_GROUP_ASSIGNMENT" class DataEnvironment(StepElement): step_keyword = "DATA_ENVIRONMENT" class SurfaceOfLinearExtrusion(StepElement): step_keyword = "SURFACE_OF_LINEAR_EXTRUSION" class ExternallyDefinedRepresentation(StepElement): step_keyword = "EXTERNALLY_DEFINED_REPRESENTATION" class DraughtingSymbolRepresentation(StepElement): step_keyword = "DRAUGHTING_SYMBOL_REPRESENTATION" class FeaModelDefinition(StepElement): step_keyword = "FEA_MODEL_DEFINITION" class Polyline(StepElement): step_keyword = "POLYLINE" class EvaluatedDegeneratePcurve(StepElement): step_keyword = "EVALUATED_DEGENERATE_PCURVE" class ApprovalDateTime(StepElement): step_keyword = "APPROVAL_DATE_TIME" class Plane(StepElement): step_keyword = "PLANE" class UniformSurface(StepElement): step_keyword = "UNIFORM_SURFACE" class GeometricallyBoundedWireframeShapeRepresentation(StepElement): step_keyword = "GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION" parameters = {"name": str, "items": list, "context_of_items": RepresentationContext} class ConicalSurface(StepElement): step_keyword = "CONICAL_SURFACE" class BSplineCurveWithKnots(StepElement): step_keyword = "B_SPLINE_CURVE_WITH_KNOTS" class TextLiteralWithExtent(StepElement): step_keyword = "TEXT_LITERAL_WITH_EXTENT" class ShapeDimensionRepresentation(StepElement): step_keyword = "SHAPE_DIMENSION_REPRESENTATION" parameters = {"name": str, "items": list, "context_of_items": RepresentationContext} class ManifoldSolidBrep(StepElement): step_keyword = "MANIFOLD_SOLID_BREP" parameters = {"name": str, "outer": ClosedShell} class ProductConceptContext(StepElement): step_keyword = "PRODUCT_CONCEPT_CONTEXT" class PreDefinedItem(StepElement): step_keyword = "PRE_DEFINED_ITEM" class QualifiedRepresentationItem(StepElement, Trouble): '''see also MeasureRepresentationItem''' step_keyword = "QUALIFIED_REPRESENTATION_ITEM" parameters = {"name": str, "qualifiers": list} class CompositeText(StepElement): step_keyword = "COMPOSITE_TEXT" class ActionAssignment(StepElement): step_keyword = "ACTION_ASSIGNMENT" class Group(StepElement): step_keyword = "GROUP" class ProductDefinitionFormationRelationship(StepElement): step_keyword = "PRODUCT_DEFINITION_FORMATION_RELATIONSHIP" class SurfaceStyleUsage(StepElement): step_keyword = "SURFACE_STYLE_USAGE" class DefinitionalRepresentation(StepElement): step_keyword = "DEFINITIONAL_REPRESENTATION" class CameraImage3dWithScale(StepElement): step_keyword = "CAMERA_IMAGE_3D_WITH_SCALE" class FeaShellMembraneBendingCouplingStiffness(StepElement): step_keyword = "FEA_SHELL_MEMBRANE_BENDING_COUPLING_STIFFNESS" class ConstantSurface3dElementCoordinateSystem(StepElement): step_keyword = "CONSTANT_SURFACE_3D_ELEMENT_COORDINATE_SYSTEM" class PrecisionQualifier(StepElement): step_keyword = "PRECISION_QUALIFIER" parameters = {"precision_value": int} class MeasureQualification(StepElement): step_keyword = "MEASURE_QUALIFICATION" parameters = {"name": str, "description": str, "qualified_measure": Unknown, "qualifiers": list} class ElementMaterial(StepElement): step_keyword = "ELEMENT_MATERIAL" class DatumTarget(StepElement): step_keyword = "DATUM_TARGET" class OrientedEdge(StepElement): step_keyword = "ORIENTED_EDGE" parameters = {"name": str, "edge_start": Unknown, "edge_end": Unknown, "edge_element": Edge, "orientation": bool} class NodeWithVector(StepElement): step_keyword = "NODE_WITH_VECTOR" class Organization(StepElement): step_keyword = "ORGANIZATION" class NonManifoldSurfaceShapeRepresentation(StepElement): step_keyword = "NON_MANIFOLD_SURFACE_SHAPE_REPRESENTATION" parameters = {"name": str, "items": list, "context_of_items": RepresentationContext} class AutoDesignViewArea(StepElement): step_keyword = "AUTO_DESIGN_VIEW_AREA" class AreaInSet(StepElement): step_keyword = "AREA_IN_SET" class RationalBSplineCurve(StepElement): step_keyword = "RATIONAL_B_SPLINE_CURVE" class EulerAngles(StepElement): step_keyword = "EULER_ANGLES" class PersonAndOrganization(StepElement): step_keyword = "PERSON_AND_ORGANIZATION" class BSplineSurface(StepElement): step_keyword = "B_SPLINE_SURFACE" class DimensionalLocationWithPath(StepElement): step_keyword = "DIMENSIONAL_LOCATION_WITH_PATH" parameters = {"name": str, "description": str, "relating_shape_aspect": ShapeAspect, "related_shape_aspect": ShapeAspect, "path": ShapeAspect} class ManifoldSurfaceShapeRepresentation(StepElement): step_keyword = "MANIFOLD_SURFACE_SHAPE_REPRESENTATION" parameters = {"name": str, "items": list, "context_of_items": RepresentationContext} class NodeWithSolutionCoordinateSystem(StepElement): step_keyword = "NODE_WITH_SOLUTION_COORDINATE_SYSTEM" class CcDesignApproval(StepElement): step_keyword = "CC_DESIGN_APPROVAL" class RepItemGroup(StepElement): step_keyword = "REP_ITEM_GROUP" class CartesianTransformationOperator3d(StepElement): step_keyword = "CARTESIAN_TRANSFORMATION_OPERATOR_3D" class SolidReplica(StepElement): step_keyword = "SOLID_REPLICA" parameters = {"name": str, "parent_solid": SolidModel, "transformation": CartesianTransformationOperator3d} class FeaParametricPoint(StepElement): step_keyword = "FEA_PARAMETRIC_POINT" class CharacterizedObject(StepElement): step_keyword = "CHARACTERIZED_OBJECT" class SymbolStyle(StepElement): step_keyword = "SYMBOL_STYLE" class DateAssignment(StepElement): step_keyword = "DATE_ASSIGNMENT" class DimensionCurveTerminator(StepElement): step_keyword = "DIMENSION_CURVE_TERMINATOR" class DocumentProductAssociation(StepElement): step_keyword = "DOCUMENT_PRODUCT_ASSOCIATION" class Contract(StepElement): step_keyword = "CONTRACT" class CertificationAssignment(StepElement): step_keyword = "CERTIFICATION_ASSIGNMENT" class ModifiedGeometricTolerance(StepElement): step_keyword = "MODIFIED_GEOMETRIC_TOLERANCE" class PromissoryUsageOccurrence(StepElement): step_keyword = "PROMISSORY_USAGE_OCCURRENCE" class PositionTolerance(StepElement): step_keyword = "POSITION_TOLERANCE" class CartesianTransformationOperator(StepElement): step_keyword = "CARTESIAN_TRANSFORMATION_OPERATOR" class DirectedDimensionalLocation(StepElement): step_keyword = "DIRECTED_DIMENSIONAL_LOCATION" class TextLiteralWithAssociatedCurves(StepElement): step_keyword = "TEXT_LITERAL_WITH_ASSOCIATED_CURVES" class OrdinalDate(StepElement): step_keyword = "ORDINAL_DATE" class PresentationLayerAssignment(StepElement): step_keyword = "PRESENTATION_LAYER_ASSIGNMENT" class AngularityTolerance(StepElement): step_keyword = "ANGULARITY_TOLERANCE" class Torus(StepElement): step_keyword = "TORUS" parameters = {"name": str, "position": Axis1Placement, "major_radius": float, "minor_radius": float} class PresentationSet(StepElement): step_keyword = "PRESENTATION_SET" class ActionRequestAssignment(StepElement): step_keyword = "ACTION_REQUEST_ASSIGNMENT" class SurfaceStyleSegmentationCurve(StepElement): step_keyword = "SURFACE_STYLE_SEGMENTATION_CURVE" class RoleAssociation(StepElement): step_keyword = "ROLE_ASSOCIATION" class Representation(StepElement): step_keyword = "REPRESENTATION" parameters = {"name": str, "items": list, "context_of_items": RepresentationContext} class FeaShellMembraneStiffness(StepElement): step_keyword = "FEA_SHELL_MEMBRANE_STIFFNESS" class SuppliedPartRelationship(StepElement): step_keyword = "SUPPLIED_PART_RELATIONSHIP" class AutoDesignApprovalAssignment(StepElement): step_keyword = "AUTO_DESIGN_APPROVAL_ASSIGNMENT" class FeaMaterialPropertyRepresentation(StepElement): step_keyword = "FEA_MATERIAL_PROPERTY_REPRESENTATION" class FeaSurfaceSectionGeometricRelationship(StepElement): step_keyword = "FEA_SURFACE_SECTION_GEOMETRIC_RELATIONSHIP" class SurfaceStyleControlGrid(StepElement): step_keyword = "SURFACE_STYLE_CONTROL_GRID" class AutoDesignActualDateAndTimeAssignment(StepElement): step_keyword = "AUTO_DESIGN_ACTUAL_DATE_AND_TIME_ASSIGNMENT" class Curve3dElementProperty(StepElement): step_keyword = "CURVE_3D_ELEMENT_PROPERTY" class SecurityClassification(StepElement): step_keyword = "SECURITY_CLASSIFICATION" class AnnotationSymbol(StepElement): step_keyword = "ANNOTATION_SYMBOL" class GroupRelationship(StepElement): step_keyword = "GROUP_RELATIONSHIP" class FunctionallyDefinedTransformation(StepElement): step_keyword = "FUNCTIONALLY_DEFINED_TRANSFORMATION" class PresentationStyleByContext(StepElement): step_keyword = "PRESENTATION_STYLE_BY_CONTEXT" class RoundnessTolerance(StepElement): step_keyword = "ROUNDNESS_TOLERANCE" class AppliedApprovalAssignment(StepElement): step_keyword = "APPLIED_APPROVAL_ASSIGNMENT" class SweptFaceSolid(StepElement): step_keyword = "SWEPT_FACE_SOLID" parameters = {"name": str, "swept_face": FaceSurface} class FacetedBrepShapeRepresentation(StepElement): step_keyword = "FACETED_BREP_SHAPE_REPRESENTATION" parameters = {"name": str, "items": list, "context_of_items": RepresentationContext} class Volume3dElementRepresentation(StepElement): step_keyword = "VOLUME_3D_ELEMENT_REPRESENTATION" class CameraModelD2(StepElement): step_keyword = "CAMERA_MODEL_D2" class CameraModelD3(StepElement): step_keyword = "CAMERA_MODEL_D3" class GroupAssignment(StepElement): step_keyword = "GROUP_ASSIGNMENT" class TextLiteral(StepElement): step_keyword = "TEXT_LITERAL" class StartWork(StepElement): step_keyword = "START_WORK" class SecurityClassificationAssignment(StepElement): step_keyword = "SECURITY_CLASSIFICATION_ASSIGNMENT" class AppliedPresentedItem(StepElement): step_keyword = "APPLIED_PRESENTED_ITEM" class Curve3dElementDescriptor(StepElement): step_keyword = "CURVE_3D_ELEMENT_DESCRIPTOR" class Date(StepElement): step_keyword = "DATE" class Curve3dElementRepresentation(StepElement): step_keyword = "CURVE_3D_ELEMENT_REPRESENTATION" class SeamCurve(StepElement): step_keyword = "SEAM_CURVE" class PerpendicularityTolerance(StepElement): step_keyword = "PERPENDICULARITY_TOLERANCE" class SurfaceSectionFieldConstant(StepElement): step_keyword = "SURFACE_SECTION_FIELD_CONSTANT" class DraughtingPreDefinedColour(StepElement): step_keyword = "DRAUGHTING_PRE_DEFINED_COLOUR" class ToleranceValue(StepElement): step_keyword = "TOLERANCE_VALUE" parameters = {"lower_bound": Entity, "upper_bound": Entity} class ExternalSource(StepElement): step_keyword = "EXTERNAL_SOURCE" class TrimmedCurve(StepElement): step_keyword = "TRIMMED_CURVE" class Approval(StepElement): step_keyword = "APPROVAL" class DefinedSymbol(StepElement): step_keyword = "DEFINED_SYMBOL" class SweptSurface(StepElement): step_keyword = "SWEPT_SURFACE" class Block(StepElement): step_keyword = "BLOCK" parameters = {"name": str, "position": Axis2Placement3d, "x": 0, "y": 0, "z": 0} class PresentationStyleAssignment(StepElement): step_keyword = "PRESENTATION_STYLE_ASSIGNMENT" class AnnotationText(StepElement): step_keyword = "ANNOTATION_TEXT" class FacetedBrep(StepElement): step_keyword = "FACETED_BREP" parameters = {"name": str, "outer": ClosedShell} class DatumReference(StepElement): step_keyword = "DATUM_REFERENCE" class StartRequest(StepElement): step_keyword = "START_REQUEST" class ConnectedFaceShapeRepresentation(StepElement): step_keyword = "CONNECTED_FACE_SHAPE_REPRESENTATION" parameters = {"name": str, "items": list, "context_of_items": RepresentationContext} class TypeQualifier(StepElement): step_keyword = "TYPE_QUALIFIER" parameters = {"name": str} class SeamEdge(StepElement): step_keyword = "SEAM_EDGE" parameters = {"name": str, "edge_start": Unknown, "edge_end": Unknown, "edge_element": Edge, "orientation": bool, "pcurve_reference": Pcurve} class PointRepresentation(StepElement): step_keyword = "POINT_REPRESENTATION" parameters = {"name": str, "items": list, "context_of_items": RepresentationContext} class AnnotationCurveOccurrence(StepElement): step_keyword = "ANNOTATION_CURVE_OCCURRENCE" class MaterialProperty(StepElement): step_keyword = "MATERIAL_PROPERTY" class ElementDescriptor(StepElement): step_keyword = "ELEMENT_DESCRIPTOR" class DocumentUsageConstraint(StepElement): step_keyword = "DOCUMENT_USAGE_CONSTRAINT" class RectangularTrimmedSurface(StepElement): step_keyword = "RECTANGULAR_TRIMMED_SURFACE" class AutoDesignNominalDateAndTimeAssignment(StepElement): step_keyword = "AUTO_DESIGN_NOMINAL_DATE_AND_TIME_ASSIGNMENT" class GeometricallyBoundedSurfaceShapeRepresentation(StepElement): step_keyword = "GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION" parameters = {"name": str, "items": list, "context_of_items": RepresentationContext} class CcDesignSecurityClassification(StepElement): step_keyword = "CC_DESIGN_SECURITY_CLASSIFICATION" class Effectivity(StepElement): step_keyword = "EFFECTIVITY" class Class(StepElement): step_keyword = "CLASS" class VertexLoop(StepElement): step_keyword = "VERTEX_LOOP" parameters = {"name": str, "llop_vertex": Vertex} class ProductDefinitionUsage(StepElement): step_keyword = "PRODUCT_DEFINITION_USAGE" class ElementRepresentation(StepElement): step_keyword = "ELEMENT_REPRESENTATION" class OneDirectionRepeatFactor(StepElement): step_keyword = "ONE_DIRECTION_REPEAT_FACTOR" class ColourSpecification(StepElement): step_keyword = "COLOUR_SPECIFICATION" class ContextDependentOverRidingStyledItem(StepElement): step_keyword = "CONTEXT_DEPENDENT_OVER_RIDING_STYLED_ITEM" class DigitalDocument(StepElement): step_keyword = "DIGITAL_DOCUMENT" class StraightnessTolerance(StepElement): step_keyword = "STRAIGHTNESS_TOLERANCE" class BoxDomain(StepElement): step_keyword = "BOX_DOMAIN" parameters = {"corner": CartesianPoint, "xlength": 0, "ylenght": 0, "zlength": 0} class ProductCategory(StepElement): step_keyword = "PRODUCT_CATEGORY" class OrientedClosedShell(StepElement): step_keyword = "ORIENTED_CLOSED_SHELL" parameters = {"name": str, "cfs_faces": bool, "closed_shell_element": ClosedShell, "orientation": bool} class Axis2Placement2d(StepElement): step_keyword = "AXIS2_PLACEMENT_2D" class GeometricToleranceWithDatumReference(StepElement): step_keyword = "GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE" class ProductDefinitionFormationWithSpecifiedSource(StepElement): step_keyword = "PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE" class NodeSet(StepElement): step_keyword = "NODE_SET" class ProductDataRepresentationView(StepElement): step_keyword = "PRODUCT_DATA_REPRESENTATION_VIEW" class AngularLocation(StepElement): step_keyword = "ANGULAR_LOCATION" parameters = {"name": str, "description": str, "relating_shape_aspect": ShapeAspect, "related_shape_aspect": ShapeAspect, "text": str} class CurveElementSectionDefinition(StepElement): step_keyword = "CURVE_ELEMENT_SECTION_DEFINITION" class OffsetSurface(StepElement): step_keyword = "OFFSET_SURFACE" class FeaShellShearStiffness(StepElement): step_keyword = "FEA_SHELL_SHEAR_STIFFNESS" class CurveElementEndOffset(StepElement): step_keyword = "CURVE_ELEMENT_END_OFFSET" class ActionRequestSolution(StepElement): step_keyword = "ACTION_REQUEST_SOLUTION" class PointStyle(StepElement): step_keyword = "POINT_STYLE" class DocumentProductEquivalence(StepElement): step_keyword = "DOCUMENT_PRODUCT_EQUIVALENCE" class SymbolColour(StepElement): step_keyword = "SYMBOL_COLOUR" class DrawingDefinition(StepElement): step_keyword = "DRAWING_DEFINITION" class PropertyDefinitionRepresentation(StepElement): step_keyword = "PROPERTY_DEFINITION_REPRESENTATION" class PresentedItem(StepElement): step_keyword = "PRESENTED_ITEM" class ActionMethod(StepElement): step_keyword = "ACTION_METHOD" class AnnotationSubfigureOccurrence(StepElement): step_keyword = "ANNOTATION_SUBFIGURE_OCCURRENCE" class Hyperbola(StepElement): step_keyword = "HYPERBOLA" class FreedomAndCoefficient(StepElement): step_keyword = "FREEDOM_AND_COEFFICIENT" class DocumentRepresentationType(StepElement): step_keyword = "DOCUMENT_REPRESENTATION_TYPE" class ExtrudedAreaSolid(StepElement): step_keyword = "EXTRUDED_AREA_SOLID" parameters = {"name": str, "swept_area": CurveBoundedSurface, "extruded_direction": Direction, "depth": float} class ShapeAspectTransition(StepElement): step_keyword = "SHAPE_ASPECT_TRANSITION" class CameraUsage(StepElement): step_keyword = "CAMERA_USAGE" class AutoDesignDocumentReference(StepElement): step_keyword = "AUTO_DESIGN_DOCUMENT_REFERENCE" class FillAreaStyle(StepElement): step_keyword = "FILL_AREA_STYLE" class BSplineSurfaceWithKnots(StepElement): step_keyword = "B_SPLINE_SURFACE_WITH_KNOTS" class VertexPoint(StepElement): step_keyword = "VERTEX_POINT" parameters = {"name": str, "vertex_geometry": Point} class BooleanResult(StepElement): step_keyword = "BOOLEAN_RESULT" parameters = {"name": str, "text": str, "first_operand": Unknown, "second_operand": Unknown} class OrientedOpenShell(StepElement): step_keyword = "ORIENTED_OPEN_SHELL" parameters = {"name": str, "cfs_faces": Unknown, "open_shell_element": OpenShell, "orientation": bool} class CurveElementSectionDerivedDefinitions(StepElement): step_keyword = "CURVE_ELEMENT_SECTION_DERIVED_DEFINITIONS" class ProductType(StepElement): step_keyword = "PRODUCT_TYPE" class ParametricCurve3dElementCoordinateSystem(StepElement): step_keyword = "PARAMETRIC_CURVE_3D_ELEMENT_COORDINATE_SYSTEM" class CcDesignDateAndTimeAssignment(StepElement): step_keyword = "CC_DESIGN_DATE_AND_TIME_ASSIGNMENT" class DimensionalLocation(StepElement): step_keyword = "DIMENSIONAL_LOCATION" parameters = {"name": str, "description": str, "relating_shape_aspect": ShapeAspect, "related_shape_aspect": ShapeAspect} class CalendarDate(StepElement): step_keyword = "CALENDAR_DATE" class SymmetryTolerance(StepElement): step_keyword = "SYMMETRY_TOLERANCE" class FaceBasedSurfaceModel(StepElement): step_keyword = "FACE_BASED_SURFACE_MODEL" parameters = {"name": str, "fbsm_faces": Unknown} class SurfaceSection(StepElement): step_keyword = "SURFACE_SECTION" class EdgeBasedWireframeShapeRepresentation(StepElement): step_keyword = "EDGE_BASED_WIREFRAME_SHAPE_REPRESENTATION" parameters = {"name": str, "items": list, "context_of_items": RepresentationContext} class OrganizationAssignment(StepElement): step_keyword = "ORGANIZATION_ASSIGNMENT" class AutoDesignPersonAndOrganizationAssignment(StepElement): step_keyword = "AUTO_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT" class OuterBoundaryCurve(StepElement): step_keyword = "OUTER_BOUNDARY_CURVE" class FeaModel3d(StepElement): step_keyword = "FEA_MODEL_3D" class ParametricCurve3dElementCoordinateDirection(StepElement): step_keyword = "PARAMETRIC_CURVE_3D_ELEMENT_COORDINATE_DIRECTION" class SymbolRepresentation(StepElement): step_keyword = "SYMBOL_REPRESENTATION" class ExtrudedFaceSolid(StepElement): step_keyword = "EXTRUDED_FACE_SOLID" parameters = {"name": str, "swept_face": FaceSurface, "extruded_direction": Direction, "depth": float} class BSplineCurve(StepElement): step_keyword = "B_SPLINE_CURVE" class FeaLinearElasticity(StepElement): step_keyword = "FEA_LINEAR_ELASTICITY" class MeasureRepresentationItem(StepElement, Trouble): '''see also QualifiedRepresentationItem''' step_keyword = "MEASURE_REPRESENTATION_ITEM" parameters = {"value_component": Member, "unit_component": Entity} class ContextDependentInvisibility(StepElement): step_keyword = "CONTEXT_DEPENDENT_INVISIBILITY" class BoxedHalfSpace(StepElement): step_keyword = "BOXED_HALF_SPACE" parameters = {"name": str, "base_surface": Surface, "agreement_flag": False, "enclosure": BoxDomain} class MechanicalDesignGeometricPresentationArea(StepElement): step_keyword = "MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_AREA" class DocumentFile(StepElement): step_keyword = "DOCUMENT_FILE" class GeometricToleranceRelationship(StepElement): step_keyword = "GEOMETRIC_TOLERANCE_RELATIONSHIP" class TerminatorSymbol(StepElement): step_keyword = "TERMINATOR_SYMBOL" class PointReplica(StepElement): step_keyword = "POINT_REPLICA" class DocumentRelationship(StepElement): step_keyword = "DOCUMENT_RELATIONSHIP" class FlatnessTolerance(StepElement): step_keyword = "FLATNESS_TOLERANCE" class SurfaceOfRevolution(StepElement): step_keyword = "SURFACE_OF_REVOLUTION" class DraughtingTextLiteralWithDelineation(StepElement): step_keyword = "DRAUGHTING_TEXT_LITERAL_WITH_DELINEATION" class AutoDesignGroupAssignment(StepElement): step_keyword = "AUTO_DESIGN_GROUP_ASSIGNMENT" class CurveElementIntervalLinearlyVarying(StepElement): step_keyword = "CURVE_ELEMENT_INTERVAL_LINEARLY_VARYING" class VersionedActionRequest(StepElement): step_keyword = "VERSIONED_ACTION_REQUEST" class TextLiteralWithBlankingBox(StepElement): step_keyword = "TEXT_LITERAL_WITH_BLANKING_BOX" class ObjectRole(StepElement): step_keyword = "OBJECT_ROLE" class CsgSolid(StepElement): step_keyword = "CSG_SOLID" parameters = {"name": str, "tree_root_expression": False} class ShapeDefinitionRepresentation(StepElement): step_keyword = "SHAPE_DEFINITION_REPRESENTATION" parameters = {"definition": Unknown, "used_representation": Representation} class GeometricNode(StepElement): step_keyword = "GEOMETRIC_NODE" class FeaShellBendingStiffness(StepElement): step_keyword = "FEA_SHELL_BENDING_STIFFNESS" class MechanicalDesignPresentationArea(StepElement): step_keyword = "MECHANICAL_DESIGN_PRESENTATION_AREA" class DateRole(StepElement): step_keyword = "DATE_ROLE" class DimensionalCharacteristicRepresentation(StepElement): step_keyword = "DIMENSIONAL_CHARACTERISTIC_REPRESENTATION" parameters = {"dimension": Unknown, "representation": ShapeDimensionRepresentation} class Invisibility(StepElement): step_keyword = "INVISIBILITY" class CompositeTextWithExtent(StepElement): step_keyword = "COMPOSITE_TEXT_WITH_EXTENT" class ConfigurationDesign(StepElement): step_keyword = "CONFIGURATION_DESIGN" class PlanarBox(StepElement): step_keyword = "PLANAR_BOX" class ApprovalRelationship(StepElement): step_keyword = "APPROVAL_RELATIONSHIP" class PresentedItemRepresentation(StepElement): step_keyword = "PRESENTED_ITEM_REPRESENTATION" class SymbolTarget(StepElement): step_keyword = "SYMBOL_TARGET" class FeaGroup(StepElement): step_keyword = "FEA_GROUP" class LineProfileTolerance(StepElement): step_keyword = "LINE_PROFILE_TOLERANCE" class MaterialDesignation(StepElement): step_keyword = "MATERIAL_DESIGNATION" class AnnotationOccurrence(StepElement): step_keyword = "ANNOTATION_OCCURRENCE" class FaceOuterBound(StepElement): step_keyword = "FACE_OUTER_BOUND" parameters = {"name": str, "bound": Loop, "orientation": bool} class PasStep(StepElement): step_keyword = "?" class Vertex: pass class Point: pass class Line: pass class Edge: pass class Curve: pass class Face: pass class Polygon2D: pass class Triangle: pass class Rectangle: pass class Square: pass class Circle: pass class Oval: pass class Parabola: pass class Bezier: pass class AARectangularParallelopiped: pass class ArbitraryRectangularParallelopiped: pass class RightAngleWedge: pass class Tetrahedron: pass class Pyramid: pass class ExtrudedTriangle: pass class Hexahedron: pass class Ellipsoid: pass class Sphere: pass class RightCircularCylinder: pass class RightEllipticCylinder: pass class TruncatedRegularCone: pass class TruncatedEllipticCone: pass class Toroid: pass class TruncatedGeneralCoin: pass class ArbitraryTriangularSurfacedPolyhedron: pass class RightParabolicCylinder: pass class RightHyperbolicCylinder: pass class EllipticalParaboloid: pass class EllipticalHyperboloid: pass class EllipticalTorus: pass class Cube: pass class Box: pass class Cylinder: pass class Polygon3D: pass class Pipe: pass class Tube: pass class Cone: pass class DentendSphere: pass class Torus: pass class Ellipsoid: pass class Paraboloid: pass def test_sphere(): '''a simple test to see if we can generate a sphere''' step_objects = [] application_context = ApplicationContext("core data for automotive mechanical design processes") application_protocol_definition = ApplicationProtocolDefinition("committee draft", "automotive_design", 1997, application_context) step_objects.append(application_protocol_definition) #mechanical_context = MechanicalContext("", application_context, "mechanical") mechanical_context = MechanicalContext("", application_context, "mechanical") product = Product("pystep alpha", "pystep alpha", "", [mechanical_context]) product_definition_formation = ProductDefinitionFormation("", "", product) product_definition_context = ProductDefinitionContext("part definition", application_context, "design") product_definition = ProductDefinition("design", "", product_definition_formation, product_definition_context) product_definition_shape = ProductDefinitionShape("", "", product_definition) cartesian_point = CartesianPoint("", [0, 0, 0]) direction13 = Direction("", [0, 0, 1]) direction14 = Direction("", [1, 0, -0]) #wut? -0? axis2_placement_3d = Axis2Placement3d("", cartesian_point, direction13, direction14) cartesian_point21 = CartesianPoint("", [0,0,-5]) vertex_point = VertexPoint("", cartesian_point21) vertex_loop = VertexLoop("", vertex_point) face_bound = FaceBound("", vertex_loop, True) cartesian_point24 = CartesianPoint("", [0, 0, 0]) direction25 = Direction("", [0, 0, 1]) direction26 = Direction("", [1, 0, 0]) axis2_placement_3d_23 = Axis2Placement3d("", cartesian_point24, direction25, direction26) spherical_surface = SphericalSurface("", axis2_placement_3d_23, 5) advanced_face = AdvancedFace("", [face_bound], spherical_surface, True) #FIXME: convert True to .T. closed_shell = ClosedShell("", [advanced_face]) manifold_solid_brep = ManifoldSolidBrep("", closed_shell) #28 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.) ); line_28 = StepList([ LengthUnit(), NamedUnit(Literal("*")), SiUnit(Literal(".MILLI."), Literal(".METRE.")) ]) #29 = ( NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.) ); line_29 = StepList([ NamedUnit(Literal("*")), PlaneAngleUnit(), SiUnit(Literal("$"), Literal(".RADIAN.")) ]) #30 = ( NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT() ); line_30 = StepList([ NamedUnit(Literal("*")), SiUnit(Literal("$"), Literal(".STERADIAN.")), SolidAngleUnit() ]) uncertainty_measure_with_unit = UncertaintyMeasureWithUnit(Literal("LENGTH_MEASURE(1.E-07)"), line_28, 'distance_accuracy_value', 'confusion accuracy') line_27 = StepList([ GeometricRepresentationContext(3), GlobalUncertaintyAssignedContext([uncertainty_measure_with_unit]), GlobalUnitAssignedContext(line_28, line_29, line_30), RepresentationContext("Context #1", "3D Context with UNIT and UNCERTAINTY")]) advanced_brep_representation = AdvancedBrepShapeRepresentation("", [axis2_placement_3d, manifold_solid_brep], line_27) shape_definition_representation = ShapeDefinitionRepresentation(product_definition_shape, advanced_brep_representation) step_objects.append(shape_definition_representation) print export_step(step_objects) class TestStep(unittest.TestCase): def test_essential_parameterization(self): blah = SweptAreaSolid("hello") self.assertTrue(blah.name == "hello") blah = SweptAreaSolid("name goes here", "hi") self.assertTrue(blah.name == "name goes here") self.assertTrue(blah.swept_area == "hi") def test_sphere(self): test_sphere() def test_steplist(self): ##30 = ( NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT() ); some_line = StepList([ NamedUnit(Literal("*")), SiUnit(Literal("$"), Literal(".STERADIAN.")), SolidAngleUnit() ]) results = export_step([some_line]) #print "results are: ", results ##1 = ( NAMED_UNIT(*) SI_UNIT($, .STERADIAN.) SOLID_ANGLE_UNIT()); #self.assertTrue(results == if __name__ == "__main__": unittest.main() #test_sphere()