本文整理汇总了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();
}
}
示例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;
}
示例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);
}
}
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}