Not to take this thread in a different direction.... Sean - if you get serious about embedding a scripting language into BRL-CAD, you might also consider AngelScript <https://www.angelcode.com/angelscript/>. It is much less well known than many of the alternatives, but it has the feature that it was designed to be embedded in C++ programs.
We use it in OpenVSP and have found it very easy to embed and to work with. We use it for user-defined functions and plugin-like capabilities. We also use it as a built-in scripting capability so users can automate OpenVSP with no dependencies (no Python, no compiler, etc). In addition, we have a C++ API that users could use to develop their own application that uses OpenVSP's capabilities as a library -- we wrap/bind that API using Swig. We publish Python bindings and give instructions for Matlab bindings as those are the two most used by our users. There is some work keeping the AngelScript side of the API and the C++ API consistent -- but Swig makes supporting additional languages easy. Rob On Tue, Jan 19, 2021 at 10:50 AM Christopher Sean Morrison via brlcad-devel <brlcad-devel@lists.sourceforge.net> wrote: > Hi Daniel, > > Yes, import via 3dm-g or step-g are the two main methods. They can also > be created directly with openNURBS — there are several source code examples > in src/proc-db (see the C++ files). > > Lua is good stuff and obviously really easy to integrate.. but there has > also been good progress made on a direct python interface too. That code > currently resides in a repo fork, but was last worked on by Jaipal in 2018 > — he’s got a nice article up at > https://medium.com/@Mr_Jaypee/brl-cads-python-procedural-geometry-990e3c286a63 > and > the code is on github. > > I don’t think python or lua as a new required dep are a problem at all. > I’ve had a goal for years to have a built-in procedural primitive where one > can describe geometry and define behavior with code (starting with either > tcl, lua, python, or pure “ged” command listings). Orthogonal to creating > NURBS entities of course.. > > Cheers! > Sean > > > On Jan 19, 2021, at 1:39 PM, Daniel Roßberg <danielmrossb...@gmail.com> > wrote: > > Hello all, > > I was recently asked, how to create a NURBS solid in BRL-CAD. > Unfortunately, I didn't know another possibility than importing them from > Rhino. It should however be possible to create them with openNURBS > functionality. > > My idea is to wrap the openNURBS classes by the Lua scripting language. > Because of its compactness, it would be possible to bundle it with BRL-CAD > and have it accessible from mged. > > It should also be mentioned that there is already a Python scripting > interface with the rhino3dm interface. But, making this standard for > BRL-CAD would bloat the program a bit, or? > > What do you think? > > Regards, > Daniel > _______________________________________________ > BRL-CAD Developer mailing list > brlcad-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/brlcad-devel > > > _______________________________________________ > BRL-CAD Developer mailing list > brlcad-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/brlcad-devel >
_______________________________________________ BRL-CAD Developer mailing list brlcad-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-devel