本文整理汇总了C++中step::RefPtr::getNe方法的典型用法代码示例。如果您正苦于以下问题:C++ RefPtr::getNe方法的具体用法?C++ RefPtr::getNe怎么用?C++ RefPtr::getNe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类step::RefPtr
的用法示例。
在下文中一共展示了RefPtr::getNe方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int n, char **p)
{
Step::RefPtr<ifc2x3::ExpressDataSet> eds ;
try
{
std::cout << "Creating ExpressDataSet" << std::endl;
eds = new ifc2x3::ExpressDataSet;
}
catch (const std::exception& e)
{
TEST_FAILURE((std::string("Exception : ") + e.what()).c_str());
}
TEST_VALIDITY(eds);
Step::RefPtr<ifc2x3::IfcEdgeLoop> EdgeLoop = eds->createIfcEdgeLoop();
TEST_VALIDITY(EdgeLoop);
TEST_ASSERT(EdgeLoop->getNe()==0);
Step::RefPtr<ifc2x3::IfcOrientedEdge> OrientedEdge1 = eds->createIfcOrientedEdge();
TEST_VALIDITY(OrientedEdge1);
Step::RefPtr<ifc2x3::IfcCartesianPoint> PointStart1 = eds->createIfcCartesianPoint();
PointStart1->getCoordinates().push_back(0);
PointStart1->getCoordinates().push_back(0);
PointStart1->getCoordinates().push_back(0);
Step::RefPtr<ifc2x3::IfcCartesianPoint> PointEnd1 = eds->createIfcCartesianPoint();
PointEnd1->getCoordinates().push_back(1);
PointEnd1->getCoordinates().push_back(1);
PointEnd1->getCoordinates().push_back(1);
OrientedEdge1->setEdgeStart(PointStart1);
OrientedEdge1->setEdgeEnd(PointEnd1);
EdgeLoop->getEdgeList().push_back(OrientedEdge1);
TEST_ASSERT(EdgeLoop->getNe()==1);
LOG_DEBUG("EdgeLoop->getNe() = " <<EdgeLoop->getNe()<< std::endl);
////////////////////////////////////////////////////////////////////////////////////////////////////////////
Step::RefPtr<ifc2x3::IfcOrientedEdge> OrientedEdge2 = eds->createIfcOrientedEdge();
TEST_VALIDITY(OrientedEdge2);
Step::RefPtr<ifc2x3::IfcCartesianPoint> PointStart2 = eds->createIfcCartesianPoint();
PointStart2->getCoordinates().push_back(0);
PointStart2->getCoordinates().push_back(0);
PointStart2->getCoordinates().push_back(0);
Step::RefPtr<ifc2x3::IfcCartesianPoint> PointEnd2 = eds->createIfcCartesianPoint();
PointEnd2->getCoordinates().push_back(1);
PointEnd2->getCoordinates().push_back(1);
PointEnd2->getCoordinates().push_back(1);
OrientedEdge2->setEdgeStart(PointStart2);
OrientedEdge2->setEdgeEnd(PointEnd2);
EdgeLoop->getEdgeList().push_back(OrientedEdge2);
TEST_ASSERT(EdgeLoop->getNe()==2);
LOG_DEBUG("EdgeLoop->getNe() = " <<EdgeLoop->getNe()<< std::endl);
////////////////////////////////////////////////////////////////////////////////////////////////////////////
Step::RefPtr<ifc2x3::IfcOrientedEdge> OrientedEdge3 = eds->createIfcOrientedEdge();
TEST_VALIDITY(OrientedEdge3);
Step::RefPtr<ifc2x3::IfcCartesianPoint> PointStart3 = eds->createIfcCartesianPoint();
PointStart3->getCoordinates().push_back(0);
PointStart3->getCoordinates().push_back(0);
PointStart3->getCoordinates().push_back(0);
Step::RefPtr<ifc2x3::IfcCartesianPoint> PointEnd3 = eds->createIfcCartesianPoint();
PointEnd3->getCoordinates().push_back(1);
PointEnd3->getCoordinates().push_back(1);
PointEnd3->getCoordinates().push_back(1);
OrientedEdge3->setEdgeStart(PointStart3);
OrientedEdge3->setEdgeEnd(PointEnd3);
EdgeLoop->getEdgeList().push_back(OrientedEdge3);
TEST_ASSERT(EdgeLoop->getNe()==3);
LOG_DEBUG("EdgeLoop->getNe() = " <<EdgeLoop->getNe()<< std::endl);
////////////////////////////////////////////////////////////////////////////////////////////////////////////
Step::RefPtr<ifc2x3::IfcOrientedEdge> OrientedEdge4 = eds->createIfcOrientedEdge();
TEST_VALIDITY(OrientedEdge4);
Step::RefPtr<ifc2x3::IfcCartesianPoint> PointStart4 = eds->createIfcCartesianPoint();
PointStart4->getCoordinates().push_back(0);
PointStart4->getCoordinates().push_back(0);
PointStart4->getCoordinates().push_back(0);
Step::RefPtr<ifc2x3::IfcCartesianPoint> PointEnd4 = eds->createIfcCartesianPoint();
PointEnd4->getCoordinates().push_back(1);
PointEnd4->getCoordinates().push_back(1);
PointEnd4->getCoordinates().push_back(1);
OrientedEdge4->setEdgeStart(PointStart4);
OrientedEdge4->setEdgeEnd(PointEnd4);
EdgeLoop->getEdgeList().push_back(OrientedEdge4);
TEST_ASSERT(EdgeLoop->getNe()==4);
LOG_DEBUG("EdgeLoop->getNe() = " <<EdgeLoop->getNe()<< std::endl);
////////////////////////////////////////////////////////////////////////////////////////////////////////////
std::cout << std::endl << "Failure : " << failure_results << " Success : " << success_results << std::endl;
return failure_results;
}