Rhino and STEP files
Bring geometry in from Rhino with copy and paste or the SendToAtrium button in the Bond Rhino plugin, and drop STEP and IGES files onto an editor.
Bring geometry in from Rhino with copy and paste or the SendToAtrium button in the Bond Rhino plugin, and drop STEP and IGES files onto an editor.
If you've drawn part of your design in Rhino, you don't need to redraw it in Atrium. There are three ways to bring geometry into Atrium: copy and paste directly from Rhino, the SendToAtrium button in the Bond Rhino plugin, and dropping STEP or IGES files onto an open editor. All three take the same route inside Atrium and give the same result.
What gets pasted depends on the open editor:
| Open editor in Atrium | What comes in |
|---|---|
| 0D | Exact solids and surfaces (NURBS, not meshes); curves come in as free shapes |
| 1D cross-section and tool profile | Curves, and the edges of a planar surface |
| Assembly | Same as dropping a STEP file: solids and surfaces open a new 0D editor, and curves on their own open the 1D cross-section editor. When you save, the part goes back into that assembly. |
Pasting from Rhino works without installing any plugin. The Bond Rhino plugin makes it more reliable.
With the Bond Rhino plugin installed, your Rhino selection is sent to Atrium as a STEP file, written by Rhino's own STEP exporter. There are two ways to send it.
SendToAtrium command).| Topic | Behavior |
|---|---|
| Part name | The STEP file name becomes the part name in Atrium: the object's name in Rhino; if it has none, the block name; otherwise a name like "Rhino 12". |
| Curves | Become a 1D cross-section. |
| Solids and surfaces | Become a 0D part. |
| Several objects at once | All go into one STEP file, which means one part. So select only the objects that together make up a single part. |
| Units | The model units travel with the file, and Atrium converts them to millimeters. |
| Atrium isn't open | The plugin tells you Atrium isn't open and does nothing. |
| Errors | Send errors appear on the Rhino command line. If Atrium has trouble reading the file, the error shows inside Atrium, just like with a dropped file. |
The part is positioned by the same rules as a dropped file (see below).
With the plugin, Ctrl + C in Rhino also puts a STEP file of the same selection on the clipboard, alongside Rhino's own data, so pasting inside Rhino works as before. Ctrl + V in Atrium (assembly, 0D and 1D) decides what to paste in this order:
Drag one or more STEP (.step or .stp) or IGES files from Windows Explorer and drop them onto an open Atrium editor:
| Open editor | Result |
|---|---|
| Assembly | A new 0D or 1D part editor opens. On the first save, the part goes back into that assembly. |
| 0D | The geometry comes into that part. |
| 1D cross-section | The geometry comes into that cross-section. |
| No editor that accepts files is open | A new part editor opens for each file. |
A STEP file carries its model units, and Atrium converts them to millimeters. Models in centimeters, meters or inches work fine.
This section is for anyone who wants to send files to Atrium from another program, such as a Rhino plugin. Atrium opens a named pipe that exists only while Atrium is running, is available only to the current Windows user and stays idle until a message arrives.
.step / .stp; IGES is also accepted) to a temp folder, for example %TEMP%\AtriumBridge\.Rhino 12. Remove any characters Windows doesn't allow in file names.Before connecting, call AllowSetForegroundWindow(ASFW_ANY) (from user32) so Atrium can bring its window to the front. Then connect to this pipe on the local machine (connection timeout of about 1 second):
atrium-bridge-<windows user name>
new NamedPipeClientStream(".", "atrium-bridge-" + Environment.UserName, PipeDirection.InOut)
In the user name, every character outside A-Z a-z 0-9 _ . - is replaced with _. If the connection fails, Atrium isn't open.
Send one line of UTF-8 encoded JSON, ending with \n:
{"v": 1, "cmd": "import", "files": ["C:\\Users\\...\\AtriumBridge\\Cabinet side.step"]}
Read one line of JSON back, then close the connection:
{"ok": true, "editor": "assembly", "files": 1}
{"ok": false, "error": "No readable STEP/IGES file arrived"}
ok is false, show error to the user.editor tells you where the file went: "assembly", "part_0d", "part_1d", "tool", "other" or "" (no editor that accepts files is open, so each file becomes a new part).To check whether Atrium is open (for example, to gray out a button when it isn't):
{"v": 1, "cmd": "ping"}
{"ok": true, "app": "Atrium", "version": "x.y.z", "editor": "..."}
After Rhino's own Copy command finishes (for example, in Command.EndCommand for Copy or CopyToClipboard), write the same selection to a temporary STEP file and add the Atrium.GeometryFiles format to the clipboard alongside Rhino's data. Keep Rhino's own formats so pasting in Rhino still works. The content is the UTF-8 bytes of this JSON:
{"files": ["C:\\Users\\...\\AtriumBridge\\Cabinet side.step"]}
A .NET (UTF-16) string, or one path per line, is also accepted. In .NET:
// copy the current DataObject's formats into a new DataObject, then:
obj.SetData("Atrium.GeometryFiles", new MemoryStream(utf8Bytes));
Clipboard.SetDataObject(obj, true);