IfcRelDefinesByProperties IfcPropertySetDefinitionSelect IfcPropertySetDefinition IfcPropertySetDefinitionSet

 

private void updateObject(IfcObject ifcObject, PropertyNode root)
{
    /*
    if(ifcObject.getClassName().toString().indexOf("IfcBuildingElementProxy") ==-1 && ifcObject.getClassName().toString().indexOf("IfcWallStandardCase") ==-1 && ifcObject.getClassName().toString().indexOf("IfcSpace") ==-1 && ifcObject.getClassName().toString().indexOf("IfcAnnotation") ==-1 && ifcObject.getClassName().toString().indexOf("IfcOpeningElement") ==-1   && ifcObject.getClassName().toString().indexOf("IfcRailing") ==-1 ){
        System.out.println("com.apstex.gui.ifc.views.propertiesview  ---> PropertiesPanel.java  --->  update() "+ifcObject.getName()+"   class  "+ifcObject.getClassName()+"  id   #"+ifcObject.getStepLineNumber());                                                              
    }
    */
    if(ifcObject instanceof IfcObject.Ifc2x3)
    {
        IfcObject.Ifc2x3 ifcObject2x3 = (IfcObject.Ifc2x3) ifcObject;
        if(ifcObject2x3.getIsDefinedBy_Inverse() == null)
            return;
        PropertyNode objectNode = new PropertyNode(ifcObject);
        System.out.println("com.apstex.gui.ifc.views.propertiesview  ---> PropertiesPanel.java  195 --->  update() "+objectNode.getUserObject().toString());
        for (IfcRelDefines ifcRelDefines : ifcObject2x3.getIsDefinedBy_Inverse())
        {
            if(ifcRelDefines instanceof IfcRelDefinesByProperties)
            {
                IfcPropertySetDefinition ifcPropertySetDefinition = ((IfcRelDefinesByProperties.Ifc2x3)ifcRelDefines).getRelatingPropertyDefinition();
                //System.out.println("com.apstex.gui.ifc.views.propertiesview  ---> PropertiesPanel.java 201 --->  update() "+ifcPropertySetDefinition.getName());
                updateProperty(ifcPropertySetDefinition, objectNode);
            }
        }
        if(objectNode.getChildCount() > 0)
        {
            /*
            if(ifcObject.getClassName().toString().indexOf("IfcBuildingElementProxy") ==-1 && ifcObject.getClassName().toString().indexOf("IfcWallStandardCase") ==-1 && ifcObject.getClassName().toString().indexOf("IfcSpace") ==-1){
                System.out.println("com.apstex.gui.ifc.views.propertiesview  ---> PropertiesPanel.java  --->  update() "+ifcObject.getClassName()+"    "+ifcObject.getDescription()+"   "+ifcObject.getGlobalId()+"   "+ifcObject.getStepParameter(true));                                                                         
            }
            */
            //System.out.println("===="+ifcObject.getClassName()+" objectNode "+objectNode.toString());
            objectToNodeMap.put(ifcObject, objectNode);
            root.addChild(objectNode);
        }
    }
    else if(ifcObject instanceof IfcObject.Ifc4)
    {
        IfcObject.Ifc4 ifcObject4 = (IfcObject.Ifc4) ifcObject;
        if(ifcObject4.getIsDefinedBy_Inverse() == null)
            return;
        PropertyNode objectNode = new PropertyNode(ifcObject);
        for (IfcRelDefinesByProperties.Ifc4 ifcRelDefines : ifcObject4.getIsDefinedBy_Inverse())
        {
            IfcPropertySetDefinitionSelect IifcPropertySetDefinitionSelect1 = ifcRelDefines.getRelatingPropertyDefinition();
            if(IifcPropertySetDefinitionSelect1 instanceof IfcPropertySetDefinition)
            {
                updateProperty((IfcPropertySetDefinition) IifcPropertySetDefinitionSelect1, objectNode);
            }
            else if(IifcPropertySetDefinitionSelect1 instanceof IfcPropertySetDefinitionSet)
            {
                for (IfcPropertySetDefinition def : (IfcPropertySetDefinitionSet.Ifc4) IifcPropertySetDefinitionSelect1)
                {
                    updateProperty(def, objectNode);
                }
            }
        }
        if(objectNode.getChildCount() > 0)
        {
            objectToNodeMap.put(ifcObject, objectNode);
            root.addChild(objectNode);
        }
    }
    else
    {
        throw new IllegalArgumentException("Scheme not supported: "+ifcObject.getClass().getName());
    }
}

 

id: 6232 name: "M_矩形-结构柱:400 x 600mm结构柱:371662" class: IfcColumn global id: "2pjGIuBpj3PPch3_QVbyx_" "M_矩形-结构柱:400 x 600mm结构柱:371662"
"371662" size: 7
===== IfcPropertySet
"Pset_ColumnCommon"
: "LoadBearing"
: "Reference"
: "IsExternal"
: "Slope"
===== IfcPropertySet
"其他"
: "族"
: "族与类型"
: "类别"
: "类型"
: "类型 ID"
===== IfcPropertySet
"尺寸标注"
: "体积"
: "长度"
: "面积"
===== IfcPropertySet
"标识数据"
: "注释"
===== IfcPropertySet
"结构"
: "启用分析模型"
: "钢筋保护层 - 其他面"
: "钢筋保护层 - 底面"
: "钢筋保护层 - 顶面"
===== IfcPropertySet
"阶段化"
: "创建的阶段"
===== IfcPropertySet
"限制条件"
: "底部偏移"
: "房间边界"
: "顶部偏移"
: "柱样式"
: "随轴网移动"
: "底部标高"
: "标高"
: "顶部标高"
: "柱定位标记"

posted @ 2019-07-28 23:48  西北逍遥  阅读(480)  评论(0编辑  收藏  举报