[其它] Tip #8: Simplifying Material/Surface Property Assignments to Imported CAD

3.1k 0
发表于 2013-6-17 16:48:08|湖北 | 查看全部 阅读模式
Tip #8: Simplifying Material/Surface Property Assignments to Imported CAD Geometry

If you are importing a lot of your geometry from outside CAD programs into ASAP®, instead of using the IGES or GTX translator to do material assignments in the geometry INR file, you can use a $DO loop in an ASAP script to make the assignment. This makes it easier to quickly change the material and surface properties for repeated analysis, or to vary the property in tolerance analysis runs.

To do this, start by separating different material groups into different IGES or GTX files. For example, if you have a CAD file with a reflector and a lens, export a file with just the reflector and another with just the lens. Translate both files using the translator but don't do any material assignment - simply press Enter or select "File-Finish" to create an ASAP INR file. Then use the following ASAP script syntax in your main file:

$READ REFLECTOR.INR
$GRAB 'GROUP' 1 1 NUMOBJS
$DO 1 (NUMOBJS)
{
OBJECT .?
INTERFACE 0.85
ROUGHNESS MODEL 1
REDEFINE COLOR 3
}

$READ LENS.INR
$GRAB 'GROUP' 1 1 NUMOBJS
$DO 1 (NUMOBJS)
{
OBJECT .?
INTERFACE COAT BARE AIR ACRYLIC
ROUGHNESS MODEL 2
REDEFINE COLOR 4
}

Scripting the material and surface assignments in this matter allows the properties to be changed easily in the script and/or made into variables that can be randomized for tolerance analysis.

Bonus tip: When building complicated CAD models, you are most likely separating your objects into layers. Get into the habit of making a new layer for each optical property in your CAD model, and you will have a head start on exporting your system for analysis in ASAP. Think of these layers as "optical property layers". Turn them on one at a time as you export your model, then follow the above instructions for applying optical properties to the pre-partitioned IGES or GTX files you created.

该贴已经同步到 asdoptics的微博

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则

投诉/建议联系

admin@discuz.vip

未经授权禁止转载,复制和建立镜像,
如有违反,追究法律责任
  • 关注公众号
  • 添加微信客服
Copyright © 2026 光电工程师社区 版权所有 All Rights Reserved. Powered by Discuz! X5.0 Licensed 鄂ICP备17021725号-1
关灯 在本版发帖
扫一扫添加微信客服
返回顶部
快速回复 返回顶部 返回列表