(2019-06-17, 13:46)Lasse Deleuran Wrote: I have done my best to make it reusable for others, and focused on basic tree traversal. The Javascript file basically consists of pairs of functions, and converting it to any other object oriented or functional language should be a breeze.
The potentially difficult part would be to match the data model. The LDraw (or MPD) file structure is parsed into a tree structure: Each 'file' in an MPD file is represented by one type of nodes. Each step within it as a second type of node, and finally each line is a third type of node.
Other programs might not model steps as separate nodes, but as long as you model MPD files as tree structures, then translation to another program should be fairly easy.
I have added documentation to the LDROMR.js file to help potential developers both to add their own checks and to translate everything to another language.
Awesome. I’ll look into it at some point.
Santeri is working on a part validator but it’s written in python. I don’t want to step on his toes.