3D Conversion from CAD Models to Polygon Models

3D Conversion from CAD Models to Polygon Models

Linköpings Universitet | Institutionen för datavetenskap Examensarbete på grundnivå, 16hp | Datateknik 2016 | LIU-IDA/LITH-EX-G--16/012—SE 3D Conversion from CAD models to polygon models Rasmus Siljedahl Examinator, Petru Eles Linköpings universitet SE-581 83 Linköping 013-28 10 00, www.liu.se Upphovsrätt Detta dokument hålls tillgängligt på Internet – eller dess framtida ersättare – under 25 år från publiceringsdatum under förutsättning att inga extraordinära omständigheter uppstår. Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner, skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för ickekommersiell forskning och för undervisning. Överföring av upphovsrätten vid en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av dokumentet kräver upphovsmannens medgivande. För att garantera äktheten, säkerheten och tillgängligheten finns lösningar av teknisk och administrativ art. Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i den omfattning som god sed kräver vid användning av dokumentet på ovan beskrivna sätt samt skydd mot att dokumentet ändras eller presenteras i sådan form eller i sådant sammanhang som är kränkande för upphovsmannens litterära eller konstnärliga anseende eller egenart. För ytterligare information om Linköping University Electronic Press se förlagets hemsida http://www.ep.liu.se/. Copyright The publishers will keep this document online on the Internet – or its possible replacement – for a period of 25 years starting from the date of publication barring exceptional circumstances. The online availability of the document implies permanent permission for anyone to read, to download, or to print out single copies for his/hers own use and to use it unchanged for non-commercial research and educational purpose. Subsequent transfers of copyright cannot revoke this permission. All other uses of the document are conditional upon the consent of the copyright owner. The publisher has taken technical and administrative measures to assure authenticity, security and accessibility. According to intellectual property law the author has the right to be mentioned when his/her work is accessed as described above and to be protected against infringement. For additional information about the Linköping University Electronic Press and its procedures for publication and for assurance of document integrity, please refer to its www home page: http://www.ep.liu.se/. © Rasmus Siljedahl Abstract This thesis describes the design and implementation of an application that converts CAD models into polygon models. When going from CAD models to 3D polygon models a conversion of the file type has to be performed. XperDI uses these polygon models in their tool, called sales configurator, to create a photo realistic environment to be able to have a look at the end product before it is manufactured. Existing tools are difficult to use and is missing features that is important for the Sales Configurator. The purpose of this thesis is to create a proof of concept application that converts CAD models into 3D polygon models. This new lightweight application is a simpler alternative to convert CAD models into polygon models and offers features needed for the intended use of these models, that the alternative products do not offer. Sammanfattning Den här rapporten beskriver skapandet av en applikation som omvandlar CAD-modeller till 3D- objekt. 3D-objekten används senare i en fotorealistisk och interagerbar omgivning skapat utav XperDI. Den omgivningen gör det enklare att föreställa sig hur slutprodukten av CAD-modellen kommer se ut utan att behöva producera den. Innan CAD-modellerna kan användas i den om- givningen så måste de omvandlas från CAD-filer till 3D-objekt. Den omvandlingen kan göras med ett flertal existerande programvaror som är både klumpiga att använda och saknar viss funktion- alitet som XperDI önskar. Syftet med den här rapporten är att beskriva skapandet av en lättviktig applikation som utför omvandlingen från CAD-modeller till 3D-objekt. Resultatet visar att kvalitén på filerna skapade utav min applikation är jämnörbar med andra omvandlingsprogram som saknar en del funktionalitet. Acknowledgements I would like to take this opportunity to put into words my gratitude and appreciation to the team on XperDI. Without the brainstormings and discussions with both Manokar Munisamy and Leon Poot the outcome of this thesis would not be the same or any at all. A big thanks to the CEO of XperDI and my supervisor Mehdi Tarkian for giving me this opportunity and for always believing in me when problems occurred. I am also thankful for the help and support from my examiner and supervisor Petru Eles. Lastly I would like to thank all heroes on all developer forums for answering my questions and the hero I might not have deserved but most definitely needed, my friend Adam Johansson for supporting me throughout the writing of this thesis. Contents 1 Introduction 1 1.1 Problem Description . 1 2 Theory 2 2.1 Development Tools . 2 2.2 Polygon Mesh . 2 2.3 File Types . 2 2.4 Similar Products . 3 3 Method 4 3.1 Literature Study . 4 3.2 Design and Development . 4 3.2.1 Implementation of STP Importer . 4 3.2.2 Implementation of OBJ Exporter . 4 3.2.3 Implementation of FBX exporter . 5 4 Results 6 4.1 Application . 6 4.2 Tolerance . 7 4.3 Comparison between alternative tools . 8 4.3.1 3ds Max conversion . 8 4.3.2 Conversion with FreeCAD and Blender . 9 5 Discussion 11 6 Conclusions 12 6.1 Future Work . 12 6.1.1 UV Map . 12 6.1.2 Tolerance of the mesh . 12 7 References 13 1 INTRODUCTION 1 Introduction XperDI [1] is a company that offers their costumers two different tools. One is their CADcon- figurator which is used by CAD designers to speed up and simplify the task of creatinglarge and complex designs in CAD. A problem when dealing with CAD models can be that the final product’s appearance may not be the desired one. This is especially true for the end costumers that have no experience with CAD and its environment. If a problem with the CAD models is not found before it goes into production, valuable resources and time can be lost. A way of experienc- ing these models, without having to make a prototype, is to use XperDI’s other tool called Sales Configurator. It is based on the game engine Unreal Engine [2] and can render polygon models of CAD models, before they are produced in a interactive and photo realistic environment. 1.1 Problem Description The procedure from having models made in CAD to experiencing them in the game engine requires the files to be converted into 3D mesh object files. The conversion can be made today byusing existing tools which, however, it is very complicated to use. Another problem with using other products is that these tools do not produce a 3D mesh file with the desired properties such as keeping the names of the different parts from the CAD model. A comparison between a seat model in a CAD and 3D environment can be seen in fig. 1 to get an idea of what the conversion hasto be between. (a) CAD modeled seat in FreeCAD (b) Polygon mesh seat in Unreal Engine Figure 1: A comparison between a seat in a CAD and 3D graphics environment The purpose of this thesis is to implement a proof of concept application that would improve the procedure and workflow of going from CAD models to 3D mesh objects. The most important question to be studied is, how does the quality of the 3D objects produced from different tools compare. 1 2 THEORY 2 Theory 2.1 Development Tools FreeCAD is an open source tool that can be used for CAD modeling. It being an open source tool means that the source code for it is available and free to read, modify and redistribute. FreeCAD has the feature to import a CAD model and export it as a 3D mesh which is why this software was used for developing my application. However, this 3D mesh file is not the desired file type to be used in the game engine. More explanation to how this is solved follows later. When FreeCAD imports an STP file it reads the geometry of the object and puts it on a FreeCAD documentand draw it on the screen to the user. This document is only used for drawing the objects to the GUI and does not contain any geometric data of the shape. Importing and exporting through the GUI includes a lot of unnecessary actions from the point of view of my application. With most of its source code regarding the import of an STP file coming from the Open Cascades library files, the code for lower level instructions is not available. This means that finding ormodifying actions at lower levels is not possible when using the library files from Open Cascade [3]. Without the possibility to modify or remove unnecessary code and in order to use the part needed, all the library files from Open Cascade is used. When FreeCAD is exporting to OBJ files theyspecify a decimal value called tolerance. This value determines the quality of the faces, a lower value meaning lower tolerance and more triangles in the mesh, which results in higher quality. Adding more faces in the model also increases the file size. This tolerance value can not be utilized with the installed version of FreeCAD because it is hardcoded and cannot be changed. The FBX Software Development Kit (SDK) [4] is a set of tools used for programming towards a specific area. In this case the specific area is the file type FBX. This SDK is ownedbyAutodesk which are the owners of 3ds Max and AutoCAD.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    19 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us