Quantcast
Channel: CATIA Composer » 3DVIA
Viewing all 147 articles
Browse latest View live

zSpace and Dassault Systemes Transform 3D Training and Learning


Fundamentals of Creating Great Technical Communication

$
0
0

Discover how to shorten production, minimize overhead and surpass your competition by creating modern assembly instructions with 3DVIA Composer.

Share with us how 3DVIA Composer has helped you in your daily missions !

 

Sammy

 

Moving multiple parts with “Local Transform”

$
0
0

Composer has many useful functions to help your authoring processes faster and more enjoyable.

Select_instances - Copy
The first function I would like to introduce is “Select Instances” that can select all the same geometry referenced in several positions of the model.

Multiple_selection - Copy
With this function, you can select multiple instances with just one click.

Local_transformation - Copy
Then, select Transform > Multiple Gizmos and Local Transform.

Multiple_gizmos - Copy
Multiple Gizmos will display the axis arrows for each part selected in the previous operation.

This will visualize the direction of the possible part movements. Please note that the green arrows are directing outward for each tire.

Moving_parts - Copy
When you drag one of the green arrows, you can see that each part is moving to the direction indicated by the arrows. When the Local Transform is enabled, all selected parts move along their own directions going outward from the assembled car, instead of all of them going toward the same direction.

The benefit of this function is that with one single operation, you can assign the same movements to all the referenced parts. There are many cases in illustration creation or assembly instruction creation where you need to disassemble multiple parts, and this function should save time and avoid errors by moving instances to their appropriate positions with the same amount.

Shuji

Building a configurator application

$
0
0

There have been many requests for an instruction on how to build a configurator application. Actually, it’s not so difficult to build such an application if you have good understandings of views in Composer and some knowledge of HTML coding.

Here is a procedure you can follow. In this tutorial, we just use the GotoView() method, which can be used without Player Pro license.

Those who are already familiar with Composer’s intelligent views and HTML coding quite well can directly jump to the discussion of actual coding section at the bottom of this page.

0. Create Views

You might want to review our previous podcasts such as this and this in order to create intelligent views that can partially save and update selected properties of specified actors in Composer. In this tutorial, we access intelligent views through an API to change parts but not to change camera position or orientation and other parts.
views

1. Write an HTML source code

For this tutorial, we just create a simple web application with a title, Player ActiveX Control, and the control field that display radio buttons to configure parts. Here is the entire set of the source code we begin with:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Configurator</title>
</head>
<body>
<h1>Radio Controlled Car Configurator</h1>
<div id="container">
    <object id="_player" classid="CLSID:410B702D-FCFC-46B7-A954-E876C84AE4C0"
 height="480px" width="640px">
        <param name="FileName" value="Radio_controlled_car.smg">         
        <param name="AntiAliasingOnIdle" value="0">
        <param name="AutoPlay" value="0">
        <param name="CameraPlayMode" value="0">
        <param name="GroundGrid" value="0">
        <param name="RenderGroundShadow" value="0">
        <param name="RenderMode" value="0">        
        <param name="ShowCameraToolBar" value="0">
        <param name="ShowCollabToolBar" value="0">
        <param name="ShowCollabTreeBar" value="0">
        <param name="ShowCuttingPlaneToolBar" value="0">
        <param name="ShowMain3DToolBar" value="0">
        <param name="ShowMarkerBar" value="0">
        <param name="ShowRenderToolBar" value="0">
        <param name="ShowStandardToolBar" value="0">
        <param name="ShowStatusBar" value="0">
    </object>
    <div id="controls">
    </div>
</div>
</body>
</html>

Underneath the title, which is enclosed with the <h1></h1>tags, we set a region defined by the <div id="container"></div> tags to define Player ActiveX Control on the left hand side and button controls on the right hand side. We will define the details about the controls field later.

This should give an IE display as below.
1

2. Add CSS to define a layout and styles

We write the following CSS codes to define a layout for the application:

<style type="text/css">
#container {
    width: 940px;
    height: 480px;
    border: 2px solid black;
    margin-left: auto;
    margin-right: auto;
}

#controls {
    top: 100px;
    left: 640px;    
    float: right;    
    width: 300px;
    height: 480px;
    overflow-y: auto;
    background-color: #eeeeee;
}
</style>

Here,

#container

is adjusted to include the Player ActiveX and the control field with the sum of their widths and their exact height. We put a solid line around #container to define the space. margin-left: auto; and margin-right: auto; are set to centralize

#container

.

This is not necessary but in order to give a consistent style for all elements defined in this HTML, we define the following:

* {
    margin: 0px;
    padding: 0px;
    font-family: "Segoe UI Light";
}

where “margin” and “padding” are defined to have 0 values for us to control them, rather than the browser window itself. We also define the font type to give a modern look at the application.

Up to now, this should yield the following screen:
2

3. Defining controls

