Skip to content
brep-conformancegithub

read_step

Exchange · api.md § read_step · all operations

read_step(text: string) -> Solid

Reads the solids that a STEP file holds, together as one solid set. text is the contents of a STEP file, in AP203, AP214 or AP242. A file written by write_step reads back as the same solid, which means the same set of points within the tolerance.

Example. The text is the file write_step returned for the box.

> {"cmd": "read_step", "text": "ISO-10303-21;\nHEADER;\n
   FILE_DESCRIPTION(('springrep solid'),'2;1');\n
   FILE_NAME('conformance','',(''),(''),'','springrep','');\nFILE_SCHEMA(('AU… (10,474 characters)"}
< {"ok": 1}

A STEP file travels as a string holding the file's contents: all of its text, from ISO-10303-21; to END-ISO-10303-21;, in the clear-text encoding of ISO 10303-21. The string is never a path or a file name, because the kernel and the suite need not share a disk. The adapter hands the kernel that text as UTF-8 bytes. The files the suite writes use only the standard's basic alphabet, which is plain ASCII.

FunctionFieldsReturns
write_stepsstring
sewtext, toleranceSolid
read_steptextSolid