Skip to content

Instantly share code, notes, and snippets.

@kneerunjun
Last active March 23, 2017 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kneerunjun/2363baf7f19aa500b44bcdd68ef1e46a to your computer and use it in GitHub Desktop.
Save kneerunjun/2363baf7f19aa500b44bcdd68ef1e46a to your computer and use it in GitHub Desktop.
  • Design Automation using CATIA VBA

    • Pre requisites

      • Mechanical design fundamentals
      • Mechanical Computer Aided Design (CAD)
      • VB.NET syntax, OO programming
      • Understanding of COM principles & Interface based design
    • The need for CATIA v5VBA (Why) :

      • State: CATIA is authorititive/popular CAD tool used for virtual mechanical design. Althought when it comes to repititive tasks that need precision it can get some assitance from the CATIA VBA tools.
      • VB code run without human interventions atop CATIA (CATIA VBA) leads to better efficiency + precision.Saves time for the engineers so that they can concentrate on higher, more innovative tasks.
      • For large engineering organizations,since the business logic becomes less people-centric and more machine-centric. The knowledge is now complete organization asset.
      • Conclude: Repetitive tasks requiring higher precision are the best candidates for automation.
      • Exemplify: The situation demands us to measure spot thickness on virtual models of engineering components. Spots (locales) to measure are provided , but in the order of 10K. Manual measurement by picking points and running the command for all the points is grossly counter-productive. Here we can encode the the action of thickness measurement in a VB routine and run that for all the points. Measurement done as such is devoid of any manual intervention.
    • Introduction to CATIA

      • 🌐 https://www.3ds.com/products-services/catia/
      • 🌐 https://en.wikipedia.org/wiki/CATIA
      • Define Computer aided 3D interactive application –owned by Dassault Systems
      • Explain: it is :Multi suite software platform for Computer aided design (CAD, Mechanical) & analysis
      • Notify: CATIA is developed in C++ and the architecture it uses behind the scenes is based on COM (component object model), it is specifically called CAA (CATIA application architecture)
      • Highlight: CATIA is open for automation & customization
        • Explain: automation refers to routinizing the existing features. And not making any changes to the existing compilation of CATIA
        • Explain: customization is adding new features to CATIA and recompile.
      • 🌆 Show screen grabs of CATIA in application
    • Introduction to CATIA automation (What's CATIA VBA):

      • VB code written to access CATIA Programming interface
      • Such code then routinely calls functions in CATIA and defines a task
      • Structure of such tasks is as per business requirements and run in iterations /loops
      • Exmeplify: Making one cylinder of given radius in CATIA is a manual task while making 1K cylinder in CATIA of distinct dimensions is a routine job that can be called task.
      task
        command: draw cylinder base << radius of the cylinder
        command: extrude cylinder << height of the cylinder
      end task
      loop 1000
        task
      
      • Explain Automation is best suited for repetitive tasks that require precision
      • Conclude: Automation is what we are trying to achieve and it involves writing VB.NET code to call commands in CATIA without human intervention.
    • Spot Thickness Measurement : Usecase

      • Spot thickness in riveting and punching:

        • Explain: Rivet punching and energy requirements needed for designing precision punching setup
          • Cases where we are sensitive to the tolerance of the work done, energy calculations are vital
          • Demo: Energy calculations for 0.5 mm Aluminium sheet for punch diameter 1.5
          force required = dia X thickness X shear strength of the material
          
        • 🌐 https://www.irjet.net/archives/V2/i9/IRJET-V2I9266.pdf
        • Conclude: In precision punching it helps to know the thickness. Derivation energy required for the punch is bound to a simple formula.
      • Non uniform thickness measurement:

        • Explain: Practical cases are much more wider than those mentioned in the theory. Surfaces can have thickness varying and the thickness that does not have any algebraic relation to the co-ordinates on the surface
        • Video : showing manual measurement in CATIA using the SPA workbench commands
        • Explain when the number of points pile up to multiples of 1K the manual measurement of such points on the non uniform thickened surface makes no sense.
          • Precision decreases
          • Manual effort not justified
        • Conclude A VB scripted task would be precise and eliminate the human repetitive effort
      • Caliper measurement technique

        • Explain the setup of a caliper, calculations, and indirect thickness measurement, how it is better suited for automation and zero human intervention
        • Explain Use of parametric modeling - change in the parent feature forces re-computation of child features in CATIA. taking the advantage of the same feature we proceed to use caliper for rapid automated measurement
        • Highlight when we build the caliper with point (at which we do spot measurement) as the parent , it then becomes easy to move the caliper to the next spot, consequently we run a loop and that makes it a continuous automated process.
        • Live Demo Show code for caliper constructions
        • Live Demo automated caliper running for all the points - thickness at each spot generated
    • Glossary

      • CATIA : Computer Aided 3D interactive application

      • CATIA VBA : CATIA automation tool that uses VB language to do API programming

      • accuracy : Probability of hitting the target

      • precision : Probability of hitting the target over repititions

      • CAD : Computer aided design

      • Caliper : Is an instrument to measure internal and external dimensions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment