DTAS dimension tolerance analysis Python script for automated modeling – solving the \"two high\" problems in the modeling field (high repetition, high time consumption)
Thread Content
Python script for DTAS dimension tolerance analysis – automated modeling to address the \"two high\" problems in the field of modeling. Python automation for DTAS tolerance analysis and chain of dimensions calculation: solves the \"two high\" issues (high repetition, high time consumption) in modeling. Stop being a martyr in the world of tolerances – let Python scripts serve as your modeling assistant; DTAS Python gives you true modeling freedom, allowing you to develop virtual assembly and virtual measurement solutions for your specific scenarios. Abstract: Tolerance analysis software, dimension chain calculation, dimensional tolerance analysis, tolerance simulation analysis, dimensional engineering, and dimension chain verification – what are the application scenarios for using Python scripts to automate modeling? 1. What are the application scenarios? 2. How to get started quickly using the DTASPython script? 3. An example illustrates how to quickly generate measurement points around the headlight and perform virtual measurements I. Application Scenarios 1. Free users from complex, repetitive tasks. (DRY, Don’t Repeat yourself) 2. Users can develop their own logic for virtual measurement and virtual assembly in complex scenarios. (DIY, do it yourself) 3. Standardization, automation, and intelligence of tolerance simulation analysis processes. II. A quick start to DTAS Python scripts: 1. Recording macro commands and modifying them accordingly; 2. Following the examples in script_lib and making modifications there → in the DTAS software installation directory\script_lib. 3. Checking the help materials for secondary development using DTAS Python → in the DTAS software installation directory\help. In this session, we will focus on the first application scenario. III. Examples of application scenarios for DTAS3D Python scripts: 1. In the design and development of lighting fixtures, it is necessary to evaluate the surface tolerances at key locations of the headlights after using inspection tools. 2. In the development of inspection tools for lighting fixtures, it is necessary to assess the repeatability of these surface tolerances at key locations of the headlights. 3. In the design and development of automotive body DTS components, it is necessary to evaluate the surface tolerances between the headlights and various related parts. In all these scenarios, it is required to create virtual measurement points around the headlights. How can we quickly generate such measurement points and carry out virtual measurements? IV. Software Operation: Click on the operation link: Ditauo (Shanghai) Technology Development Co., Ltd. The script for this case is as follows:#****************************Batch creation of point-to-point distance measurements************************************#
version: V001
author: dtas soft
date: 2023.03.31
#--------------Usage----------------#
The name must follow certain rules: Name_i
#Modify point1Name#
#Modify point2Name#
#Modify MeasureName#
#Modify Numbe#
#****************************Batch creation of point-to-point distance measurements************************************#
Number = 27
Point1Name = “Lamp_Flush-”
Point2Name = “Gauge_Flush-”
MeasureName = “Measure_Flush-”
for j in range(Number):
j = j + 1
#Distance between two points: Mea_DistanceOfTwoPoint(Point1Name+str(j), Point2Name+str(j), feature3="", feature4="", name=MeasureName+str(j), lower=-2, upper=2, desc="desc", useAbso=False, parent="", flag=2, normal=)
V. Conclusion
DTAS has creatively applied CAE scripting automation techniques and secondary development methods to the CAT field.
1. By providing access to underlying APIs, supporting macro recording, and allowing the creation of Python scripts, it frees users from tedious and repetitive modeling tasks. Scripting automation improves modeling efficiency, and these scripts can be reused.
2. It enables users to develop custom tolerance analysis models such as virtual assembly and virtual measurement, thereby enhancing the software’s ability to handle complex application scenarios and giving advanced users, experts, and end-users more flexibility in using the software.
3. By fostering a software user ecosystem and enabling automated, intelligent tolerance analysis, we will introduce another application scenario soon – stay tuned! >>>Follow the DTAS DiTuo Technology official account or contact our customer service, and reply with “Schedule a demonstration for the tolerance Python script”, and we will get in touch with you right away!