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


Java IfcRelDecomposes类代码示例

本文整理汇总了Java中org.bimserver.models.ifc2x3tc1.IfcRelDecomposes的典型用法代码示例。如果您正苦于以下问题:Java IfcRelDecomposes类的具体用法?Java IfcRelDecomposes怎么用?Java IfcRelDecomposes使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IfcRelDecomposes类属于org.bimserver.models.ifc2x3tc1包,在下文中一共展示了IfcRelDecomposes类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeIfcTreeDecomposedBy

import org.bimserver.models.ifc2x3tc1.IfcRelDecomposes; //导入依赖的package包/类
/**
 * Writes the list of {@Link IfcObject}s that decomposes another parent {@Link IfcObject}.
 *
 * @param jsonWriter
 * @param objectDefinition The parent {@Link IfcObject}.
 * @throws IOException
 */
private void writeIfcTreeDecomposedBy(JsonWriter jsonWriter, IfcObjectDefinition objectDefinition)
    throws IOException {
  EList<IfcRelDecomposes> relList = objectDefinition.getIsDecomposedBy();
  if (relList != null && !relList.isEmpty()) {
    jsonWriter.name("decomposedBy").beginArray();
    for (IfcRelDecomposes rel : relList) {
      EList<IfcObjectDefinition> relatedObjects = rel.getRelatedObjects();
      for (IfcObjectDefinition relatedObject : relatedObjects) {
        if (relatedObject instanceof IfcObject) {
          writeIfcTreeObject(jsonWriter, (IfcObject) relatedObject);
        }
      }
    }
    jsonWriter.endArray();
  }
}
 
开发者ID:urbanetic,项目名称:geotree-bimserver-plugin,代码行数:24,代码来源:JsonIfcGeometryTreeSerializer.java

示例2: getIfcBuildingStorey

import org.bimserver.models.ifc2x3tc1.IfcRelDecomposes; //导入依赖的package包/类
public static IfcBuildingStorey getIfcBuildingStorey(IfcProduct ifcProduct) {
	if (ifcProduct instanceof IfcBuildingStorey) {
		return (IfcBuildingStorey) ifcProduct;
	}
	for (IfcRelDecomposes ifcRelDecomposes : ifcProduct.getDecomposes()) {
		IfcObjectDefinition relatingObject = ifcRelDecomposes.getRelatingObject();
		if (relatingObject instanceof IfcBuildingStorey) {
			return (IfcBuildingStorey)relatingObject;
		}
	}
	if (ifcProduct instanceof IfcElement) {
		IfcElement ifcElement = (IfcElement)ifcProduct;
		for (IfcRelContainedInSpatialStructure ifcRelContainedInSpatialStructure : ifcElement.getContainedInStructure()) {
			IfcSpatialStructureElement relatingStructure = ifcRelContainedInSpatialStructure.getRelatingStructure();
			if (relatingStructure instanceof IfcBuildingStorey) {
				return (IfcBuildingStorey) relatingStructure;
			} else {
				if (relatingStructure instanceof IfcSpace) {
					return getIfcBuildingStorey(relatingStructure);
				}
			}
		}
	}
	return null;
}
 
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:26,代码来源:IfcUtils.java

示例3: buildSceneGraphFor

import org.bimserver.models.ifc2x3tc1.IfcRelDecomposes; //导入依赖的package包/类
private void buildSceneGraphFor(IfcObjectDefinition spatialParent, BranchGroup sceneParent) {
    for (IfcRelDecomposes relation : spatialParent.getIsDecomposedBy()) {
        for (IfcObjectDefinition spatialChild : relation.getRelatedObjects()) {
            BranchGroup sceneChild = createdBranchGroupFor(spatialChild);
            sceneParent.addChild(sceneChild);
            buildSceneGraphFor(spatialChild, sceneChild);
        }
    }
}
 
开发者ID:hlg,项目名称:billie,代码行数:10,代码来源:BimserverSpatialHierarchyLoader.java

示例4: getDecomposition

import org.bimserver.models.ifc2x3tc1.IfcRelDecomposes; //导入依赖的package包/类
public static List<IfcProduct> getDecomposition(IfcBuildingStorey ifcBuildingStorey) {
	List<IfcProduct> list = new ArrayList<>();
	for (IfcRelDecomposes ifcRelDecomposes : ifcBuildingStorey.getIsDecomposedBy()) {
		for (IfcObjectDefinition ifcObjectDefinition : ifcRelDecomposes.getRelatedObjects()) {
			if (ifcObjectDefinition instanceof IfcProduct) {
				list.add((IfcProduct) ifcObjectDefinition);
			}
		}
	}
	return list;
}
 
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:12,代码来源:IfcUtils.java

示例5: getIfcProject

import org.bimserver.models.ifc2x3tc1.IfcRelDecomposes; //导入依赖的package包/类
public static IfcProject getIfcProject(IfcProduct ifcProduct) {
	if (ifcProduct instanceof IfcProject) {
		return (IfcProject) ifcProduct;
	}
	for (IfcRelDecomposes ifcRelDecomposes : ifcProduct.getDecomposes()) {
		IfcObjectDefinition relatingObject = ifcRelDecomposes.getRelatingObject();
		if (relatingObject instanceof IfcProject) {
			return (IfcProject)relatingObject;
		} else if (relatingObject instanceof IfcProduct){
			return getIfcProject((IfcProduct) relatingObject);
		}
	}
	if (ifcProduct instanceof IfcElement) {
		IfcElement ifcElement = (IfcElement)ifcProduct;
		for (IfcRelContainedInSpatialStructure ifcRelContainedInSpatialStructure : ifcElement.getContainedInStructure()) {
			IfcSpatialStructureElement relatingStructure = ifcRelContainedInSpatialStructure.getRelatingStructure();
			if (relatingStructure instanceof IfcProject) {
				return (IfcProject) relatingStructure;
			} else if (relatingStructure instanceof IfcBuildingStorey) {
				return getIfcProject(relatingStructure);
			} else {
				if (relatingStructure instanceof IfcSpace) {
					return getIfcProject(relatingStructure);
				}
			}
		}
	}
	return null;
}
 
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:30,代码来源:IfcUtils.java

示例6: getIsDecomposedBy

import org.bimserver.models.ifc2x3tc1.IfcRelDecomposes; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings("unchecked")
public EList<IfcRelDecomposes> getIsDecomposedBy() {
	return (EList<IfcRelDecomposes>) eGet(Ifc2x3tc1Package.Literals.IFC_OBJECT_DEFINITION__IS_DECOMPOSED_BY, true);
}
 
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:10,代码来源:IfcObjectDefinitionImpl.java

示例7: getDecomposes

import org.bimserver.models.ifc2x3tc1.IfcRelDecomposes; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings("unchecked")
public EList<IfcRelDecomposes> getDecomposes() {
	return (EList<IfcRelDecomposes>) eGet(Ifc2x3tc1Package.Literals.IFC_OBJECT_DEFINITION__DECOMPOSES, true);
}
 
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:10,代码来源:IfcObjectDefinitionImpl.java


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