tecnomatix plant simulation worldwide user conference 3d...

18
© Siemens AG 2014 All rights reserved. Smarter decisions, better products. Plant Simulation 3D Tutorial Tecnomatix Plant Simulation Worldwide User Conference 2014 © Siemens AG 2014 All rights reserved. 2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014 Page 2 Siemens PLM Software Plant Simulation 3D Tutorial 1. User Interface 2. 3D Representation 3. Animations 4. Improving Performance

Upload: doantuong

Post on 26-Apr-2018

303 views

Category:

Documents


13 download

TRANSCRIPT

Page 1: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved. Smarter decisions, better products.

Plant Simulation 3D Tutorial

Tecnomatix Plant Simulation Worldwide User Conference 2014

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 2 Siemens PLM Software

Plant Simulation 3D Tutorial

1. User Interface

2. 3D Representation

3. Animations

4. Improving Performance

Page 2: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 3 Siemens PLM Software

User Interface

Plant Simulation 3D Tutorial

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 4 Siemens PLM Software

Plant Simulation 3D Tutorial

1. User Interface• The Ribbon User Interface• 3D Properties• Create In 3D• Graphic Structure• Write SimTalk Code More Easily

2. 3D Representation3. Animations4. Improving Performance

Page 3: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 5 Siemens PLM Software

The Ribbon User Interface (1)

Contextual tab

Categories

Panels

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 6 Siemens PLM Software

The Ribbon User Interface (2)

Commands for 3D are located both on the general tabs ...

... and on the 3D contextual tabs.

Page 4: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 7 Siemens PLM Software

3D Properties

Provides access to virtually all 3D properties of an object:

• Transformation

• Animation Paths

• Graphic Groups

• Extrusion Settings

• ...Shortcut: Ctrl+3

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 8 Siemens PLM Software

• Controls whether an object may be created in 3D

• If CreateIn3D=false in the origin, inheritance of the setting is enforced!

• Don’t switch this off if you don’t need to. Normally it is better and more flexible to configure the visibilities settings instead.

• SimTalk: attribute CreateIn3D : boolean

• Accelerator: Alt H3P3C

Create In 3D

The dialog Create in 3D

Page 5: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 9 Siemens PLM Software

• Corresponds to the 2D dialog Structure

• Displays the internal 3D structure of an object

• Provides different visualizations for

External graphic groups (red boxes) Internal graphic groups (yellow boxes) Invisible graphics (grayed out) Animatable objects (lucid 3D icon) State objects (traffic lights)

• Provides fast access to graphic inheritance and visibility settings

• Accelerator: Alt 3ER

Graphic Structure

The dialog Graphic Structure

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 10 Siemens PLM Software

Write SimTalk Code More Easily

Ctrl+C ... Ctrl+V

Ctrl+V

Page 6: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 11 Siemens PLM Software

3D Representation

Plant Simulation 3D Tutorial

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 12 Siemens PLM Software

Plant Simulation 3D Tutorial

1. User Interface

2. 3D Representation• Graphic Groups• 3D Representation Settings• Work with Graphics and Graphic Groups in SimTalk• Example

3. Animations4. Improving Performance

Page 7: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 13 Siemens PLM Software

Graphic Groups

• The graphics of each and every object are partitioned into uniquely named graphic groups.

• There is always the graphic group named default.• Graphic groups do not contain other graphic groups.• A graphic group can be toggled visible or invisible.• A graphic group can be marked as part of the internal

or external representation of an object.

• The default graphic of some objects like conveyors, variables, etc. are generated by Plant Simulation.

• You cannot edit these generated graphic groups and they do not interact with graphic inheritance.

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 14 Siemens PLM Software

• Determines graphic inheritance.

• Lists all graphic groups and displays whether they are generated or not.

• Sets if graphic groups are internal, external, visible, or invisible.

3D Representation Settings (1)

The tab Graphics

Internal graphics

External graphics

The tab Visibility

• Are visible from the outside as long as the graphic is visible.

• Internally only temporarily visible for modelling

• Are useful for decoration or organizational purposes.

• Are only visible from the outside together with the contained objects.

• Specifies which graphical content makes up an object‘s outside representation

Page 8: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 15 Siemens PLM Software

3D Representation Settings (2)

Marked as Visible?

Marked as Internal?

Visible?

No No

Yes Yes Yes

Yes No Only temporarily*

Marked as Visible?

Representation Visible?

No No

