pylib.data_step module¶
STEP reader.
- Date
2020-01-03
-
b_spline_curve_with_knots_geometry(b_spline, p1, p2)[source]¶ Currently only clamped b_spline curves and assumed, i. e. closed = False.
-
data_cmds_to_data_dict(data_cmds, verbose=False)[source]¶ Create dict with step objects
1st it creats keys equal to the number id string and values with the command string.
2nd it creats keys for different step object types to dict all commands as new created objects of that type.
- Example
from: ["#12 = CARTESIAN_POINT('',(0.E+000,0.E+000,0.E+000))", "#22 = VERTEX_POINT('',#23)"] to: {'#12': 'CARTESIAN_POINT('',(0.E+000,0.E+000,0.E+000))', '#22': 'VERTEX_POINT('',#23)'} additional { 'cartesian_points': { '#12': pointer_to_new_created_point_object, ... }, 'vertex_points': { '#22': pointer_to_new_created_vertex_object, ... }, ... }
-
class
step(file_name)[source]¶ Bases:
objectSTEP reader class.
1st read a STEP file. 2nd convert header and data section string to list of commands.
The STEP file string can have commands distributed over several lines, the commands are seperated by
;\n. This class un-wraps each command into one line (remove\n) and removes empty lines.- Example
header part of a step file (between HEADER; and ENDSEC;): FILE_DESCRIPTION(('Open CASCADE Model'),'2;1'); FILE_NAME('Open CASCADE Shape Model','2019-10-14T14:32:20',('Author'),( 'Open CASCADE'),'Open CASCADE STEP processor 7.1','Open CASCADE 7.1' ,'Unknown'); FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 1 1 1 1 }')); will result in (but as a list): FILE_DESCRIPTION(('Open CASCADE Model'),'2;1') FILE_NAME('Open CASCADE Shape Model','2019-10-14T14:32:20',('Author'),('Open CASCADE'),'Open CASCADE STEP processor 7.1','Open CASCADE 7.1','Unknown') FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 1 1 1 1 }'))