码迷,mamicode.com
首页 > 其他好文 > 详细

Open Cascade:如何从AIS_Shape导出TopoDS_Shape?

时间:2019-05-29 15:00:57      阅读:292      评论:0      收藏:0      [点我收藏+]

标签:tar   null   obj   content   class   opened   sop   selected   existing   

Open Cascade:如何从AIS_Shape导出TopoDS_Shape?

实现代码如下:

if( !myAISContext->HasOpenedContext())
{
wxMessageBox(_T("It is necessary to activate the edges selection mode\n\and select edges on an object before \nrunning this function"),_T("Error!"));
return;
}

myAISContext->InitSelected();
if (myAISContext->MoreSelected()) {
Handle(AIS_Shape) S = Handle(AIS_Shape)::DownCast(myAISContext->SelectedInteractive());

if (S.IsNull()){
wxMessageBox(_T("It is necessary to activate the edges selection mode\n\and select edges on an object before \nrunning this function"),_T("Error!"));
return;
}

TopoDS_Shape Sh=S->Shape();

参考:

HOW TO GET THE TOPODS_SHAPE FROM A EXISTING AIS_SHAPE?

 

Open Cascade:如何从AIS_Shape导出TopoDS_Shape?

标签:tar   null   obj   content   class   opened   sop   selected   existing   

原文地址:https://www.cnblogs.com/2018shawn/p/10943429.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!