the main window of the 3d editor More...
The layout3d object is the main window of the 3d editor, with the same role as layout for 2d. In a C++ macro you use the name layout3d; if no 3d window is open, one is created. The solid model lives in layout3d->drawing, a drawingField3d with cells and meshes. filename is the path of the loaded 3d file. Toolbar and extra-keyboard helpers match the 2d window. From a 2d layout you can also open a linked 3d window with project getLayout3d.
Example:
layout3d->filename = "/tmp/part.step";
layout3d->drawing->scaleFull();
Set the feature of an extra keyboard. key is the number of the key. It is numbered from 0 to the amount of keys the keyboard has. function is the feature code of the featur you want to add. As toolbutton, modification of the extra keyboard are not store and it is recommended to set it with an autostart macro. (introduced with release 20210905)
Assigns one key of an external keyboard to a macro. key is the key number. macroFileName is the full path of the macro, title the caption, and iconFileName the full path of the icon file. (introduced with release 20210910)
| Parameter: | |
|---|---|
| key | key index on the extra keyboard |
| macroFileName | full path of the macro file |
| title | caption shown for the key |
| iconFileName | full path of the icon file |
Adds a button to the Macros toolbar (created if missing). macroName is the macro file. iconfilename is the icon; empty or missing uses the default. The button is not stored at shutdown; restore it from an autostart macro.
| Parameter: | |
|---|---|
| macroName | macro file to run |
| parameter | reserved; pass an empty string |
| iconfilenam | path to the button icon |
The file name of the current displayed design.
Pointer to the 3d design, a drawingField3d.
Closes the current displayed design.
Holds the name of the toolbar containing custom macros. The name must be set before the first macro is added to the toolbar. (introduced with release 20260628)