> On 3 Feb 2017, at 21:14, Todd Pierce <[email protected]> wrote: > > Gorgeous Stuff Christophe, > > I may be a bit confused here, but it may not address the (live) command-line > generation of geometry. I was looking into what McBain was doing with > FreeCAD, but it looks like even what you're doing McBain, is scripting. > Correct me if I'm wrong, but this is the same drawback I'm encountering with > Gmsh. Gmsh won't accept piped input either. > > I'm looking for a package that can display graphics as the commands arrive at > its input pipe. Yes, this is weird, but I'm trying to embed the entire > multi-phyics suite of tools, including the generation of geometry, into a > *live* pipeline. This is a natural language processor I am developing, so > the user (me) will require interactivity with the whole process. Do you guys > understand what I'm trying to do? Notice that BRL-CAD does exactly this, in > a fashion quite similar to Gnuplot, where the graphical output is displayed > as commands arrive at its input pipe,
As scripts can be executed in Gmsh command by command, you can definitely create a pipe to get an interactive system. Here's a working example where we create a separate interactive command line program (like gnuplot) that simply feeds in scripting commands to Gmsh: https://onelab.info/svn/gmsh/trunk/utils/solvers/c++/interactive.cpp. You can easily create a similar driver that would use a pipe. Christophe > though I have no idea if BRL-CAD can really output the right file type for > meshing, or even if you experts would advise against BRL-CAD because it's too > primitive for other reasons. > > So, McBain, did I miss your point or can FreeCAD be truly interactive from > the command line? (or in this case, its pipe) > > And Christophe, since you're obviously deep into these types of software, do > you have any suggestions? > > -Todd . > > On Fri, Feb 3, 2017 at 6:49 AM, Christophe Geuzaine <[email protected]> > wrote: > > As a little teaser, just to let you know that I'm coding a direct interface > to OpenCASCADE CAD creation right in .geo files. This will in particular > support automatic creation of conform interfaces when you fuse solids, in > order to handle internal boundaries. > > Here's what the scripts will look like (not everything is in the SVN trunk > yet): > > SetFactory("OpenCASCADE"); > > Mesh.Algorithm = 6; > Mesh.CharacteristicLengthMin = 0.4; > Mesh.CharacteristicLengthMax = 0.4; > > R = 1.4; > s = .7; > t = 1.25; > > Block(1) = {-R,-R,-R, R,R,R}; > > Sphere(2) = {0,0,0,R*t}; > > BooleanIntersection(3) = { Volume{1}; Delete; }{ Volume{2}; Delete; }; > > Cylinder(4) = {-2*R,0,0, 2*R,0,0, R*s}; > Cylinder(5) = {0,-2*R,0, 0,2*R,0, R*s}; > Cylinder(6) = {0,0,-2*R, 0,0,2*R, R*s}; > > BooleanUnion(7) = { Volume{4}; Delete; }{ Volume{5}; Delete; }; > BooleanUnion(8) = { Volume{6}; Delete; }{ Volume{7}; Delete; }; > BooleanSubtraction(9) = { Volume{3}; Delete; }{ Volume{8}; Delete; }; > > > <wiki.png><coool.png> > > >> On 2 Feb 2017, at 23:28, G. D. McBain <[email protected]> wrote: >> >> >> >> Sent from ProtonMail, Swiss-based encrypted email. >> >> >>> -------- Original Message -------- >>> Subject: [Gmsh] BRL-CAD for Geometry? >>> Local Time: 2 février 2017 4:07 PM >>> UTC Time: 2 février 2017 05:07 >>> From: [email protected] >>> To: [email protected] >>> >>> Hi All, >>> It's me again, wondering how I should go about integrating a command-line >>> geometry package into OneLab (or some other chain of multi-physics tools). >>> As I've mentioned before, although there is no shortage of tools to do >>> meshing, finite element analysis or CFD and so forth, there is no simple >>> way to build geometries from the command line. >>> >>> Has anybody ever used this BRL-CAD/Mged command line CAD package? It >>> doesn't look bad, but I do have concerns about it exporting to formats that >>> these meshing and physics programs use. >> >> In the past I have used BRL-CAD's mged command-line tool to create >> geometries for subsequent CFD simulations. I used BRL-CAD's g-stl >> command-line tool to export a triangulation of the bounding surface in STL >> format. Gmsh can read this in. >> >> More recently though I'm using FreeCAD which can be scripted in Python and >> so run from the command-line. Besides STL, this also outputs IGES, STEP, >> and BRep, which can contain more information that STL. Gmsh reads all four >> formats. >> >> OpenSCAD is an excellent accompaniment to FreeCAD too, especially via Solid >> Python. >> >> Often my workflow looks like FreeCAD -> Gmsh -> FreeFem++ -> (Gmsh or >> pandas), with the whole thing run from a single SCons build file. No GUIs, >> except for preliminary exploratory work. >> >> I haven't looked into OneLab yet. >> >> _______________________________________________ >> gmsh mailing list >> [email protected] >> http://onelab.info/mailman/listinfo/gmsh > > -- > Prof. Christophe Geuzaine > University of Liege, Electrical Engineering and Computer Science > http://www.montefiore.ulg.ac.be/~geuzaine > > Free software: http://gmsh.info | http://getdp.info | http://onelab.info > > -- Prof. Christophe Geuzaine University of Liege, Electrical Engineering and Computer Science http://www.montefiore.ulg.ac.be/~geuzaine Free software: http://gmsh.info | http://getdp.info | http://onelab.info _______________________________________________ gmsh mailing list [email protected] http://onelab.info/mailman/listinfo/gmsh