Yes Nothing No

Yes Contents If internal

Yes Graphic If not internal

Yes Both Yes

Graphic group visibility from inside an object Graphic group visibility from outside an object

*For modelling purposes, external graphic groups can be switched visible.This setting can be made for each window separately and it is not stored in the model.

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 16 Siemens PLM Software

Modify Graphics and Graphic Groups With SimTalk

.Ch2_3DRepresentation.PrepareEngine

• Plant Simulation provides a number of attributes and methods to work with 3D graphics and graphic groups.• Compare the Plant Simulation help topic The Parameters GraphicPath and GraphicGroupName.

Page 9: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 17 Siemens PLM Software

Example

.Ch2_3DRepresentation.EngineAssembly

The tutorial model shows the assembly of several engine parts to a complete engine ...

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 18 Siemens PLM Software

Animations

Plant Simulation 3D Tutorial

Page 10: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 19 Siemens PLM Software

Plant Simulation 3D Tutorial

1. User Interface2. 3D Representation

3. Animations• Animatable Objects• Create an Animation• Work with Animatable Objects and Animations in SimTalk• Animated Robots

4. Improving Performance

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 20 Siemens PLM Software

Animatable Objects (1)

Accelerator: Alt 3ECVAccelerator: Alt 3ECO

Create an animatable object using an existing graphic

Create a simulation object, e.g. a SingleProc, using an existing

graphic (only in frames)

Page 11: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 21 Siemens PLM Software

• Split off a graphic part as a new animatable object.

• Define the object position, e.g. as rotation center for animations.

• Each animatable object can be animated or transformed.

• Each animatable object provides its own set of graphic groups.

Animatable Objects (2)

Creating an Animatable Object

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 22 Siemens PLM Software

• You can modify (using the buttons Visualize, Extend, Edit..., Delete) non-generated or add (using the button Add...) additional animation paths.

• Each object has rules determining which animation paths it uses.

• To use another animation path on (the object) obj, you can redirect an animation to it with obj.MUAnimations.Path.redirectTo(...). You can override this redirection with another call or cancell it with obj.MUAnimations.Path.cancelRedirection().

• To pass the control over the MUs of obj to one of its animatable Objects, assign the relative path to this object to the animation object attribute (SimTalk: _3D.AnimationObject). You can also set this value on the context menu of the target animation object.

Create an Animation (1)

Making an Object Animate the MUs it Carries

Page 12: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 23 Siemens PLM Software

• You can modify self animation paths and their contents the same way you do with MU animations.

• Self animations have to be started, paused or stopped using SimTalk.

• MUs have no self animation. If you want to add an animation to an MU that is controlled by itself and not by its location, you can separate the whole MU graphic into an animatable object and animate that object instead.

Create an Animation (2)

Making an Object Animate Itself

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 24 Siemens PLM Software

• Frames offer you the possibility to animate a camera. This feature can be used to create a demonstration of your simulation.

• You can modify camera animation paths and their contents the same way you do with MU and self animations.

• Camera animations have to be started, paused or stopped using SimTalk.

Create an Animation (3)

Demonstrate a simulation with camera flights

Page 13: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 25 Siemens PLM Software

Work with Animatable Objects and Animations in SimTalk

obj.getObject(index: integer) Path extension to the animatable object in obj at index.

obj.getObject(name: string) Path extension to the animatable object called name in obj

obj.MUAnimations Path extension to obj‘s MU animations

obj.SelfAnimations Path extension to obj‘s self animations(not for all object types)

obj.CameraAnimations Path extension to obj‘s camera animations (only for Frames)

obj.[Self|Camera]Animations.Animation.schedule

Schedule obj‘s animation Animation

obj.[Self|Camera]Animations.Animation.scheduleRotation(...)

Schedule a rotation animation with the givenparameters around obj‘s rotation center

obj.[Self|Camera]Animations.pauseAnimation

Pauses all currently running animations on obj.

... ...

.Ch3_Animations.AnimatableObjects

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 26 Siemens PLM Software

Animated Robots

Accelerator: Alt 3EX

For animated robots, we already have fully prepared augmented graphics:

Simply exchange the graphic of your PickAndPlace robot.

.Ch3_Animations.AnimatedRobot

Page 14: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 27 Siemens PLM Software

Improving Performance

Plant Simulation 3D Tutorial

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 28 Siemens PLM Software

Plant Simulation 3D Tutorial

1. User Interface2. 3D Representation3. Animations