Now, we are ready to define switches to control the configuration. We first define necessary radio buttons to configure the model and a push button to go back to the default view of the model.

        <div id="configurator">      
            <h3>Default</h3>
            <input type="button" value="Default" />

            <h3>Color</h3>
            <label>Red <input type="radio" name="color" checked /></label>
            <label>Green <input type="radio" name="color" /></label>
            <label>Blue <input type="radio" name="color" /></label>
            <label>Yellow <input type="radio" name="color" /></label>

            <h3>Wheel</h3>
            <label>Type A <input type="radio" name="wheel" checked /></label>
            <label>Type B <input type="radio" name="wheel" /></label>

            <h3>Body</h3>
            <label>Type A <input type="radio" name="body" checked /></label>
            <label>Type B <input type="radio" name="body" /></label>        

            <h3>Spoiler</h3>
            <label>Type A <input type="radio" name="spoiler" checked /></label>
            <label>Type B <input type="radio" name="spoiler" /></label>

            <h3>Springs</h3>
            <label>Type A <input type="radio" name="springs" checked /></label>
            <label>Type B <input type="radio" name="springs" /></label>

            <h3>Antenna</h3>
            <label>Type A <input type="radio" name="antenna" checked /></label>
            <label>Type B <input type="radio" name="antenna" /></label>

            <h3>Exhaust</h3>
            <label>Type A <input type="radio" name="exhaust" checked /></label>
            <label>Type B <input type="radio" name="exhaust"/></label>

            <h3>Bumper</h3>
            <label>Type A <input type="radio" name="bumper" checked /></label>
            <label>Type B <input type="radio" name="bumper" /></label>
        </div>

Since by default “Type A” is selected for all parts, we added “checked” for the Type A controls.

Please also note that we inserted these controls within the <div id="configurator"></div> tags so that we can give some blank spaces around the buttons. In order for such spaces, we also need to define a CSS code sequence:

#configurator {
    padding: 10px;
}

So far, the HTML window should look like this:
3

4. Adding API

We now add the API to access the views defined in Composer. Let’s first define a behavior for the default button.

The suitable API for this purpose is the GotoView() method. Since we already gave view names such as “Default”, we can simply use the string as an argument of the GotoView() method.

<input type="button" value="Default" onclick="_player.GotoView('Default')" />

where “_player” is the ID given to the Player ActiveX Control object within the <object></object> tags.

Next, we add the GotoView() method with an appropriate view name to each radio button. For example, for the Red radio button, we write something like this to associate the click event on the radio button with the view change via the onclick event:

<input type="radio" name="color" onclick="_player.GotoView('Red')" checked />

where “Red” is the name of the view we defined earlier as an intelligent view in Composer that can change the color of the body and the spoiler to red.

We continue adding the GotoView() method until the end.

The end result should look like this:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Configurator</title>
<style type="text/css">
* {
    margin: 0px;
    padding: 0px;
    font-family: "Segoe UI Light";
}

#container {
    width: 940px;
    height: 480px;
    border: 2px solid black;
    margin-left: auto;
    margin-right: auto;
}

#controls {
    top: 100px;
    left: 640px;    
    float: right;    
    width: 300px;
    height: 480px;
    overflow-y: auto;
    background-color: #eeeeee;
}

#configurator {
    padding: 10px;
}

