Pages

Showing posts with label CATIA. Show all posts
Showing posts with label CATIA. Show all posts

Wednesday, February 27, 2013

Android Application Programming Basics

Android Application Programming Basics
Today I’m going to share a few of my notes about Android Application programming basics. Recently I’ve been trying to learn how to program Android applications. This post is not directly related to CAD but I will hopefully one day be creating some Android applications for CAD users.

Android Programming Acronyms
  • SDK = software development kit
  • DP = density pixels
  • IDE = Integrated Development Environment
  • UI = User Interface

Android apps are written in Java. I think it’s much harder to learn than writing macros for CATIA V5. When you write a macro, you can type up the code in a simple text editor and it is read top to bottom like a book. When writing code for Android applications, code must be inserted into at least three different locations within the Eclipse IDE software.

Pages or screens in Android apps are known as Activities. An Intent is a communicator with another application and you use it to change screens. To create a new activity right click on package: New>Class. Give it a name and set Super class as Activity, which will be a java file. Each activity needs a layout file (.xml) created by going to New>Android xml. Name it file_name.xml. Xml is a way to organize information with structure (as opposed to just using a text file). The xml file is used to organize the layout and properties of all the text, input boxes, buttons, images, etc. Buttons use a method called OnClickListener.

Alright, that might have sounded confusing to you, especially if you’ve never programmed before, so I’m going to leave it at that for now. Would you like to learn more about Android application programming? Please let me know and I will write more detailed posts. I’ve recently created two Android applications and they are available in the Google Play store for Free here.

In your opinion, what are the best CAD apps out there?

Wednesday, January 9, 2013

CATIA Lego Training Download

lego_cad_software
I’ve long looked for a good LEGO CAD program and today I’ve finally found one. John B Cearns, founder and
owner of Solid Engineering Solutions, has created an outstanding exercise to help students learn how to use CATIA’s Assembly Design workbench while being super fun at the same time.


While building the Lego model you’ll learn how to use catalogs in CATIA to create different Lego blocks in 3D. Not all the parts required to make the Four Wheeler and Rebel Wrecker are present in the CATParts folder. There are 72 parts missing from this folder but they have provided 12 tabulated parts for you to use to easily create the missing 72 parts. Step by step instructions are provided in the documentation for both sets.  The Four Wheeler contains 102 different parts and the total parts are 338. The Rebel Wrecker contains 123 different parts and the total parts are 468.

catia lego model

The free download contains all instructions necessary to assemble the Four Wheel and Rebel Wrecker. Or, if you just want to build the physical Lego sets you could just do that as well using these instructions. Get them here:

After you have created these two CATProduct models, there is a wealth of Kinematics joints you can perform on them: Revolute Joint, Cylindrical Joint, Spherical Joint, Rigid Joint, Universal Joint, Gear Joint, Cable Joint, and Rack Joint. The Lego parts also use a relation law created by a Multiple Value User Parameter to define the color: PartBody.Color = PartBodyColor.

This exercise is a great example if you want to use CATIA or other CAD software as a Lego design software. Many different bricks can be created from the template of a few using catalogs. All around, I highly recommend checking out this tutorial because, as I said, it is a lot of fun and very educational too (and it's free)!

Download the Lego CAD files and instructions here:http://www.solengsol.com/solid_engineering_downloads.htm
Please note: CATIA V5 R19 is required.

Thursday, August 16, 2012

Default Text Sizes in CATIA V5

catia default text size
How do you change the default tree text size in CATIA?

To change the default size of the text in the specification tree in CATIA V5, click on the tree. This will allow you to first set the size of the tree text to how you want it by zooming in or out. Once satisfied, instead of clicking on the tree again click on the axis system in the lower right hand corner of the screen. This should change the default size of the specification tree, even if you should close CATIA and open it again the text size should remain the same. 



How do you change the compass size in CATIA V5?

text size catia
 

Another common question is how to change the size of the compass. I recently just switched over my PC to Windows 7 OS and the compass is smaller now than it was while I was running Windows XP. In addition to this, when I right click on so geometry in the spec tree and open the Parents and Children window in CATIA the default text size is so small I can't easily read it. Thus, I have to zoom in on it every single time which is really annoying and wastes valuable time (I'm a CAD engineer and am always striving for the most efficient way to do things). There does not appear to be an option under Tools > Options to change this setting. The best answer I could find involves editing the CATIA Environment file (env.txt) as so:

