本文整理汇总了C++中step::RefPtr::setForLayerSet方法的典型用法代码示例。如果您正苦于以下问题:C++ RefPtr::setForLayerSet方法的具体用法?C++ RefPtr::setForLayerSet怎么用?C++ RefPtr::setForLayerSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类step::RefPtr
的用法示例。
在下文中一共展示了RefPtr::setForLayerSet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
Coordinates4.push_back(0);
Step::RefPtr< ifc2x3::IfcCartesianPoint > Point4 = eds->createIfcCartesianPoint();
Point1->setCoordinates(Coordinates4);
ifc2x3::List_IfcCartesianPoint_2_n ListOfIfcCartesianPoint;
ListOfIfcCartesianPoint.push_back(Point1);
ListOfIfcCartesianPoint.push_back(Point2);
ListOfIfcCartesianPoint.push_back(Point3);
ListOfIfcCartesianPoint.push_back(Point4);
BSpline1->setControlPointsList(ListOfIfcCartesianPoint);
//////////////////////
Step::RefPtr<ifc2x3::IfcBSplineCurve> BSpline2 = eds->createIfcBezierCurve();
// TEST_VALIDITY(BSpline2);
// TEST_ASSERT(BSpline2->getDim()==0);
ifc2x3::Array_IfcCartesianPoint_0_255 ControlPoint2 = BSpline2->getControlPoints();
Step::Integer IndexOnControlPoints2 = BSpline2->getUpperIndexOnControlPoints();
// TEST_ASSERT(ControlPoint2.size()==256);
// TEST_ASSERT(IndexOnControlPoints2==0);
ifc2x3::List_IfcLengthMeasure_1_3 Coordinates12;
Coordinates12.push_back(1);
Coordinates12.push_back(1);
Coordinates12.push_back(0);
Step::RefPtr< ifc2x3::IfcCartesianPoint > Point12 = eds->createIfcCartesianPoint();
Point12->setCoordinates(Coordinates12);
ifc2x3::List_IfcLengthMeasure_1_3 Coordinates22;
Coordinates22.push_back(2);
Coordinates22.push_back(1);
Coordinates22.push_back(0);
Step::RefPtr< ifc2x3::IfcCartesianPoint > Point22 = eds->createIfcCartesianPoint();
Point22->setCoordinates(Coordinates22);
ifc2x3::List_IfcCartesianPoint_2_n ListOfIfcCartesianPoint2;
ListOfIfcCartesianPoint2.push_back(Point12);
ListOfIfcCartesianPoint2.push_back(Point22);
BSpline2->setControlPointsList(ListOfIfcCartesianPoint2);
Step::RefPtr< ifc2x3::IfcConnectionCurveGeometry > ConnectionGeometry = eds->createIfcConnectionCurveGeometry();
ConnectionGeometry->setCurveOnRelatingElement(BSpline1);
ConnectionGeometry->setCurveOnRelatedElement(BSpline2);
RelConnectsPathElements->setConnectionGeometry(ConnectionGeometry);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Step::RefPtr< ifc2x3::IfcRelAssociates > RelAssociates = eds->createIfcRelAssociatesMaterial();
dynamic_cast< ifc2x3::IfcRelAssociatesMaterial* >(RelAssociates.get())->getRelatedObjects().insert(Root1);
dynamic_cast< ifc2x3::IfcRelAssociatesMaterial* >(RelAssociates.get())->getRelatedObjects().insert(Root2);
dynamic_cast< ifc2x3::IfcRelAssociatesMaterial* >(RelAssociates.get())->getRelatedObjects().insert(Root3);
dynamic_cast< ifc2x3::IfcRelAssociatesMaterial* >(RelAssociates.get())->getRelatedObjects().insert(Element1);
dynamic_cast< ifc2x3::IfcRelAssociatesMaterial* >(RelAssociates.get())->getRelatedObjects().insert(Element2);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Step::RefPtr<ifc2x3::IfcMaterialSelect> MaterialSelectIfcMaterial = new ifc2x3::IfcMaterialSelect();
Step::RefPtr<ifc2x3::IfcMaterial> Material = eds->createIfcMaterial();
MaterialSelectIfcMaterial->setIfcMaterial(Material.get());
dynamic_cast< ifc2x3::IfcRelAssociatesMaterial* >(RelAssociates.get())->setRelatingMaterial(MaterialSelectIfcMaterial);
LOG_DEBUG("RelConnectsPathElements->getRelatedLayerCount() = "<<RelConnectsPathElements->getRelatedLayerCount()<<std::endl);
TEST_ASSERT(RelConnectsPathElements->getRelatedLayerCount()==1);
LOG_DEBUG("RelConnectsPathElements->getRelatingLayerCount() = "<<RelConnectsPathElements->getRelatingLayerCount()<<std::endl);
TEST_ASSERT(RelConnectsPathElements->getRelatingLayerCount()==1);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Step::RefPtr<ifc2x3::IfcMaterialList> MaterialList = eds->createIfcMaterialList();
Step::RefPtr<ifc2x3::IfcMaterialSelect> MaterialSelectIfcMaterialList = new ifc2x3::IfcMaterialSelect();
MaterialSelectIfcMaterialList->setIfcMaterialList(MaterialList.get());
dynamic_cast< ifc2x3::IfcRelAssociatesMaterial* >(RelAssociates.get())->setRelatingMaterial(MaterialSelectIfcMaterialList);
LOG_DEBUG("RelConnectsPathElements->getRelatedLayerCount() = "<<RelConnectsPathElements->getRelatedLayerCount()<<std::endl);
TEST_ASSERT(RelConnectsPathElements->getRelatedLayerCount()==0);
LOG_DEBUG("RelConnectsPathElements->getRelatingLayerCount() = "<<RelConnectsPathElements->getRelatingLayerCount()<<std::endl);
TEST_ASSERT(RelConnectsPathElements->getRelatingLayerCount()==0);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Step::RefPtr< ifc2x3::IfcMaterialSelect > MaterialSelectIfcMaterialLayerSetUsage = new ifc2x3::IfcMaterialSelect();
Step::RefPtr< ifc2x3::IfcMaterialLayerSetUsage > MaterialLayerSetUsage = eds->createIfcMaterialLayerSetUsage();
Step::RefPtr< ifc2x3::IfcMaterialLayerSet > MaterialLayerSet = eds->createIfcMaterialLayerSet();
MaterialLayerSet->setLayerSetName("LayerSet");
Step::RefPtr< ifc2x3::IfcMaterialLayer > MaterialLayer1 = eds->createIfcMaterialLayer();
MaterialLayerSet->getMaterialLayers().push_back(MaterialLayer1);
MaterialLayerSetUsage->setForLayerSet(MaterialLayerSet);
MaterialSelectIfcMaterialLayerSetUsage->setIfcMaterialLayerSetUsage(MaterialLayerSetUsage.get());
dynamic_cast< ifc2x3::IfcRelAssociatesMaterial* >(RelAssociates.get())->setRelatingMaterial(MaterialSelectIfcMaterialLayerSetUsage);
LOG_DEBUG("RelConnectsPathElements->getRelatedLayerCount() = "<<RelConnectsPathElements->getRelatedLayerCount()<<std::endl);
TEST_ASSERT(RelConnectsPathElements->getRelatedLayerCount()==1);
LOG_DEBUG("RelConnectsPathElements->getRelatingLayerCount() = "<<RelConnectsPathElements->getRelatingLayerCount()<<std::endl);
TEST_ASSERT(RelConnectsPathElements->getRelatingLayerCount()==1);
Step::RefPtr< ifc2x3::IfcMaterialLayer > MaterialLayer2 = eds->createIfcMaterialLayer();
MaterialLayerSet->getMaterialLayers().push_back(MaterialLayer2);
MaterialLayerSetUsage->setForLayerSet(MaterialLayerSet);
MaterialSelectIfcMaterialLayerSetUsage->setIfcMaterialLayerSetUsage(MaterialLayerSetUsage.get());
dynamic_cast< ifc2x3::IfcRelAssociatesMaterial* >(RelAssociates.get())->setRelatingMaterial(MaterialSelectIfcMaterialLayerSetUsage);
LOG_DEBUG("RelConnectsPathElements->getRelatedLayerCount() = "<<RelConnectsPathElements->getRelatedLayerCount()<<std::endl);
TEST_ASSERT(RelConnectsPathElements->getRelatedLayerCount()==2);
LOG_DEBUG("RelConnectsPathElements->getRelatingLayerCount() = "<<RelConnectsPathElements->getRelatingLayerCount()<<std::endl);
TEST_ASSERT(RelConnectsPathElements->getRelatingLayerCount()==2);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
std::cout << std::endl << "Failure : " << failure_results << " Success : " << success_results << std::endl;
return failure_results;
}