Class Reference view3dModule

A module with a 3d viewer. More...

Member

void depositReset()
void deposit(int source, bool invert, int thickness, int destLayer=-1, double edgeCover=0)
void depositFill(int soucre, bool invert, int toLevel, int destLayer=-1)
void depositSetLevel(int soucre, bool invert, int toLevel)
void extrude(int source, int bottomLevel, int topLevel, int destLayer=-1)
void extrudeCurrentCell()
void extrudeCurrentSelection()
void extrudeCurrentView()
void extrudeSlant(int source, int bottomLevel, int topLevel, int extensionBottom, int extensionTop,int destLayer=-1)
void extrudeCurved(int source, pointArray edge, int destLayer=-1)
void loadModel(int source,int zLevel, string rotation)
void rotate(int source,double angle=360,int spiral=0,int destLayer=-1)
void syncUnits()
void syncView()
void blockToModel(int sourceLayer,int destLayer, int lower,int upper)
void bottomRoundedBlockToModel(int sourceLayer,int destLayer, int upper,int radius,int steps)
void clearModel()
void export3d( string filename )
void import3d( string filename )
void slantBlockToModel(int sourceLayer,int destLayer, int lower,int upper,int topextension,int bottomextension)
void topRoundedBlockToModel(int sourceLayer,int destLayer, int lower,int radius,int steps)
void trigger3dRenderAll()
void trigger3dRenderSelect()
void trigger3dRenderView()
void trigger3dRenderAuto()
void trigger3dRenderModel()

Detailed Description

graph LR la(layout)--view3dTool-->vm3(view3dmodule) click la "/layoutscript/api/layout" click vm3 "/layoutscript/api/view3dmodule" classDef thisClas fill:#eaf5fc,stroke:#3c7faa,stroke-width:4px; classDef clas fill:#eaf5fc,stroke:#3c7faa,stroke-width:1px; class vm3 thisClas class la clas

This module is the interface to create a 3d layout from the normal two dimensional layout. The member feature marked as obsolete is available in older releases.

Member Function Documentation


void view3dModule::depositReset()

the surface resulted from prior depositions will be reseted.


void view3dModule::deposit(int source, bool invert, int thickness, int destLayer=-1, double edgeCover=0)

similar to the extrude command this method will create extruded shapes in the layout3d. The level of the 3d shapes will be calculated from prior depositions. Only shape created with a deposition command will be respected. Shapes create e.g. with the extrude command are ignored to calculate the z level. With the optional parameter edgeCover a cover of edges can be set. The value is a relative value to the deposited layer.


void view3dModule::depositFill(int soucre, bool invert, int toLevel, int destLayer=-1)

similar to the deposit command, however not a constant thickness will be created but any surface lower the entered level will be filled to this level.


void view3dModule::depositSetLevel(int soucre, bool invert, int toLevel)

similar to the depositFill command, however no shapes will be output to the 3d window. Only the surface for following depositions will be adjusted.


void view3dModule::extrude(int source, int bottomLevel, int topLevel, int destLayer=-1)

Source shapes all be added and extruded to the layout3d. bottomLevel and topLevel are the z-values. If source is positive it is uses the correspondent layer. A '-1' will use shapes from a previous boolean operation, '-2' will use selected shapes and '-3' will use all shapes of the cell. destLayer if positive will use the layer color of that layer in the layout3d.


void view3dModule::extrudeCurrentCell()

The current cell of the layout view will be added to the layout3d with z-values from the LayerManager.


void view3dModule::extrudeCurrentSelection()

The current selection of the layout view will be added to the layout3d with z-values from the LayerManager.


void view3dModule::extrudeCurrentView()

The current layout view will be added to the layout3d with z-values from the LayerManager.


void view3dModule::extrudeSlant(int source, int bottomLevel, int topLevel, int extensionBottom, int extensionTop,int destLayer=-1)

An extrude with slant edges. parameter as identical to the extrude method.


void view3dModule::extrudeCurved(int source, pointArray edge, int destLayer=-1)