CATWidthMMOfScreen= 340 which is the screen width value in millimeters => measured on your screen.
CATHeightMMOfScreen
= 200, the screen height value in millimeters => measured on your screen.
CATWidthPixelOfScreen
= 1920, the horizontal screen resolution set in your computer display properties panel.
CATHeightPixelOfScreen
=1200 is the vertical screen resolution set in your computer display properties panel.

The location of the CATIA environment file depends on how you or your administrator have set it up. Listed below are the default CATEnv file locations: 

Windows XP:
C:\Documents and Settings\All Users\Application Data\DassaultSystemes\CATEnv
C:\Documents and Settings\username\Application Data\DassaultSystemes\CATEnv

Windows 7:
C:\ProgramData\DassaultSystemes\CATEnv
C:\Users\username\AppData\Roaming\DassaultSystemes\CATEnv

Monday, June 11, 2012

Kinect Hack Video: CATIA V5 Manipulation


KinectCAD for CATIA V5

I recently stumbled upon one of the coolest Kinect applications I’ve ever seen. The Kinect is Microsoft’s Xbox 360’s latest webcam style peripheral. This new high tech toy permits users to “be the controller” through natural user interface (NUI) by controlling the game with their voice and body movements. Microsoft took it a step further and released the Kinect software development kit (SDK) for Windows 7 allowing developers to write Kinect applications in C++, C#, or Visual Basic .NET. There are numerous “Kinect hacking” videos on YouTube. One such user has now manipulated the Kinect to provide a gesture based movement of CATIA part objects.




How to use Kinect with CATIA V5? Using this new application in development it is now possible to rotate and zoom in or out of your new Kinect 3D CAD model while standing in front of your monitor and using your arms. It gets even better: utilizing Kinect’s built in microphone there is a rudimentary speech recognition function you can use to change the rotation axes. Can you imagine creating every part in CATIA this way (or any other CAD system for that matter)?

Using the SDK V1 software for Kinect, KinectCAD has been created in Visual C# 2010. It may be a slow way to work (at first) but is a brilliant concept nonetheless. Pretty soon we’ll be seeing 3d Kinect models of all our CAD parts. It would be a great way for automakers to perform layout check in conference rooms (and funny to watch  too). Hats off to the creators and I can’t wait to see more. Checkout the Kinect video recording below:


Please note: this program is still in development.  To learn more please visit this site. So, what do you think of KinectCAD? What other applications could you see between Xbox Kinect and CATIA V5? Please leave a comment below!

Tuesday, May 1, 2012

Importing AutoCAD Drawings into CATIA

 How to convert DXF drawings into CATIA CATPart sketches 

There's a little trick I use when I need to copy and paste DXF 2D drawing views from AutoCAD into a sketch for a CATPart file. First of all, if you attempt to simply copy and paste a drawing view directly into the part file you may get something that looks the image picture below- a jumbled mess of data, points, and lines. 



In order to fix this problem to import the drawing data completely, open the dxf file in CATIA. Next, save the drawing as an IG2 file (which is a 2D iges file). Now open the IG2 file and copy the main view into the CATPart. Or, another option is you can rename your IG2 2D file in Windows as .igs and then open that file and it will be imported in CATIA as a 3D part file. Sometimes you have to get creative and employ these little work-arounds to get the software to do exactly what you want it to do.



Tuesday, April 10, 2012

What is CATIA UUID?


One of the biggest CATIA mysteries for new users is what is UUID and what does it stand for? UUID stands for a Universal Unique IDentifier. Every CATPart and CATProduct contains a UUID. Basically, CATIA identifies files based on their file name and their UUID. Where problems occur are when two pieces of data have the same UUID. Compounding the problem, the UUID can’t be viewed or edited with any current CATIA function. There are cases when two files may have different names but share the same UUID.

Actions which will create new UUID include:
·        File + new
·        File + new from
·        File + save As - option save as new document
·        INSERT new Product
·        INSERT new part
·        Document Template Creation

Actions which will keep the same UUID for each include:
·        File + open
·        File + save management
·        File + save
·        File + SaveAs
·        Send to directory
·        File + CLOSE
·        File + save
·        File + save ALL

Tuesday, April 3, 2012

CATIA Error: Generic Naming Graph Treatment


CATIA V5 is full of many wonderful surprises in the form of weird error messages. One of my favorite is "Click OK to terminate: Yes or No" but it doesn't matter which option you choose, CATIA still crashes and closes unexpectedly. I recently had the pleasure of discovering a new problem that I had never encountered or even heard of before. I was in the process of updating a CATPart when an update error popped up displaying: "An error occurred in Generic Naming graph treatment." The update cycle was stopped and would not continue. The issue occurred every time I tried to update the part file. Better yet, I couldn't find any information about this particular error anywhere on the internet. Has anyone else experienced this problem or have any idea what the exact cause could be? I have to admit I'm at a bit of a loss here. Fortunately, I was able to eventually work around the issue but I would still like to know what the error means. 

