關閉      標題:ifc 列出所有內容
內容:

import ifcopenshell

ifc_file = ifcopenshell.open("DJB-M-SU-監測.ifc")

# 列出所有類型
types = set(e.is_a() for e in ifc_file)
for t in sorted(types):
    print(t)

import ifcopenshell
from collections import Counter

ifc_file = ifcopenshell.open("DJB-M-SU-監測.ifc")

# 統計每個類型數量
type_counter = Counter(e.is_a() for e in ifc_file)

# 顯示
for t, count in type_counter.most_common():  # 按數量排序
    print(f"{t}: {count}")

C:\Users\johnho\Desktop\3D>python ifccheck.py
IfcActorRole
IfcApplication
IfcAxis2Placement3D
IfcBoundingBox
IfcBuilding
IfcBuildingElementProxy
IfcBuildingStorey
IfcCartesianPoint
IfcCartesianTransformationOperator3D
IfcClosedShell
IfcColourRgb
IfcConversionBasedUnit
IfcDerivedUnit
IfcDerivedUnitElement
IfcDimensionalExponents
IfcDirection
IfcFace
IfcFaceBound
IfcFaceOuterBound
IfcFacetedBrep
IfcGeometricRepresentationContext
IfcGeometricRepresentationSubContext
IfcGroup
IfcLocalPlacement
IfcMappedItem
IfcMeasureWithUnit
IfcMonetaryUnit
IfcOpenShell
IfcOrganization
IfcOwnerHistory
IfcPerson
IfcPersonAndOrganization
IfcPolyLoop
IfcPostalAddress
IfcPresentationLayerAssignment
IfcPresentationStyleAssignment
IfcProductDefinitionShape
IfcProject
IfcPropertySet
IfcPropertySingleValue
IfcRelAggregates
IfcRelAssignsToGroup
IfcRelContainedInSpatialStructure
IfcRelDefinesByProperties
IfcRepresentationMap
IfcSIUnit
IfcShapeRepresentation
IfcShellBasedSurfaceModel
IfcSite
IfcStyledItem
IfcSurfaceStyle
IfcSurfaceStyleShading
IfcTelecomAddress
IfcUnitAssignment


ifcconvert DJB-M-SU-監測.ifc DJB-M-SU-test-wall1.glb --mesher-linear-deflection 0.1 --mesher-angular-deflection 0.5 --reorient-shells --apply-default-materials --generate-uvs --surface-colour  --weld-vertices --unify-shapes --no-normals -j16