Source shapes all be added and extruded to the layout3d. edge describes the edge curve of the extrusion. If source is positive it is uses the correspondent layer. A '-1' will use shapes from a previous boolean operation, '-2' will use selected shapes and '-3' will use all shapes of the cell. destLayer if positive will use the layer color of that layer in the layout3d.


void view3dModule::loadModel(int source,int zLevel, string rotation)

Text element on the source will be used as model file name for the 3d layout. The model will be added as the text element position on the zLevel. An addition rotation like 'rx180' or 'ry90' can be added. The source parameter is identical to the extrude method.


void view3dModule::rotate(int source,double angle=360,int spiral=0,int destLayer=-1)

Shapes on the source will be rotated around the Y-axis. angle is the rotation angle and spiral parameter will make a sprale from the shape. All other parameter are identical to the extrude method.


void view3dModule::syncUnits()

Databaseunits and userunits of the layout3d window will be set identical to the layout window. The physical size of the layout3d design is unchanged, the database value of the mesh objects will be adjusted.


void view3dModule::syncView()

The view perspective of the layout window and the layout3d window will be made identical.

Obsolete Members


void view3dModule::blockToModel(int sourceLayer,int destLayer, int lower,int upper)

Obsolete

Adds the sourcelayer as a block to the model. If sourceLayer equals -1 the result of the last boolean operation is used. lower and upper are the height level of the block. The color setup of the destLayer will be used.


void view3dModule::bottomRoundedBlockToModel(int sourceLayer,int destLayer, int upper,int radius,int steps)

Obsolete

Adds the sourceLayer as a block to the model. All edges at the bottom will have a radius. If sourceLayer equals -1 the result of the last boolean operation is used. lower and upper are the height level of the block. The color setup of the destLayer will be used.


void view3dModule::clearModel()

Obsolete

Beside the simple 3d display which uses a level and a hight for each layer and display all struktures as a block there is a alternative way to enable a 3d display. Here a model is used. You had to add all 3d elements to an model and trigger its display via a macro. This method enables more eventualities in the 3d display. You can define implicit boolean operation and you can generate non verticality geometries. Before to start defining a model clear a model with this method. After defining the model with commands like block to model, ... trigger a rendering


void view3dModule::export3d( string filename )

Obsolete

Will save the current 3d modell to a [[DXF]] file. Only the model data is stored, the current view (angle/magnification) is ignored. The user units will be used as DXF units.


void view3dModule::import3d( string filename )

Obsolete

Will load a 3d [[DXF]] file to the 3d window. The 3d dxf layer will be mapped to existing layers with identical names. Non existing layers will be mapped to layer 0. Only visible layers will be displayed. The initial view from the (2d) layout window is used. So it is useful to open and ScaleFull that design before importing the 3d.


void view3dModule::slantBlockToModel(int sourceLayer,int destLayer, int lower,int upper,int topextension,int bottomextension)

Obsolete

Adds the sourceLayer to the model. If sourceLayer equals -1 the result of the last boolean operation is used. The color setup of the destLayer will be used.


void view3dModule::topRoundedBlockToModel(int sourceLayer,int destLayer, int lower,int radius,int steps)

Obsolete

Adds the sourceLayer as a block to the model. All edges at the top will have a radius. If sourceLayer equals -1 the result of the last boolean operation is used. lower and upper are the height level of the block. The color setup of the destLayer will be used.


void view3dModule::trigger3dRenderAll()

Obsolete

renderAll will be called after the macro terminates or the user interface is updated.


void view3dModule::trigger3dRenderSelect()

Obsolete

renderSelect will be called after the macro terminates or the user interface is updated.


void view3dModule::trigger3dRenderView()

Obsolete

renderView will be called after the macro terminates or the user interface is updated.


void view3dModule::trigger3dRenderAuto()

Obsolete

renderAuto will be called after the macro terminates or the user interface is updated.


void view3dModule::trigger3dRenderModel()

Obsolete

renderModel will be called after the macro terminates or the user interface is updated.