Join our new CAD Systems Help Facebook page for the latest updates and information
.

Monday, March 19, 2012

How do you simulate rolling in CATIA?


This is anupdate of an older post. I've created a brand new tutorial with step-by-step instructions detailing how to use CATIA V5's DMU kinematics workbench to simulate a rolling object.

First, in assembly design, create a new product and insert two new parts, one name Wheel and the other Ramp. 


I've explained this before but as a real quick overview, to create my ramp I used three sketches (overhead, side profile, and rotation about itself sketch) and combined them with laws. The wheel is a simple sketch and pad command. On my ramp I have two parallel curves 5mm apart. On my wheel I also have two parallel curves offset from each other 5mm. I added a point to one of the edges of the wheels so you can see it spin around in a circle when we simulate it. 


Add a Fix constraint to the ramp to ensure it does not move. It's absolutely vital that the curves on the wheel and the curves on the ramp are tangent to each other. Even a 0.001 gap and it will not work. Use coincidence restraints to pair them together if you have to. Also make sure your ramp is nice and smooth and much bigger than your wheel.

Now it's time to go into the DMU Kinematics workbench. Create a new mechanism and set the ramp as the fixed part. I can constrain all degrees of freedom using only two joints. The first joint is a roll curve joint between curve 1 on the wheel and curve 1 on the ramp. This is a length driven joint meaning you will input the rolling distance over time from the start point. The second joint is a slide curve joint between curve 2 on the wheel and curve 2 on the ramp.


Once you get the hang of it you can simulate more complex systems, like a full-scale roller coaster

CATIA KINEMATICS ROLLING TUTORIAL VIDEO: 



View my Introduction to CATIACATScript Macros Video Tutorial.

Monday, January 16, 2012

Dealing with Different Versions of CATIA

Only one version of CATIA V5 can be registered with Windows at a given time. If you have R16, R17, and R18SP2 installed on your PC, only one of these is currently registered. You can find which one is registered by looking at the directory when you register. To automate a specific version of CATIA you first have t register that version with Windows. Here are the steps to un-register or re-register a CATIA V5 version:
 
1.        Reboot your pc
2.        Open a command prompt
3.        CD to the unload directory of the version of CATIA you want to un-register (i.e. “c\program files\dassault systemes\B15\intel_a\code\bin”)
4.        Run the command “cnext-unregserver”
5.        Open up the task manager and wait until the “cnext” process stops running (which may take a few minutes)
6.        CD to the unload directory of the version of CATIA you want to register (i.e. “c\program files\dassault systems\B16\intel_a\code\bin”)
7.        Run the command “cnext-regserver”
8.        In the task manager again, wait until the “cnext” process stops
9.        Open up VB and check that the correct version is registered
10.        Please note this only needs to be done between full releases and not service packs!

Monday, December 12, 2011

New DraftSight Learning Resources Flipbook Available

We invite you to check out the DraftSight Master Series – an online flipbook designed to help you maximize your design skills. The book includes a collection of tips, tricks, videos, webinars and more from DraftSight’s training guru, Mark Lyons.
We hope you’ll find this to be a useful tool, and invite you to share it with your friends and colleagues. 
Thanks for using DraftSight! - The DraftSight Team

Saturday, December 3, 2011

Gift Ideas for CAD and 3D Modelers

Are you shopping for a CAD user, 3D modeler, or an engineer? Well, I have a couple of holiday gift suggestions for you.

A full-color guide to the #1 architectural drafting program—AutoCAD 2012 for Dummies. AutoCAD is the leading software used to create 2D and 3D technical drawings. Used by engineers, architects, and drafting professionals, it can be complex and is a perfect subject for the tried-and-true For Dummies format. Full-color illustrations make the instructions even easier to follow, because examples in the book appear exactly as they will on the screen.


Fully updated for the latest version of software, Kelley’s Pro/ENGINEER Wildfire 5.0 Instructor remains organized around step-by-step tutorials — the most effective way to teach and learn this procedure-intensive CAD application. Pro/ENGINEER Wildfire 5.0 Instructor provides a solid background in parametric design and constraint-based modeling. In addition, the comprehensive references make this text an all-in-one tutorial, reference, and lecture guide for students of Pro/ENGINEER.


