3 ms·
For folks who are curious about this, see: https://cad.onshape.com/FsDoc/ https://cad.onshape.com/FsDoc/ My surmise is that this is tightly coupled with Paras
by WillAdams 9mo ago
For folks who are curious about this, see:
https://cad.onshape.com/FsDoc/ https://cad.onshape.com/FsDoc/
My surmise is that this is tightly coupled with Parasolid, so it wouldn't be feasible to create an implementation of this language using some other CAD kernel?
- DannyBee 9mo agoYou could port it, but i don't think the geometry kernel is the hard part. The code for the standard library is here: https://cad.onshape.com/documents/12312312345abcabcabcdeff/w/a855e4161c814f2e9ab3698a/e/c5ff8113357f488da64dfc2a https://cad.onshape.com/documents/12312312345abcabcabcdeff/w... (Click tab manager in the bottom left and you'll get a nicer list of the files involved) The actual representation is essentially dictionaries. IE transform is a functon that looks like this: /** * Construct a [Transform] using the matrix argument for rotation * and scaling and the vector argument for translation. */ export function transform(linear is Matrix, translation is Vector) returns Transform precondition { matrixSize(linear) == [3, 3]; is3dLengthVector(translation); } { return { "linear" : linear, "translation" : translation } as Transform; } Fillets, for example, are a whole bunch of featurescript UI around fillet operations: https://cad.onshape.com/documents/12312312345abcabcabcdeff/w/a855e4161c814f2e9ab3698a/e/841b26d2621a46bf98eda1d5 https://cad.onshape.com/documents/12312312345abcabcabcdeff/w... (The underlying fillet ops are opFullRoundFillet, etc. All of this is UI to generate the parameters and highlight the results and such) The actual geometry ops are in geomOperations. Those are the geometry primitives you'd have to duplicate, and they are fairly standard. Fillets, holes, CSG, etc. It would not be a ton of work (IMHO) to have a geometry kernel that supports what they support. The UI related primitives, the query engine, etc, those are i think where you'd have real work to do.