</style>    
</head>
<body>
<h1>Radio Controlled Car Configurator</h1>
<div id="container">
    <object id="_player" classid="CLSID:410B702D-FCFC-46B7-A954-E876C84AE4C0"
 height="480px" width="640px">
        <param name="FileName" value="Radio_controlled_car.smg">         
        <param name="AntiAliasingOnIdle" value="0">
        <param name="AutoPlay" value="0">
        <param name="CameraPlayMode" value="0">
        <param name="GroundGrid" value="0">
        <param name="RenderGroundShadow" value="0">
        <param name="RenderMode" value="0">        
        <param name="ShowCameraToolBar" value="0">
        <param name="ShowCollabToolBar" value="0">
        <param name="ShowCollabTreeBar" value="0">
        <param name="ShowCuttingPlaneToolBar" value="0">
        <param name="ShowMain3DToolBar" value="0">
        <param name="ShowMarkerBar" value="0">
        <param name="ShowRenderToolBar" value="0">
        <param name="ShowStandardToolBar" value="0">
        <param name="ShowStatusBar" value="0">
    </object>
    <div id="controls">
        <div id="configurator">        
            <h3>Default</h3>
            <input type="button" value="Default" onclick="_player.GotoView('Default')" />

            <h3>Color</h3>
            <label>Red <input type="radio" name="color" onclick="_player.GotoView('Red')" checked /></label>
            <label>Green <input type="radio" name="color" onclick="_player.GotoView('Green')" /></label>
            <label>Blue <input type="radio" name="color" onclick="_player.GotoView('Blue')" /></label>
            <label>Yellow <input type="radio" name="color" onclick="_player.GotoView('Yellow')" /></label>

            <h3>Wheel</h3>
            <label>Type A <input type="radio" name="wheel" onclick="_player.GotoView('Wheel A')" checked /></label>
            <label>Type B <input type="radio" name="wheel" onclick="_player.GotoView('Wheel B')" /></label>

            <h3>Body</h3>
            <label>Type A <input type="radio" name="body" onclick="_player.GotoView('Body A')" checked /></label>
            <label>Type B <input type="radio" name="body" onclick="_player.GotoView('Body B')" /></label>        

            <h3>Spoiler</h3>
            <label>Type A <input type="radio" name="spoiler" onclick="_player.GotoView('Spoiler A')" checked /></label>
            <label>Type B <input type="radio" name="spoiler" onclick="_player.GotoView('Spoiler B')" /></label>

            <h3>Springs</h3>
            <label>Type A <input type="radio" name="springs" onclick="_player.GotoView('Springs A')" checked /></label>
            <label>Type B <input type="radio" name="springs" onclick="_player.GotoView('Springs B')" /></label>

            <h3>Antenna</h3>
            <label>Type A <input type="radio" name="antenna" onclick="_player.GotoView('Antenna A')" checked /></label>
            <label>Type B <input type="radio" name="antenna" onclick="_player.GotoView('Antenna B')" /></label>

            <h3>Exhaust</h3>
            <label>Type A <input type="radio" name="exhaust" onclick="_player.GotoView('Exhaust A')" checked /></label>
            <label>Type B <input type="radio" name="exhaust" onclick="_player.GotoView('Exhaust B')" /></label>

            <h3>Bumper</h3>
            <label>Type A <input type="radio" name="bumper" onclick="_player.GotoView('Bumper A')" checked /></label>
            <label>Type B <input type="radio" name="bumper" onclick="_player.GotoView('Bumper B')" /></label>
        </div>                                        
    </div>
</div>
</body>
</html>

Now, the configurator application is ready.
4

Copy Keys

$
0
0

For most of you this is a refresher on one of the capabilities within 3DVIA Composer Authoring. When animating repetitive tasks it is helpful to utilize the “Copy Selected Tracks of the Selected Actors” from the context menu in the timeline. In this example I am applying a rotation to a single bolt and then copying those tracks to the rest of the bolts in the assembly. Here is the link to the video describing this fundamental process.

Tim

 

High quality illustrations without sacrificing 3D performance

$
0
0

Here is a short example of how you can take high performance 3D tessellated geometry, and use it to produce high quality 2D technical illustrations. And watch the ending for a nice surprise. :)

Garth

3DVIA Composer on Twitter

$
0
0

Hello everyone !

I would like to share with your our new account for 3DVIA Composer twitter : 3DVIA_Composer

Through this twitter account you’ll have all the latest information related to 3DVIA Composer or technical communication in general.

Feel free also to ask your questions and we will do our best to answer to them.

Show us your work (screenshot / videos) and we would be more than please to re-tweet it !

What are you waiting for ?

twitter-logo-12

 

https://twitter.com/3DVIA_Composer

Sammy

Adjusting graphics profile for your environment

$
0
0

Profile_dialog

One of the most frequently asked questions we see is about the stability of the application. Fundamentally, in most cases, it’s the compatibility issue of graphics accelerators. It may be necessary to update the graphics driver, change the parameters to configure the graphics card, etc. to keep stable operations on 3DVIA Composer or 3DVIA Composer Player.

However, here is a very easy way to configure the settings.

Accessing Application Preferences in 3DVIA Composer:
Composer

Accessing Application Preferences in 3DVIA Composer Player:
Player

In both 3DVIA Composer and 3DVIA Composer Player, please find the Profile selection box at the top right corner of the Application Preferences dialog.

4profiles

Here, we have 4 choices to specify the graphics profile.

The “Safe” profile will not use the hardware accelerator at all. So, we can eliminate the issues related to graphics cards, and this is our recommended choice when you feel uncomfortable graphics behaviors. However, with this profile, the performance is painfully compromised.

On the other hand, if you have a very powerful graphics card, you might want to try “High quality” that gives you a set of rendering parameters to enjoy full graphics capabilities such as per-pixel lighting, shadows, ambient occlusion, and anti-aliasing. The “High speed” profile is optimized for faster performance, and the “Standard” profile is a balanced configuration for the speed and the quality.

Finally, in the Viewport section of Application Preferences, you can change parameters to customize and balance the performance and the rendering quality.

Shuji


TodCast #18 Additional Language Options with Styles and Meta-Properties

$
0
0

After my last Podcast a user asked me if there was a easy way to just change the language in a whole document and publish to that language. Here are a few tips to make that easy.

Enjoy Additional Language Options with Styles and Meta-Properties

Tod/Goat

SolidWorks Composer in the Pump Industry

