本文整理汇总了C++中AcGePoint3dArray::contains方法的典型用法代码示例。如果您正苦于以下问题:C++ AcGePoint3dArray::contains方法的具体用法?C++ AcGePoint3dArray::contains怎么用?C++ AcGePoint3dArray::contains使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcGePoint3dArray
的用法示例。
在下文中一共展示了AcGePoint3dArray::contains方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getVentLenth
double VentCaculate::getVentLenth(AcDbObjectId objId)
{
AcDbObjectIdArray objIds;
DrawHelper::FindMineGEs(_T("Tunnel"),objIds);
int len = objIds.length();
AcGePoint3d spt,ept;
//获取选择工作面的始末节点
LinkedGE *pEdge = getLinkedGE(objId);
pEdge->getSEPoint(spt,ept);
AcGePoint3dArray findedPts;
findedPts.append(spt);
for(int i = 0; i < len; i++)
{
pEdge = getLinkedGE(objIds[i]);
pEdge->getSEPoint(spt,ept);
//acutPrintf(_T("\n%d->始节点:(%f,%f),末节点(%f,%f)"),i,spt.x,spt.y,ept.x,ept.y);
if (findedPts.contains(spt) && !findedPts.contains(ept))
{
findedPts.append(ept);
i = -1;
}
else if (findedPts.contains(ept) && !findedPts.contains(spt))
{
findedPts.append(spt);
i = -1;
}
}
CString ventLenthStr;
DataHelper::GetPropertyData( objId, _T( "长度" ), ventLenthStr);
double ventLenth = _tstof(ventLenthStr);
for (int i = 0;i < len; i++)
{
//需要排除进风巷和回风巷
CString name;
bool isVentTunel = false;
DataHelper::GetPropertyData( objIds[i], _T( "名称" ), name );
if ( _T("进风巷") != name && _T("回风巷") != name)
{
isVentTunel = true;
}
//获取其他巷道的始末节点
pEdge = getLinkedGE(objIds[i]);
pEdge->getSEPoint(spt,ept);
CString lenthStr;
DataHelper::GetPropertyData( objIds[i], _T( "长度" ), lenthStr);
double lenth = _tstof(lenthStr);
if ((findedPts.contains(spt)||findedPts.contains(ept))&& isVentTunel)
{
//acutPrintf(_T("\n始节点:(%f,%f),末节点(%f,%f)"),spt.x,spt.y,ept.x,ept.y);
ventLenth += lenth;
}
}
return ventLenth;
}