CATIA V6 (Computer-Aided Three Dimensional Interactive Application) is the world's leading multi-platform CAD/CAM/CAE software suite marketed worldwide by IBM. It allows the user to apply its capabilities to a variety of industries such as automotive, industrial robots, electronics, manufacturing design, aerospace, and consumer goods. CATIA V6 Essentials includes all the major concepts related to the latest version of CATIA, such as installation, modes, and modeling in an easy-to-understand, step-by-step format. It also covers all the major commands and techniques and provides the reader with all of the details to learn the basics with a clear method of instruction. This comprehensive reference will help you navigate this multifaceted software with ease.


Solid Edge ST3 for Designers is a comprehensive textbook that introduces the users to direct modeling with precise control of dimension-driven design through precision sketching and selection handles using the Solid Edge ST3 software. The textbook covers all major environments of Solid Edge ST3 in both the Synchronous and Ordered modeling with a thorough explanation of all tools, options, and their applications to create real-world products.

And some shameless self-promotion. Have you ever wondered what it takes to design and build a roller coaster? At last, there’s a book that shows you. A mix of engineering and art, roller coasters are complex three-dimensional puzzles consisting of thousands of individual parts. Designers spend countless hours creating and tweaking ride paths to push the envelope of exhilaration, all while maintaining the highest safety standards. Coasters 101: An Engineering Guide to Roller Coaster Design examines the numerous diverse aspects of roller coaster engineering, including some of the mathematical formulas and engineering concepts used.

Thursday, November 3, 2011

Free 3D CAD Viewer downloadable software compariso


A useful tool in today's world of engineering is to have software which can view 3D CAD models but without having all of the tools of a CAD software system thus making the viewer extremely cheap (ideally it would be free). Here is a table comparing a few different CAD Viewer software programs and in the coming weeks I will be offering a more descriptive breakdown of each one including their strengths and weaknesses. 

Monday, October 24, 2011

How to add amacro icon to a toolbar in CATIA V5?

There are multiple ways to initiate a CATScript macro in CATIA V5. Did you know that it is possible to invoke your macro through a tool bar icon? How do you create an icon for your macro? Go to tools >customize >commands > macros > show properties. Next, simply define a logo for your macro by picking one from the 180 plus icons to choose from (or browse to your own custom made icon) and then drag and drop it into the menu bar where you want it. It's that easy. So now you should have three ways to run your VBA CATScripts: going to Tools>Macro>Macros, hitting Alt+F8, or by clicking on your icon in a toolbar.

Wednesday, October 12, 2011

How to automatically take a picture using a catscript

Catscripts can be a powerful tool when needing to automate processes in CATIA V5. One common process which is helpful to automate is when you want to take a screenshot of a .catpart or .catproduct with a white background (to put into a powerpoint or Excelfile). This sounds like a daunting task if you are new to VB programming. I find the best thing to do is to break down this large, challenging project into smaller, more manageable tasks. Let's think about each stage we want the macro to complete:
1. Reframe on the part
2. Hide the specification tree
3. Change the background color to white
4. Take a screenshot and save it as a JPEG file
5. Change the background display color back to what it was
6. Unhide the specification tree
Now, if we take each of those steps one at a time it's not so big of a problem. I'll be explaining each of these steps in the next couple of posts starting with step one today- how to automatically reframe (or fit all in) on the part in CATIA. We'll create each step individually then combine them all into one CATScript at the end.  This tutorial will also help you learn visual basic programming and will help you write your own CATScripts.
First, go to Tools>Macro>Macros. Click "Create" and change the Macro language to CATScript. Enter a name for your macro. Copy and paste the following code.

Language="VBSCRIPT"
Sub CATMain()


Dim specsAndGeomWindow1 As Window

Set specsAndGeomWindow1 = CATIA.ActiveWindow


Dim viewer3D1 As Viewer

Set viewer3D1 = specsAndGeomWindow1.ActiveViewer


viewer3D1.Reframe


Dim viewpoint3D1 As Viewpoint3D

Set viewpoint3D1 = viewer3D1.Viewpoint3D


End Sub

What does all of the above actually mean? A CATIA VBA program or “macro” consists of a
“Subroutine” named CATMain(), called out with the line Sub CATMain(). Variables are “dimmed” (declared) and then “set” (given a value). Variables are “dimmed” as a type. A type is either a “primitive” type (single, double, integer, string, etc.) or an object type (more complex). 

Stay tuned to learn more in our next article...