Implementing 3D Models in PowerPoint

$
0
0

3DVIA_Composer_FullScreenAs part of this post for today, I will be reviewing the necessary steps for using 3DVIA Composer files within Microsoft PowerPoint 2010.  This process can use a number of formats directly however for the purposes of this post I’ll focus on the most common .smg.  Fundamentally by setting this up allows the presenter to interact with a 3D model in the midst of a presentation.  Before I go through the steps to set this up I believe that it is important to mention a housekeeping measure for file management that could help in working with this setup. When linking the .pptx to the .smg file (or supported format), each program looks in a specific location to find the referencing file. To make it easier to find the referencing file and also when sending these kinds of presentations outside of your organization, it is my recommendation that the .smg file (or supported format) is saved in the same folder as the .pptx.

Customize Quick AccessToolbarBefore you can import a .smg file directly it is important to either have 3DVIA Composer installed or you will need to install the 3DVIA Composer Player.  Installing either program should automatically initiate the RegisterAll.bat found in the following location; C:\Program Files\Dassault Systemes\3DVIAComposer\X.XX\Bin.  This batch file registers the 3DVIA Composer Player ActiveX control within PowerPoint and allows users to import .smg files with relative ease.  To begin importing content you will need to turn on the Developer tab within PowerPoint, this is done by selecting the “More Commands” pull-down from the Customize Quick Access Toolbar.  After the PowerPoint Options dialog has opened select the “Customize Ribbon” option from the left-hand side of the dialog.  Next by adding a checkmark to the Developer tab under the Customize Ribbon (Main Tabs) column will allow this tab to remain open by default.  To wrap up this up simply select Ok and exit back into PowerPoint.

3DVIA_Composer_PowerPointOptions_CustomizeRibbon

Next with the Developer Tab ready for use, simply select it and find the “More Controls” button found on the Controls pane.  Right at the top of the More Controls dialog the 3DVIA Composer Player ActiveX option should be highlighted and available for use.  After selecting OK the cursor will change, and the user will be allowed to select the size of the viewing window for this presentation.  If it is important to play the inserted content at full screen, make sure the Presenter’s View is enabled in PowerPoint to make it easier to exit out of the full screen view.

3DVIA_Composer_MoreControlsl

3DVIA Composer Player ActiveX_Object_Properties_GeneralThe last piece is to connect the ActiveX window with the .smg file, this can be accomplished by selecting the outer boundary of the window and right-clicking.  The right-click menu will give the “3DVIA Composer Player ActiveX Object” option and provide two additional functions; Edit and Properties.  For the purposes of this post, I will focus on the setup and configuration of the Properties function for the 3DVIA Composer Player ActiveX Object.  After selecting Properties option from the right-click menu the 3DVIA Composer Player ActiveX Properties dialog will open, simply select the ellipses button in the upper right corner and browse to the .smg file (or supported format) that you want to import.  Before selecting OK be sure to select any other options on the General tab that you want to include such as Ground, Ground Shadow, Anti-aliasing on idle, or any of the other available settings.  3DVIA Composer Player ActiveX_Object_Properties_LayoutAlso take note of the “Pack 3DVIA Composer document” checkbox, this function takes the referencing .smg file (or supported file) and packs it into the .pptx file removing the referencing file altogether.  I should add that this also increases the size of the .pptx accordingly.  Finally, before selecting Ok to insert the .smg, take a moment and review the Layout tab as it includes a number of options that control whether the toolbars are displayed for use during the presentation.  Personally, when I add 3DVIA Composer content to PowerPoint I generally turn off all the toolbars so that the focus can remain on the product.  Once you have confirmed all of these settings simply select Ok and place the .pptx in Slide Show mode…..and Voila, you now can easily present your 3D models from 3DVIA Composer in a PowerPoint presentation.

3DVIA Composer Player FinalInsertedSMGFile_1280_720

Dominick D. Gallegos

Benefits of Fully Shattered conversion

$
0
0

3DVIA Composer has 2 main conversion types available: Monolythic mode and FullyShattered mode. So what is the difference between these 2 formats type? What is the best methodology when facing large data conversions? Let’s try to discover that out.

Let’s first start with some definitions:

Monolythic files are actually archive file (a .zip file) containing the structure and its associated authoring features such as labels, arrows, views, properties, animations etc… It is one single file.

monolythic

FullyShattered mode represents an exploded structure. It is a 3DVIA Composer product with multiple .smgXml and .smgGeom files. SmgXML can also point to .smgSce (e.g animations) + .smgView (e.g. views). These animations and views are available for all using this smgXML

fullyshattered

 

Fully-shattered assemblies have several advantages:

  • The assembly loads all its parts by reference. An assembly does not have geometry files. This keeps the file size of the main assembly small and lets you reuse parts in multiple assemblies.
  • You can load assembly parts as you need them instead of loading the entire assembly when you open it.
  • You can load parts with different levels of details. If you create your fully shattered assembly with more than one level of detail, you can choose the level of detail.
  • You can perform incremental updates. Because parts are loaded by reference, you can update only parts that have changed.

