CATIA CAA 二次开发 详细教程

设计学徒自学网 2022年3月16日16:36:10caxa评论阅读模式
广告也精彩

1)创建三个点(参见教程5)
2) 将点连成线(参见教程6)
3) 通过三点创建一个参考平面,后面进行圆弧倒角时要用到该平面。
CATIGSMPlane3Points_var Supportplane = spGSMFactory->CreatePlane(spPoint1, spPoint2,spPoint3);
CATISpecObject_var spSupportplane = Supportplane;
4) 创建倒角半径的参数:
CATICkeParm_var Radius1 = NULL_var;
CATICkeMagnitude_var spRadMag = spParamDictionary->FindMagnitude("LENGTH");
CATUnicodeString name("Radius 1");
Radius1 = spParmFactory->CreateDimension(spRadMag,name, .01);
5) 创建倒角::
CATIGSMCorner_var Corner1 = spGSMFactory->CreateCorner(spLine1,
spLine2,
spSupportplane,
Radius1,
CATGSMSameOrientation,
CATGSMSameOrientation,
FALSE);
CATISpecObject_var spCorner1 = Corner1;
6) 裁剪去多余的线和点:
CATIGSMSplit_var Split1 = spGSMFactory->CreateSplit(spLine1,
spRadius1,
CATGSMSameOrientation);
CATISpecObject_var spSplit1 = Split1;文章源自设计学徒自学网-http://www.sx1c.com/2397.html

CATIGSMSplit_var Split1a = spGSMFactory->CreateSplit(spSplit1,
spRadius3,
CATGSMInvertOrientation);
CATISpecObject_var spSplit1a = Split1a;
7) 将线和圆弧依次连接起来,创建一个序列:
CATLISTV(CATISpecObject_var) joincurves;
joincurves.Append(spSplit1a);
joincurves.Append(spSplit2a);
joincurves.Append(spSplit3a);
joincurves.Append(spRadius1);
joincurves.Append(spRadius2);
joincurves.Append(spRadius3);
8)在讲序列连接起来之前,需要创建一个最小的结合距离:
CATICkeParm_var Mergedist = NULL_var;
CATICkeMagnitude_var spMergedist = spParamDictionary->FindMagnitude("LENGTH");
CATUnicodeString mergename("Merge Distance");
Mergedist = spParmFactory->CreateDimension(spMergedist,
mergename,
.0001);
9)连接起来并插入到视图中:
Now we can join this list of objects into a single shape and insert it into the part.
CATIGSMAssemble_var CurveAssy = spGSMFactory->CreateAssemble(joincurves,
Mergedist,
FALSE);
CATISpecObject_var spCurveAssy = CurveAssy;文章源自设计学徒自学网-http://www.sx1c.com/2397.html

spCurveAssy->Update();
CATIGSMProceduralView_var spCurObj = Curveassembly;
spCurObj->InsertInProceduralView();
CATIA CAA 二次开发 详细教程文章源自设计学徒自学网-http://www.sx1c.com/2397.html

继续阅读
  • 我的微信
  • 微信扫一扫
  • weinxin
  • 惠生活福利社
  • 微信扫一扫
  • weinxin
设计学徒自学网
  • 本文由 发表于 2022年3月16日16:36:10
  • 转载请务必保留本文链接:http://www.sx1c.com/2397.html
    本站展示的所有图文软件均来自于互联网,仅用于软件学习研究分享传递,请勿商用,本站如有侵权请联系客服删除。
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: