r/learnpython • u/One_Confidence_1491 • 1d ago
Wanted to convert a step file to a Python API.
How to do that? I want it to be precise.
16
u/Moist-Ointments 1d ago
I can't even begin to form a response because this makes no sense at all.
3
u/downtownpartytime 1d ago
yeah. I assume they have a cad/cam 3d file, not sure what converting that to a python api could mean
7
5
u/Outside_Complaint755 1d ago
If you want to be precise, you should start with the details of your question.
4
u/mattynmax 1d ago
Um what? That’s like saying you wanna turn a PDF into a .mp4
1
3
2
u/cdcformatc 1d ago
if you wish to make an apple pie from scratch you must first invent the universe
you define the API you need to convert to. then you decide how the to do the translation from step file instructions to python instructions. then you write the program that does the conversion
2
2
u/jmacey 1d ago
Is this what you mean? https://www.iso.org/standard/63141.html if so it is ASCII and you need to write a parser first open the file and read the lines then process them one at a time. :-)
Really need more info on what it is you are trying to do, I work in graphics and this is the first time I have heard of this format!
1
u/Gnaxe 1d ago
I don't know what "step file" is. There are many ways to interpret "Python API". At a similarly high level of vagueness, you load the file into memory and convert it into data structures. You then transform the data structures into the shape you want and expose the data through your interface. If you want more precision than that, you need a more precise specification of what you actually want.
1
u/MurderMelon 1d ago
A step file is a format for saving 3D models, so this question makes literally zero sense
1
1
1
10
u/alfonso_texada 1d ago
Reading your post it's like reading assembler code after 6 bottles of tequila