When using fully shattered format, it is always advised to create a new project and reference the top-level product XML file. But what is a Project file?

A project file .smgProj points to an .smgXML with the lower structures and geometries included, it also points to .smgSce (e.g. animations) and .smgView (e.g views) files. These animations and views will be available for all users using the smgProj-file, but do not affect the included .smgXML or .smg files.

project

Working with project files present several advantages:

  • It allows several users to work with the same source geometry data, since the project file is only a link to the source data.
  • All changes done within the project file are stored inside the project directory/folder not affecting the original source data.
  • It allows updates of the original source data that does not interfere with user’s saved work.
  • All updates of the source data will automatically be available/applied to the project file.
  • By creating a project file as user, you create a soft-link or a reference to the source data.

 

Therefore, it is easy to understand that SMG monolythic file format should basically be used for small data/minimal number of files whereas FullyShattered associated to project files is the best way to manage large data assemblies.

Gordon Benson from NACCO Materials Handling Group explained that the decision to choose fullyShattered Vs Monolythic mode “really depends on your use case and how your business operates. For our company we replaced a different visualization tool with Composer specifically because the other tool did not support shattered structure. For us the benefits are significant over a monolithic file not only in terms of administration, automatic updates whenever the file is opened, and how we use Composer in a distributed global company.”

Julien

Implementing the 3DVIA Composer Player ActiveX in Windows Presentation Foundation

$
0
0

In this post I want to address a technological issue related to the use of the relatively old ActiveX technology together with newer technologies provided by Microsoft that do not natively support plugins such as ActiveX controls.

History

In the past, Microsoft provided us with Windows Forms for developing user interfaces for Windows – these were pretty straight forward visual elements that could be placed upon a surface by drag and drop. So, for instance a button or a list box could be placed on the form and resized to meet the developer’s requirements. These were fairly static elements that were pre-defined, even though the user had some control over colors and size, etc. Windows Forms and ActiveX controls were developed around the same time and used a similar architecture that enabled an Active X control to be embedded in a Windows form with no more effort than drag and drop.

In 2006 Microsoft released .NET 3.0. Included in this release was a new architecture for building applications named Windows Presentation Foundation or WPF for short

WPF Overview

Microsoft Windows Presentation Foundation (WPF) is a user interface (UI) framework for building Windows client applications with immersive and intuitive user experiences. It is a subset of the Microsoft .NET Framework and was first introduced by Microsoft as part of .NET 3.0. It combines the application UI, 2D graphics, 3D graphics, documents, and multimedia into a single framework to help developers create rich and interactive applications. Its vector-based rendering engine takes advantage of the hardware acceleration of modern graphic cards. This makes the UI faster, scalable, and resolution independent.

The predecessor to WPF is Windows Forms, but WPF differs fundamentally in that it builds on top of DirectX, a technology that originally focused on multimedia and game programming. This adds the ability to implement advanced visual behavior such as animated cartoons, videos, or immersive 3D environments as well as take advantage of hardware acceleration when it is available. As it is still a subset of the .NET Framework, the WPF programming experience should be similar to Windows Forms or ASP.NET; however, the programming model is closer to web development with the “code-behind” approach. It should also be noted that WPF was not created to replace Windows Forms for every application as there are still cases where Windows Forms are good enough. Rather, WPF will continue to grow in popularity as a modern UI design tool and must be considered for any application that stands to benefit from a richer user experience.

WPF also fulfills the need for technology and tools that make it natural to separate the UI from the rest of the implementation as much as possible. The WPF system lets developers decouple visual behavior from the underlying program logic and provides a unified API and supporting tools for creating sophisticated UIs.

Microsoft’s Silverlight provides functionality that is mostly a subset of WPF to provide embedded web controls comparable to Adobe’s Flash.

WPF Benefits

