当前位置: 首页>>代码示例>>C++>>正文


C++ RefPtr::getLinearMomentZ方法代码示例

本文整理汇总了C++中step::RefPtr::getLinearMomentZ方法的典型用法代码示例。如果您正苦于以下问题:C++ RefPtr::getLinearMomentZ方法的具体用法?C++ RefPtr::getLinearMomentZ怎么用?C++ RefPtr::getLinearMomentZ使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在step::RefPtr的用法示例。


在下文中一共展示了RefPtr::getLinearMomentZ方法的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::IfcStructuralLinearActionVarying > StructuralLinearActionVarying = eds->createIfcStructuralLinearActionVarying();
	TEST_ASSERT(StructuralLinearActionVarying->getVaryingAppliedLoads().empty());

	Step::RefPtr< ifc2x3::IfcShapeAspect > ShapeAspect = eds->createIfcShapeAspect();
	TEST_VALIDITY(ShapeAspect);
	Step::RefPtr< ifc2x3::IfcShapeModel > ShapeModelRepresentation1 = eds->createIfcShapeRepresentation();
	Step::RefPtr< ifc2x3::IfcShapeModel > ShapeModelRepresentation2 = eds->createIfcShapeRepresentation();
	ShapeAspect->getShapeRepresentations().push_back(ShapeModelRepresentation1);
	ShapeAspect->getShapeRepresentations().push_back(ShapeModelRepresentation2);
	ShapeAspect->setName("ShapeAspect");
	ShapeAspect->setDescription("IfcShapeAspect");
	ShapeAspect->setProductDefinitional(Step::LTrue);
	Step::RefPtr< ifc2x3::IfcProductDefinitionShape > ProductDefinitionShape = eds->createIfcProductDefinitionShape();
	ShapeAspect->setPartOfProductDefinitionShape(ProductDefinitionShape);
	StructuralLinearActionVarying->setVaryingAppliedLoadLocation(ShapeAspect);

	Step::RefPtr< ifc2x3::IfcStructuralLoad > StructuralLoad1 = eds->createIfcStructuralLoadLinearForce();
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadLinearForce> > (StructuralLoad1)->setLinearForceX(1);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadLinearForce> > (StructuralLoad1)->setLinearForceY(1);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadLinearForce> > (StructuralLoad1)->setLinearForceZ(1);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadLinearForce> > (StructuralLoad1)->setLinearMomentX(1);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadLinearForce> > (StructuralLoad1)->setLinearMomentY(1);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadLinearForce> > (StructuralLoad1)->setLinearMomentZ(1);
	StructuralLinearActionVarying->getSubsequentAppliedLoads().push_back(StructuralLoad1);

	Step::RefPtr< ifc2x3::IfcStructuralLoad > StructuralLoad2 = eds->createIfcStructuralLoadPlanarForce();
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadPlanarForce> > (StructuralLoad2)->setPlanarForceX(2);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadPlanarForce> > (StructuralLoad2)->setPlanarForceY(2);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadPlanarForce> > (StructuralLoad2)->setPlanarForceZ(2);
	StructuralLinearActionVarying->getSubsequentAppliedLoads().push_back(StructuralLoad2);
	Step::RefPtr< ifc2x3::IfcStructuralLoad > StructuralLoad3 = eds->createIfcStructuralLoadSingleDisplacement();
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadSingleDisplacement> > (StructuralLoad3)->setDisplacementX(3);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadSingleDisplacement> > (StructuralLoad3)->setDisplacementY(3);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadSingleDisplacement> > (StructuralLoad3)->setDisplacementZ(3);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadSingleDisplacement> > (StructuralLoad3)->setRotationalDisplacementRX(3);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadSingleDisplacement> > (StructuralLoad3)->setRotationalDisplacementRY(3);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadSingleDisplacement> > (StructuralLoad3)->setRotationalDisplacementRZ(3);
	StructuralLinearActionVarying->getSubsequentAppliedLoads().push_back(StructuralLoad3);
	Step::RefPtr< ifc2x3::IfcStructuralLoad > StructuralLoad4 = eds->createIfcStructuralLoadSingleForce();
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadSingleForce> > (StructuralLoad4)->setForceX(4);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadSingleForce> > (StructuralLoad4)->setForceY(4);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadSingleForce> > (StructuralLoad4)->setForceZ(4);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadSingleForce> > (StructuralLoad4)->setMomentX(4);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadSingleForce> > (StructuralLoad4)->setMomentY(4);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadSingleForce> > (StructuralLoad4)->setMomentZ(4);
	StructuralLinearActionVarying->getSubsequentAppliedLoads().push_back(StructuralLoad4);
	Step::RefPtr< ifc2x3::IfcStructuralLoad > StructuralLoad5 = eds->createIfcStructuralLoadTemperature();
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadTemperature> > (StructuralLoad5)->setDeltaT_Constant(5);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadTemperature> > (StructuralLoad5)->setDeltaT_Y(5);
	static_cast<Step::RefPtr<ifc2x3::IfcStructuralLoadTemperature> > (StructuralLoad5)->setDeltaT_Z(5);
	StructuralLinearActionVarying->getSubsequentAppliedLoads().push_back(StructuralLoad5);

	ifc2x3::List_IfcStructuralLoad_2_n ListIfcStructuralLoad = StructuralLinearActionVarying->getVaryingAppliedLoads();
	if(dynamic_cast<ifc2x3::IfcStructuralLoadLinearForce* > (ListIfcStructuralLoad[0].get()))
	{	
		Step::RefPtr<ifc2x3::IfcStructuralLoadLinearForce> StructuralLoadLinearForce = static_cast<ifc2x3::IfcStructuralLoadLinearForce* > (ListIfcStructuralLoad[0].get());
		TEST_ASSERT(StructuralLoadLinearForce->getLinearForceX()==1);
		TEST_ASSERT(StructuralLoadLinearForce->getLinearForceY()==1);
		TEST_ASSERT(StructuralLoadLinearForce->getLinearForceZ()==1);
		TEST_ASSERT(StructuralLoadLinearForce->getLinearMomentX()==1);
		TEST_ASSERT(StructuralLoadLinearForce->getLinearMomentY()==1);
		TEST_ASSERT(StructuralLoadLinearForce->getLinearMomentZ()==1);
	}
	if(dynamic_cast<ifc2x3::IfcStructuralLoadPlanarForce* > (ListIfcStructuralLoad[1].get()))
	{	
		Step::RefPtr<ifc2x3::IfcStructuralLoadPlanarForce> StructuralLoadPlanarForce = static_cast<ifc2x3::IfcStructuralLoadPlanarForce* > (ListIfcStructuralLoad[1].get());
		TEST_ASSERT(StructuralLoadPlanarForce->getPlanarForceX()==2);
		TEST_ASSERT(StructuralLoadPlanarForce->getPlanarForceY()==2);
		TEST_ASSERT(StructuralLoadPlanarForce->getPlanarForceZ()==2);

	}
	if(dynamic_cast<ifc2x3::IfcStructuralLoadSingleDisplacement* > (ListIfcStructuralLoad[2].get()))
	{	
		Step::RefPtr<ifc2x3::IfcStructuralLoadSingleDisplacement> StructuralLoadSingleDisplacement = static_cast<ifc2x3::IfcStructuralLoadSingleDisplacement* > (ListIfcStructuralLoad[2].get());
		TEST_ASSERT(StructuralLoadSingleDisplacement->getDisplacementX()==3);
		TEST_ASSERT(StructuralLoadSingleDisplacement->getDisplacementY()==3);
		TEST_ASSERT(StructuralLoadSingleDisplacement->getDisplacementZ()==3);
		TEST_ASSERT(StructuralLoadSingleDisplacement->getRotationalDisplacementRX()==3);
		TEST_ASSERT(StructuralLoadSingleDisplacement->getRotationalDisplacementRY()==3);
		TEST_ASSERT(StructuralLoadSingleDisplacement->getRotationalDisplacementRZ()==3);
	}
	if(dynamic_cast<ifc2x3::IfcStructuralLoadSingleForce* > (ListIfcStructuralLoad[3].get()))
	{	
		Step::RefPtr<ifc2x3::IfcStructuralLoadSingleForce> StructuralLoadSingleForce = static_cast<ifc2x3::IfcStructuralLoadSingleForce* > (ListIfcStructuralLoad[3].get());
		TEST_ASSERT(StructuralLoadSingleForce->getForceX()==4);
//.........这里部分代码省略.........
开发者ID:gitter-badger,项目名称:ifc2x3-SDK,代码行数:101,代码来源:main.cpp


注:本文中的step::RefPtr::getLinearMomentZ方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。