Please enable JavaScript to view this site.

Knowledge Bridge Documentation

Help version: 3.3.8

Description

The Scene design is a modeling/rendering environment. A model can only exist in one scene. With the Scene design you can use an image for the background, you can also

use a color for the background. There are 140 color names supported by all browsers, here's a link to the color list: https://www.w3schools.com/colors/colors_names.asp

 

Scene0

Parameter Rules

background: The background color or url for the scene. If 'transparent' is given, the background will not show.
Example:return R.getUrl({ name: 'Shop2.jpg', id: 'e9ce86f5-60e7-4819-3e88-08d8e3071800' });

 

backgroundType: One of 'color', 'image', 'environment'. For 'image', 'environment' the background property should contain the texture url.
Example:'image'

 

camera: The camera/view to use as the starting render. Thereafter, the user has control over the view. This defines the 'home view' of the scene.
Example:R.world.RenderLibrary.Views.Iso;

 

enableShadows: Whether shadows should be cast in this scene. If true, shadows still require lights that can cast them and objects that can accept them.
Example:true ;

 

isDrawing: Whether the scene is being used to show a DrawingSheet.
Example:false;

 

paperHeight: The vertical size of the 'paper' being used for drawing scenes. Ignored otherwise.
Example:10 ;

 

paperUnits: One of 'in', 'mm', or 'cm'. The units to be used in drawing scenes.
Example:'In' ;

 

paperWidth: The horizontal size of the 'paper' being used for drawing scenes. Ignored otherwise.
Example:10;

 

PDFname: The name of the PDF file generated when the generate PDF button is pressed.
Example:"Table" ;

 

renderStyle: One of 'default', 'wireframe', 'shaded', 'shadedEdges', 'hiddenLine', or 'hiddenLineDashed'. Default is equivalent to shadedEdges.
Example:'shadedEdges' ;

 

sceneLabel: The text to be used to represent the scene in various UI aspects, such as the scene drop-down menu.
Example:'MyScene';

 

sceneName: The name to reference the scene. Cannot include spaces or special characters.

If you use a name already in use, for example 'model', your definition will override the system default.

Example:'MyScene';

 

use2DControls: Whether to use 2D graphic controls when displaying the scene.
Example:false ;

 

useDefaultLights: Whether the standard, system-defined lighting should be included in the scene. If true and additional [[Light]]s are added, they will be added in addition to the standard lights. To have complete control over lighting, set this to false.
Example:true ;

 

 

Mixins

BaseModel

 

RULE NAME

TYPE

DEFAULTS

CATEGORY

FLAGS

background

string

"0xebf8f7"

Render

Cached
Parameter

backgroundType

string

"color"

Render

Cached
Parameter

camera

model

R.world.RenderLibrary.Views.Iso

Render

Cached
Parameter

enableShadows

boolean

true

Render

Cached
Parameter

isDrawing

boolean

false

Render

Cached
Parameter

paperHeight

number

10

Render

Cached
Parameter

paperUnits

string

"in"

Render

Cached
Parameter

paperWidth

number

10

Render

Cached
Parameter

PDFname

string

`${R.rootModel.name}-${this.sceneName}.pdf`

Render

Cached
Parameter

renderStyle

string

this.sceneName

Render

Cached
Parameter

sceneLabel

string

"0xebf8f7"

Render

Cached
Parameter

sceneName

string

<Empty>

Render

Cached

Required
Parameter

use2DControls

boolean

this.isDrawing

Render

Cached
Parameter

useDefaultLights

boolean

true

Render

Cached
Parameter

 

 

 

kBridgeExampleIcon

 

Project Example:

In your kBridge Examples Projects folder open the project called ‘BooleanSolidExample’.

 

Scene3Scene2

Reference Location:

'world.booleansolidexample.scene'

 

 

The Scene design can be placed anywhere under the root design.

 

 

Scene6

 

 

 

When in the BooleanSolidExample project  click on the 'Run Custom UI' icon.

 

Scene4

 

 

 

A background image was placed into the  Resources folder in the Project section named 'Shop2'. In the background rule the 'Get Reference' box was checked and the

Shop2.jpg file was selected. This automatically fills in this text ;{ name: 'Shop2.jpg', id: 'e9ce86f5-60e7-4819-3e88-08d8e3071800' }. The 'if' statement

was added to work with the UI.

 

Scene7

 

In the UI, the Scene Name was set to 'MyScene' . This sets the model to show up in the 'MyScene', if set to 'model' then the model will show up in the 'model' viewer . You change the

view with the pop-up menu in the lower left hand corner of the Model Viewer.

 

Because we want to use an image for the Background, the Background Type must be set to 'image'.

 

Scene5

 

To change the background to a color, select 'color' from the 'Background Type' pull down menu and select or write in a color from the 'Background pull down menu.

 

 

Scene8

Knowledge Bridge from Engingeering Intent is a full-featured engineering and sales automation environment