There are many benefits to using WPF over Windows Forms below is a subset of the key benefits that I have found while building applications:

  1. 1.       Reusable Templates –WPF makes it easy to create reusable elements for your UIs. There are two types of templates in WPF: control templates and data templates. With control templates, you can redefine the way a control looks. For example, if your application needs to have all its list boxes with a blue background and a red border, you could use a control template to redefine the visual appearance of list boxes. Control templates also make it easier for designers to create the “look” for a UI control through a control template, with little to no impact on the actual development process. Data templates are similar, except that instead of defining the way a control looks, they define the way certain types of data are rendered. Imagine that you have an application dealing with people, such as a contact manager, and that you represent people in code with instances of a Person class. You can create a data template that defines how an instance of a Person is rendered in the UI. For example, an instance of Person might be visualized as a business card with a picture, first name, last name, and telephone number. If you use such a data template, whenever a Person instance is bound to some UI element, such as a list box, WPF will use the corresponding data templates. In practice, you will find that data templates are really handy when dealing with lists or other collections of data.
  2. 2.       Data Binding – When you hear about binding in WPF, you probably jump immediately to the concept of data binding. Data binding has already been made popular with Windows Forms and ASP.NET Web Forms, and has demonstrated its usefulness there. Although WPF has significant data binding features—significant in that it greatly outclasses its predecessors—it also allows you to declaratively bind other things such as commands, key bindings, animations, and events. For example, you can declaratively bind a button control to a command for pasting.
  3. 3.       Vector Graphics System for Harnessing the Power of Graphics Hardware Acceleration – WPF exploits whatever graphics processing unit (GPU) is available on a system by offloading as much work as possible to it. Modern interfaces also shouldn’t be constrained by the limitations of bit-mapped graphics. Accordingly, WPF relies entirely on vector graphics in contrast to raster graphics. This allows an image to be automatically scaled and resized to fit the size and resolution of the screen it’s displayed on, making the UI more device-independent. Rather than create different graphics for display on a small monitor and a big-screen television, the developer can let WPF handle this to display at the highest resolution supported by the device display without loss of quality. This additionally uses a retained mode graphics system, meaning that everything you draw persists and does not need to be redrawn after the window has been minimized. Retained mode allows the graphics system to optimize the display process.
  4. 4.       Rich interface design – WPF really shines when it comes to making an application look pretty. You can do such things as make the background of a text box red or surround a button with a thick blue border. Styles are also easy to reuse and allow you to skin controls almost similar to cascading style sheets (CSS) for HTML. Again, WPF styles are richer and have less ambiguity. They encompass all the visual characteristics you would expect, such as padding, margin, position, color, and so on. But you can also use styles to declare nonvisual properties.

For more information on WPF please refer to this link: http://msdn.microsoft.com/en-us/library/aa970268.aspx

Using Windows Forms Components with WPF

As mentioned above, Windows Forms and WPF are two very different architectures that really have nothing in common with each other. This being the case, implementing an old technology such as ActiveX inside WPF should not be supported – and originally this was the case! However, very quickly Microsoft acknowledged that developers had built many controls and components that they needed to reuse within WPF based applications. In order to accommodate their developers and increase the acceptance of WPF as the new standard for Windows development, Microsoft was nice enough to provide a control inside WPF that can host Windows forms components – aptly named the WindowsFormsHost. It is this control that enables us to embed our 3DVIA Composer Player inside a WPF application.

Creating a WPF Project Using 3DVIA Composer Player

So, let’s get started. Using Visual Studio, start a new WPF Project. I’m using version 2012 for this example, however any version from 2008 onwards will be supported. In these examples I’m also using C# as my preferred programing language however feel free to use Visual Basic if you so wish.

 7-18-2013 8-51-10 AM

Once the Project opens you will be presented with an empty Window as shown below. The screen is divided into two main areas – the design surface and the resulting XAML code. The toolbox should be located on the left by default.

 7-18-2013 8-56-21 AM

Placing Controls

Locate the WindowsFormsHost Control from the toolbox and drag and drop it onto the window as shown. As you place the control on the window you will notice how the XAML code updates. The control is inserted with some basic defaults that need editing. Either edit the XAML directly or use the Properties window on the right to resize the control as follows:

<Grid>

        <WindowsFormsHost x:Name=”playerHost” HorizontalAlignment=”Stretch” Height=”Auto” Margin=”2,2,2,40″ VerticalAlignment=”Stretch” Width=”Auto”/>

</Grid>

This will stretch the control over the complete window leaving a margin at the bottom where we can place a button.

Drag and drop a button from the toolbox onto the Window surface and place it near the bottom of the window. You can edit the XAML code as follows:

<Button x:Name=”btnClose” Content=”Close” HorizontalAlignment=”Right” Margin=”6,6″ VerticalAlignment=”Bottom” Width=”75″ Click=”btnClose_Click”/>

Note:  I added the “Click” event to the control by typing “Click”. Visual Studio did the rest for me and created the appropriate event. This can also be added through the properties window.

Adding Composer Player References

Now we have our basic layout we can add references to the 3DVIA Composer Player so that it can be used inside our WPF application.

In the past, using Windows Forms, we could add the Player control directly into the Visual Studio toolbox and then drag and drop it onto the form. Windows Forms created the required references for us automatically. However, with WPF, ActiveX controls are not natively supported and they therefore do not appear in the Toolbox. Instead, we can add a reference to the controls and manually add them into our WPF application. There are two DLL’s that we need to reference in our application, by default the DLLs that we need are not included with the Composer installation (since they are created through Visual Studio). The easiest way to create these DLLs is by creating a Windows Forms Application that uses the Player Control. If you haven’t done this previously, you can reference the Visual Studio project provided with the Sample in the Composer installation directory.

