Intersect Plane on 3D view

Home Forums AR Sandbox Forum Intersect Plane on 3D view

Tagged: , , ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #124206

    Hi, I was wondering if it is possible to draw a plane that intersects the 3d view of the sandbox, I have tried with the curves tool but it seems to do it on Z=0, so I can’t see what I did on the view, is there a way to increase the height of the curves that I draw or some other option available?

    Oliver Kreylos

    You mean you want to have a 3D plane with some position and orientation, and see the trace on the surface where the plane intersects it?


    That’s exactly what I want, I tried using the curves tool, both “curve” and “polyline”, but they seem to run over on Z level=0, so I see the line in the surfaces that are below sea level, but can’t see it on mountains, so I was wondering if there was a plane tool or something similar

    Oliver Kreylos

    There is specific functionality to show dipping beds. It is exposed via SARndbox’s command pipe. First, create a named UNIX pipe somewhere in the file system, say in the directory from which you typically run the program:

    cd ~/src/SARndbox-2.7
    mkfifo SARndbox.fifo

    Then run SARndbox with the additional -cp <pipe name> command line argument:

    ./bin/SARndbox <usual command line parameters> -cp SARndbox.fifo

    You can now enable the dipping bed by writing its plane equation to the command pipe, like so:

    echo dippingBed <nx> <ny> <nz> <offset> > SARndbox.fifo

    where <nx>, <ny>, and <nz> are the plane’s normal vector and <offset> is the origin offset, i.e., the planes are specified in non-normalized Hessian form. The ">" in front of SARndbox.fifo has to be typed literally, it’s an output redirect operator to print to the pipe instead of the terminal.

    For example, to draw a horizontal plane at zero elevation, write

    echo dippingBed 0.0 0.0 1.0 0.0 > SARndbox.fifo

    You can turn the dipping bed off again by writing:

    echo dippingBed off > SARndbox.fifo

    It’s probably best to make scripts for these commands, and bind those scripts to buttons/keys inside SARndbox via the ScriptExecutorTool.

    • This reply was modified 1 year, 2 months ago by Oliver Kreylos. Reason: Added example and clarification

    Thank you so much! Does this plane reacts with the terrain in real time (it distortes when hitting mountain-lakes) or is it a straight line over the map?

    Also, is there a way to make a script that shows a pop-up menu, like the one that appears with the “Water Simulation Control” option, to enter the values of the dippingBed interactively, because I can make the script to modify the values on the pipe but I would love if other people could add their own values without having to modify them in the script

    Oliver Kreylos

    I generally do it so that the script to enable a bedding plane, which is in turn bound to a button, reads in another text file containing only the strike and dip angles and center elevation. The script converts those to a plane equation and writes that into the command pipe.


    Thanks, I’ll do that then, on another note I would like to see what is called the “rule of the V”

    Currently, when I add a dipping bed I see this:

    Terrain with dipping bed
    Current view

    is there a way to show this instead:

    Desire view


    Edit: I want to see the rule of the V in the terrain

    Example: I’ve got a dipping bed on the terrain:

    I see this:

    is there a way to show this:

    Oliver Kreylos

    You shouldn’t be seeing a straight line, as per your second picture. You would only get that if the dipping bed is vertical, i.e., the plane normal vector has a zero z component. What you should see is closer to your third picture, but with a thin red band instead of a half-plane.

    What are the exact commands you are sending to the control pipe?

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.

Comments are closed.