iCAx开思工具箱

标题: 如何实现CATIA中的拆解命令 [打印本页]

作者: lansehaiyu    时间: 2012-12-4 14:11
标题: 如何实现CATIA中的拆解命令
接合.1是由不同的线段组合在一起的,如何实现创成式外形设计中的拆解命令 (, 下载次数: 24) ,将其拆分为不同的线段。 (, 下载次数: 22)
作者: linlily0925    时间: 2012-12-4 14:39
这个木有对应的接口,需要用拓扑分解,然后再将分解后的元素转化为特征挂到结构树上~~
作者: lansehaiyu    时间: 2012-12-4 14:51
怎样实现拓扑分解呢,是用CATBody吗?
作者: linlily0925    时间: 2012-12-4 15:23
lansehaiyu 发表于 2012-12-4 14:51
怎样实现拓扑分解呢,是用CATBody吗?

恩恩 是的  CATBody   CATCell~~~
作者: lansehaiyu    时间: 2012-12-4 16:26
还想请问下,怎么在CAA中更改草图的支撑平面呢
作者: linlily0925    时间: 2012-12-4 16:43
lansehaiyu 发表于 2012-12-4 16:26
还想请问下,怎么在CAA中更改草图的支撑平面呢

CATISketch->AttachToPlane ()或者CATISketch->SetAxisData()
作者: lansehaiyu    时间: 2012-12-14 09:28
CATIGeometricalElement_var spGeoElem(CopySelectArrange);
        if(spGeoElem==NULL_var)
        {
                cout<<"得到GeometricalElement失败!"<<endl;
                return FALSE;
        }

        CATBody_var spBody = spGeoElem->GetBodyResult();

        CATLISTP(CATCell) LISTCell;
        int nCellType = 1; //取vertex是0, 取edge是1, 取face是2, 取volumn是3
        spBody->GetAllCells(LISTCell, nCellType);
        cout<<"列表LISTCell的几何体个数:"<<LISTCell.Size()<<endl;

        CATIFeaturize_var spIFEdgeElem = NULL_var;

        for( int index = 1; index <= LISTCell.Size(); index++ )
        {
                CATCell *pEdgeCell = LISTCell[index];
                if(!pEdgeCell)
                {
                        continue;
                }
                CATCell_var spEdgeCell = pEdgeCell;
                if(!spEdgeCell)
                {
                        continue;
                };
                CATIBRepAccess_var BRepEdge1 = CATBRepDecode(spEdgeCell,spGeoElem);
                spIFEdgeElem = BRepEdge1;
                cout<<index<<endl;
                if (NULL_var == spIFEdgeElem)
                {
                        cout<<"未识别出一条边!"<<endl;
                        return FALSE;
                }

                CATISpecObject_var spEdgeElem = NULL_var;
                spEdgeElem = spIFEdgeElem->FeaturizeF(MfDuplicateFeature | MfPermanentBody | MfSelectingFeatureSupport | MfFunctionalFeaturization);
                if (NULL_var == spEdgeElem)
                {
                        cout<<"特征化失败!"<<endl;
                        return FALSE;
                }
               CATISpecObject_var spSpecTmp = spEdgeElem;                        CATISpecObject_var ispInputParent = spGsmTool;
        InsertInProceduralView(spSpecTmp,ispInputParent);

        }
这样怎么添加不到结构树上
作者: linlily0925    时间: 2012-12-14 11:16
你判断一下你的spSpecTmp 和ispInputParent 对象是否为空,如果不为空,应该会显示的~~~试试CATIDescendents->Append()方法~~~
作者: lansehaiyu    时间: 2012-12-14 16:00
spSpecTmp 和ispInputParent 对象不为空,但是显示不出来,CATIDescendents->Append()方法也显示不出来

作者: 董振    时间: 2012-12-24 09:02
在逆向里面有这个命令
作者: Mr.L    时间: 2013-4-3 13:25
学习了
作者: junhun1000    时间: 2013-10-2 15:10
没看懂、、、、、、、、、、、、、、、、、、
作者: linlily0925    时间: 2013-10-9 10:30
lansehaiyu 发表于 2012-12-14 09:28
CATIGeometricalElement_var spGeoElem(CopySelectArrange);
        if(spGeoElem==NULL_var)
        {

Featurize之后的特征使用CATIDatumFactory接口转化到无参特征 然后再挂到结构树上就可以了
作者: lyvia11    时间: 2014-3-11 10:56
lansehaiyu 发表于 2012-12-14 09:28
CATIGeometricalElement_var spGeoElem(CopySelectArrange);
        if(spGeoElem==NULL_var)
        {

同学 CATIGeometricalElement_var spGeoElem(CopySelectArrange); 这个CopySelectArrange参数是什么类型啊  用啥转换过来的呀  我现在也在做这个东西 一直没弄出来




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3