Once you have the two DLL’s required: AxInterop.DS3DVIAPlayerActiveXLib and Interop.DS3DVIAPlayerActiveXLib add a reference to these two DLL’s as shown below:

Right click the References node in the Solution explorer tree.

 7-18-2013 9-14-10 AM

Browse to the location on your disk where these two DLLs are located and add them in as references.

 7-18-2013 9-16-28 AM

Click on the Interop.DS3DVIAPlayerActiveXLib and edit its properties as shown below:

 7-18-2013 9-17-09 AM

Editing the Code Behind

Now that we have a reference to the 3DVIA Composer Player we need to add in a little code to make it all come together. Collapse the references tree and expand MainWindow1.xaml. Double click to open the code behind.

 7-18-2013 9-23-01 AM

If you created the Click event for the button you should have an event stub created for you as shown below. Edit the code so that it looks similar to the code shown below.

(click this image to enlarge it)

 7-18-2013 9-24-24 AM

There are really only two lines that are key to our integration at this point and these are as follows:

In the class MainWindow we define a reference to the ActiveX Control as follows:

AxDS3DVIAPlayerActiveXLib.AxDS3DVIAPlayerActiveX dsPlayer = new AxDS3DVIAPlayerActiveXLib.AxDS3DVIAPlayerActiveX();

In this case I have named the ActiveX control “dsPlayer”. All of the 3DVIA Composer Player APIs can now be accessed through this reference.

The next stage is to assign the player to the WindowsFormsHost control as a child of that control. This is achieved through the line defined here.

playerHost.Child = dsPlayer;

playerHost is the name that I gave to the windowsFormsHost Control in the XAML code.

Now compile and run the code – you should receive the Player embedded in the window as shown below. Note that the settings that we used in the XAML code allow the Player to be stretched to fit the window as we resize it.

<WindowsFormsHost x:Name=”playerHost” HorizontalAlignment=”Stretch” Height=”Auto” Margin=”2,2,2,40″ VerticalAlignment=”Stretch” Width=”Auto”/>

The Margin defines the placement of the control within the context of the parent control – in this case the window. The Horizontal and Vertical Alignment definitions define that the control should be stretched in both directions and the since the Height and width are set to Auto, the control will scale according to the size of the window.

 

7-18-2013 9-22-10 AM

 

Accessing the Player Libraries

Now that we have the ActiveX control embedded in our WPF application, we have all of its API and capabilities available to our application. As shown below, I can now create Player events and dynamically load files as required.

(click this image to enlarge it)

 7-18-2013 9-30-39 AM

The result of this code is to load the Player in the window and once it’s loaded go and load an SMG file from a pre-defined location. Once the file completes loading in the Player, the user is notified that the file has been loaded.

 7-18-2013 9-31-48 AM

From this point onwards, accessing and programing business logic into the Player is just the same as with the windows Forms implementation. Obviously with the power of WPF, you can do a lot more than with the windows forms implementation. Here, for instance I used the code behind to implement the events and much of the business logic; however this would be better placed in separate classes therefore separating GUI from logic. Obviously you can complete your program by putting all the code in the Mainwindow code behind file, but this will create a very big and unmanageable file. For more information on separating code please refer to “WPF Apps With The Model-View-ViewModel Design Pattern”  http://msdn.microsoft.com/en-us/magazine/dd419663.aspx

 

Easily Use Your Drawing Frames for Technical Illustrations Just with 3DVIA Composer Standard Functions!

$
0
0

When creating technical illustrations with 3DVIA Composer a frequently asked question is how to show a drawing frame with title block in the generated vector outputs.

With the Model Browser it’s easy to create a library of drawing frames including the necessary text fields. The video shows how to create a standard A4 drawing frame with text fields and how to use it from the model browser for technical illustrations.

As usual for 2D drawings you’ll need one template for each paper size (paper space) you’re using. But have a look at the video… it won’t take more than 5 minutes for each.

Enjoy… and just ignore the German title block :)

Jochem

Create Mobile Presentations Using 3DVIA Spotlights & Your 3DVIA Composer Content

$
0
0

screen grab from website iPhone-iPad 450w CADdigest

Today I’d like to show you how you can present your 3DVIA Composer content combined with images, videos, documents and other supporting materials in a mobile setting using your iPad or iPhone and a 3DVIA Spotlight. This post is a quick look at the workflow for publishing your 3DVIA Composer files to 3DVIA.com, adding supporting materials and then creating a mobile 3DVIA Spotlight presentation.

3DVIA.com is an online storage spot for your 3DVIA Composer content published  as 3DVIA.com model files. You then add your supporting files to the 3DVIA.com models. The 3DVIA Spotlight you create contains the 3DVIA.com model files you choose and allows you to present your content wherever you have a WiFi connection. Many questions about 3DVIA.com can be answered by viewing the FAQ.

