显示catispecobject_CAA中CATIGSMIntersect接口的问题

然后你可以在写一个函数,比如取一个只有一个点组成的body的CATPOint

CATPoint_var WSHSampleUtil::FindPointFromBody( const CATBody_var& ispBody )

{

   CATPoint_var spPoint = NULL_var;

   do {

      if ( !ispBody ) {

         break;

      }

    // we just limit to 1 domain only here

      CATLONG32 NbDomain = isBody->GetNbDomains();

      if ( NbDomain != 1 ) {

         break;

      }

      CATDomain_var spDomain = isBody->GetDomain( NbDomain );

      if ( !spDomain ) {

         break;

      }

      CATLONG32 NbCell = spDomain->GetNbCellUses();

      if ( NbCell < 1 ) {

         break;

      }

      CATCell_var spCell = spDomain->GetCell( 1);

      if ( !spCell ) {

         break;

      }

      if ( !spCell->IsATypeOf( CATPointType ) ) {

         break;

      }

      CATVertex_var spVertex = spCell;

      if ( !spVertex ) {

         break;

      }

      spPoint = spVertex->GetCurve();

      if ( !spPoint ) {

         break;

      }

   } while (FALSE);

   return spPoint;

}

当然实际上还要考虑你的点会是个什么样的点,比如一个3D点和一个edge上的构成点的特性还是有些地方不同的,你有时候可能需要取RepGeomertry,或不能直接用smartpoint来转型

这2个函数只是看着帮助随便写的,所以可能实际上还需要对转型做些修正

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值