4. Improving Performance• General Advice• Why Cutting Graphic Inheritance Often is a Bad Idea• Retrospective: Why Did We Build Our Engine MUs The Way We Did?• Building a Configurable Object with Animatable Objects• Graphic Optimization• Generated Graphics

Page 15: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 29 Siemens PLM Software

General Advice

Avoid cutting the graphic inheritance – especially for MUs!

•This happens if• You explicitly switch off the graphic inheritance• You change the structure of an object graphic with:

• Group/Ungroup• Optimize

• You add or remove graphics• You change any part of an object graphic:

• The material of that cube in the corner looks better if it‘s yellow.• Move the drill to the side a bit.• That wall should be a bit higher.• ...

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 30 Siemens PLM Software

Why Cutting Graphic Inheritance Often is a Bad Idea (1)

1 MB

1 MB

1 MB

1 MB

1 MB

Suppose we have a gray object with an orange and a green version ...

Subtyping with graphic modifications(graphic inheritance will be cut!)

Subtyping with predefined graphic groups

1 MB

1 MB

1 MB

1 MB

1 MB

1 MB

1 MB

1 MB

Total size about 13 MB Total size about 3 MB

0 MB

0 MB

0 MB

0 MB

0 MB

0 MB

0 MB

0 MB

3 MB

0 MB

0 MB

0 MB

0 MB

Visible Graphic

Invisible Graphic

Page 16: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 31 Siemens PLM Software

Why Cutting Graphic Inheritance Often is a Bad Idea (2)

• Inherited graphics take up less disk space - but disk space is not the issue … Depending on the size of the

graphic, cutting graphic inheritance itself may take time:

• Plant Simulation has to duplicate the entire object graphic, there is no partial inheritance!

• Many graphic duplicates make it more difficult for the graphics card to optimize render tasks.

Do it for Your Simulation Do it for Yourself

Your own effort in managing a number of slightly different graphics throughout the model grows, too.

In general it is easier to search one special folder with your classes instead of searching an entire model.

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 32 Siemens PLM Software

Retrospective: Why Did We Build Our Engine MUs The Way We Did?

Instead of toggling graphic groups visible at the assembly stations, we could have modified the graphics of the Engines. But ...

• Every process step would have changed the entire graphic – not just that part we knowingly modified.The simulation certainly would have slowed down a lot.

• Every single Engine would have noninherited graphics as soon as either the Engine leaves its source or at the latest, when it passed the first assembly stationThe memory consumption would have become huge – even for a

simulation as small as this.

Page 17: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 33 Siemens PLM Software

1. Select the sub-graphic that is to be configurable.

2. Split that graphic off as an animatable object.

3. Add all necessary graphic variants to that object and set up your desired default transformation.

Building a Configurable Object with Animatable Objects

Possible Reasons How?

• Specifying every possible variant is either impossible or not feasible.

• A large number of variants can be explained as all of the combinations of several simpler variations

• You might also want to animate some sub-graphics.

.Ch4_ImprovingPerformance.ConfigurableObjectModel

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 34 Siemens PLM Software

• Problem: You import a large .jt file and everything starts to slow down and performance becomes sluggish.

• Possible solution: Optimize your graphic.

• If you want to split off animatable objects, subdivide the object first, then optimize the parts.

• Prefer to optimize class graphics, not object graphics!

• Compare the graphic complexity before and after an optimization

• SimTalk: _3D.optimizeGraphic(...)

• Accelerator: Alt 3EO

Graphic Optimization

The Dialog Optimize Graphic

.Ch4_ImprovingPerformance.OptimizeGraphic

Page 18: Tecnomatix Plant Simulation Worldwide User Conference 3D ...community.plm.automation.siemens.com/siemensplm/attachments/... · Plant Simulation 3D Tutorial Tecnomatix Plant Simulation

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 35 Siemens PLM Software

To improve render performance, avoid/reduce

• Large numbers of sub-graphics, e.g.

Roller conveyors Rail conveyors with crossbars Conveyors with a large number of legs Chute conveyors with a large number of chute rails

• Curve segments

Generated Graphics

Efficient Conveyors

© Siemens AG 2014 All rights reserved.

2014-May-20 Tecnomatix Plant Simulation Worldwide User Conference 2014Page 36 Siemens PLM Software

Thank you for your attention!

Dipl.-Inf. Peter Komarek

Siemens PLM Software

Plant Simulation 3D Tutorial