The extensive example shown above on the iPad combines 3DVIA.com files and related company materials to create a 3DVIA Spotlight presentation. To view it follow this link and then email the 3DVIA Spotlight link to yourself by clicking on the “Send to…” and then the “Share With” tools.

On your mobile device check your email for the invitation and click on the link to the 3DVIA Spotlight. The images, videos and documents will be viewable. In order to view the 3D models, you will need to sign up for a free account on 3DVIA.com and download and install on your device the 3DVIA Mobile HD app from the Apple App Store for $4.99. Be sure to go to the 3DVIA Mobile HD app settings and change the model size limit to “Unlimited”.

Other good examples can be found on the Featured 3DVIA Spotlights page.

Creating your own 3DVIA Spotlight presentation also starts by signing up for a free account on 3DVIA.com. A Basic free account gives you 2GB of online storage space, lets you publish your 3DVIA Composer content to 3DVIA.com and then create and edit a 3DVIA Spotlight. Once you have activated your 3DVIA.com account you can publish your 3DVIA Composer files directly from 3DVIA Composer to 3DVIA.com.

     

You can also create an account directly from 3DVIA Composer (red ellipse) during the publishing process.

During publishing you have the choice to upload just the 3DVIA Composer model or the whole 3DVIA Composer Experience (green ellipse).

(model by mserafim)

Including the 3DVIA Composer Player allows the viewer of the model on 3DVIA.com to click on the 3DVIA Composer icon and open the 3DVIA Composer Player or 3DVIA Composer Player Pro directly from the model page. This gives them direct access to the interactive materials you’ve already created in 3DVIA Composer.

       

Once your 3DVIA Composer model is published, it will have its own page on 3DVIA.com, which is where you add the content that you’ll use to make your mobile presentation. The model page on the left shows a just-published model and the one on the right has a description, rendered images, a document and a link to a video.

When your models on 3DVIA.com are ready, follow the process outlined in the Making Great Spotlights document. Clicking the link will automatically download it for you.

If you have questions you can contact me directly. Click on the “Send a message” on my 3DVIA.com home page.

Don Swavely


AEC Needs Better Work Instructions, too

$
0
0

3DVIA Composer gets lots of use in different kinds of manufacturing organizations, but the basic value of having clear and concise work instructions can benefit other industries.  For instance, In the AEC industry worker safety is a top concern.  Construction is one of the most dangerous occupations in the world incurring more occupational fatalities in both the United States and European Union than any other sector.  Of course, there are obvious safety concerns if you assemble an airplane or automobile incorrectly, but most assembly workers are seldom at risk and problems are likely to be found in QA and testing, well before the plane has passengers.  In construction, installing a 7th story window incorrectly could lead to fatal consequences (construction workers wear hard hats for a reason!)

Another difference between manufacturing and construction is the work force.  While assembly line workers are typically well trained and become proficient at their specific tasks, construction laborers often move from job to job.  Each job may have different construction specifications and standards, product manufacturers and installation requirements.  For the average laborer, becoming proficient is very difficult.   Proper and current work instructions are critically important to ensure construction is done properly.

If you want to learn more about the AEC industry and their challenges and how better work instructions help you should read this new whitepaper: Work Smart, Work Safe, Work Productively

Howie

Detail View of a Detail View

$
0
0

Your illustration customer has a very specific style for their Detail View bubbles. Here are some techniques to match those styles. Lets get creative!

Tim

Update Views with Selected Actors

$
0
0

This is my favorite feature in Composer! I use it every single time I am in the product, it saves massive amounts of time when modifying and updating my views.

Let me know if you agree!

Enjoy! Garth

Workaround for Silhouette mode issues

$
0
0

The Silhouette rendering mode of Composer is a great way to present 3D models as if they were 2D drawings, which is beneficial for people who are in transition from 2D to 3D.

However, there are some limitations for this black and white rendering mode.

Silhoueete_issue_1
We often see our users struggling with some parts sticking to their original colors even in the Silhouette mode.

Opacity
In such a case, the parts may have the Opacity values less than 255, and we can easily fix this issue by adjusting the Opacity value to be 255.

Silhoueete_issue_1_resolved
After the change, we can now see the desired rendering.

Silhoueete_issue_2_before_cutSilhoueete_issue_2_after_cut
The other issue typically reported is that, when a cross-section plane is activated, the Silhouette mode suddenly turns to the Smooth rendering mode.

Emission
The solution is to change the Emission to be 1.000 and the color to be white for all parts:

Silhoueete_issue_2_resolved

- Shuji

TodCast #23 Animation Organization Techniques

$
0
0

You may have noticed I’ve been gone for a bit. I’ve taken a new role as a SolidWorks Composer TTM.  This episode I’ve decided to revisit using Selection sets and Filters to help organize and edit your animations. Remember, naming selections in proper order can be a very powerful asset when editing your animation.

Enjoy,

 

Goat

Viewing all 147 articles
Browse latest View live