mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-19 03:33:48 +00:00
Recompile rules
This commit is contained in:
@@ -44,7 +44,9 @@ class express_set(set):
|
||||
__radd__ = __add__
|
||||
def __repr__(self):
|
||||
return repr(set(self))
|
||||
|
||||
def __getitem__(self, k):
|
||||
# @todo this is obviously not stable, but should be good enough?
|
||||
return list(self)[k]
|
||||
|
||||
def typeof(inst):
|
||||
if not inst:
|
||||
@@ -11413,7 +11415,7 @@ class IfcAdvancedBrep_HasAdvancedFaces:
|
||||
def __call__(self):
|
||||
|
||||
|
||||
assert ((sizeof([afs for afs in self.Outer.CfsFaces if not 'ifc4x3_rc1.ifcadvancedface' in typeof(afs)])) == 0) is not False
|
||||
assert ((sizeof([afs for afs in self.Outer.CfsFaces if not ('ifc4x3_rc1.ifcadvancedface' in typeof(afs))])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -11428,7 +11430,7 @@ class IfcAdvancedBrepWithVoids_VoidsHaveAdvancedFaces:
|
||||
def __call__(self):
|
||||
voids = self.Voids
|
||||
|
||||
assert ((sizeof([vsh for vsh in voids if (sizeof([afs for afs in vsh.CfsFaces if not 'ifc4x3_rc1.ifcadvancedface' in typeof(afs)])) == 0])) == 0) is not False
|
||||
assert ((sizeof([vsh for vsh in voids if (sizeof([afs for afs in vsh.CfsFaces if not ('ifc4x3_rc1.ifcadvancedface' in typeof(afs))])) == 0])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -11457,7 +11459,7 @@ class IfcAdvancedFace_RequiresEdgeCurve:
|
||||
def __call__(self):
|
||||
|
||||
|
||||
assert ((sizeof([elpfbnds for elpfbnds in [bnds for bnds in self.Bounds if 'ifc4x3_rc1.ifcedgeloop' in typeof(bnds.Bound)] if not (sizeof([oe for oe in elpfbnds.Bound.EdgeList if not 'ifc4x3_rc1.ifcedgecurve' in typeof(oe.EdgeElement)])) == 0])) == 0) is not False
|
||||
assert ((sizeof([elpfbnds for elpfbnds in [bnds for bnds in self.Bounds if 'ifc4x3_rc1.ifcedgeloop' in typeof(bnds.Bound)] if not ((sizeof([oe for oe in elpfbnds.Bound.EdgeList if not ('ifc4x3_rc1.ifcedgecurve' in typeof(oe.EdgeElement))])) == 0)])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -11471,7 +11473,7 @@ class IfcAdvancedFace_ApplicableEdgeCurves:
|
||||
def __call__(self):
|
||||
|
||||
|
||||
assert ((sizeof([elpfbnds for elpfbnds in [bnds for bnds in self.Bounds if 'ifc4x3_rc1.ifcedgeloop' in typeof(bnds.Bound)] if not (sizeof([oe for oe in elpfbnds.Bound.EdgeList if not (sizeof(['ifc4x3_rc1.ifcline','ifc4x3_rc1.ifcconic','ifc4x3_rc1.ifcpolyline','ifc4x3_rc1.ifcbsplinecurve'] * typeof(oe.EdgeElement.EdgeGeometry))) == 1])) == 0])) == 0) is not False
|
||||
assert ((sizeof([elpfbnds for elpfbnds in [bnds for bnds in self.Bounds if 'ifc4x3_rc1.ifcedgeloop' in typeof(bnds.Bound)] if not ((sizeof([oe for oe in elpfbnds.Bound.EdgeList if not ((sizeof(['ifc4x3_rc1.ifcline','ifc4x3_rc1.ifcconic','ifc4x3_rc1.ifcpolyline','ifc4x3_rc1.ifcbsplinecurve'] * typeof(oe.EdgeElement.EdgeGeometry))) == 1)])) == 0)])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -11752,7 +11754,7 @@ class IfcArbitraryClosedProfileDef_WR2:
|
||||
def __call__(self):
|
||||
outercurve = self.OuterCurve
|
||||
|
||||
assert (not 'ifc4x3_rc1.ifcline' in typeof(outercurve)) is not False
|
||||
assert (not ('ifc4x3_rc1.ifcline' in typeof(outercurve))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -11766,7 +11768,7 @@ class IfcArbitraryClosedProfileDef_WR3:
|
||||
def __call__(self):
|
||||
outercurve = self.OuterCurve
|
||||
|
||||
assert (not 'ifc4x3_rc1.ifcoffsetcurve2d' in typeof(outercurve)) is not False
|
||||
assert (not ('ifc4x3_rc1.ifcoffsetcurve2d' in typeof(outercurve))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -12095,7 +12097,7 @@ class IfcAxis2Placement3D_AxisAndRefDirProvision:
|
||||
axis = self.Axis
|
||||
refdirection = self.RefDirection
|
||||
|
||||
assert (not exists(axis) ^ exists(refdirection)) is not False
|
||||
assert (not (exists(axis) ^ exists(refdirection))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -12530,7 +12532,7 @@ class IfcBooleanResult_FirstOperandClosed:
|
||||
def __call__(self):
|
||||
firstoperand = self.FirstOperand
|
||||
|
||||
assert ((not 'ifc4x3_rc1.ifctessellatedfaceset' in typeof(firstoperand)) or (exists(firstoperand.Closed) and firstoperand.Closed)) is not False
|
||||
assert ((not ('ifc4x3_rc1.ifctessellatedfaceset' in typeof(firstoperand))) or (exists(firstoperand.Closed) and firstoperand.Closed)) is not False
|
||||
|
||||
|
||||
|
||||
@@ -12544,7 +12546,7 @@ class IfcBooleanResult_SecondOperandClosed:
|
||||
def __call__(self):
|
||||
secondoperand = self.SecondOperand
|
||||
|
||||
assert ((not 'ifc4x3_rc1.ifctessellatedfaceset' in typeof(secondoperand)) or (exists(secondoperand.Closed) and secondoperand.Closed)) is not False
|
||||
assert ((not ('ifc4x3_rc1.ifctessellatedfaceset' in typeof(secondoperand))) or (exists(secondoperand.Closed) and secondoperand.Closed)) is not False
|
||||
|
||||
|
||||
|
||||
@@ -12613,7 +12615,7 @@ class IfcBoxedHalfSpace_UnboundedSurface:
|
||||
def __call__(self):
|
||||
|
||||
|
||||
assert (not 'ifc4x3_rc1.ifccurveboundedplane' in typeof(self.BaseSurface)) is not False
|
||||
assert (not ('ifc4x3_rc1.ifccurveboundedplane' in typeof(self.BaseSurface))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -14835,7 +14837,7 @@ class IfcDoorLiningProperties_WR31:
|
||||
liningdepth = self.LiningDepth
|
||||
liningthickness = self.LiningThickness
|
||||
|
||||
assert (not exists(liningdepth) and (not exists(liningthickness))) is not False
|
||||
assert (not (exists(liningdepth) and (not exists(liningthickness)))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -14850,7 +14852,7 @@ class IfcDoorLiningProperties_WR32:
|
||||
thresholddepth = self.ThresholdDepth
|
||||
thresholdthickness = self.ThresholdThickness
|
||||
|
||||
assert (not exists(thresholddepth) and (not exists(thresholdthickness))) is not False
|
||||
assert (not (exists(thresholddepth) and (not exists(thresholdthickness)))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -16480,7 +16482,7 @@ class IfcGeometricRepresentationSubContext_ParentNoSub:
|
||||
def __call__(self):
|
||||
parentcontext = self.ParentContext
|
||||
|
||||
assert (not 'ifc4x3_rc1.ifcgeometricrepresentationsubcontext' in typeof(parentcontext)) is not False
|
||||
assert (not ('ifc4x3_rc1.ifcgeometricrepresentationsubcontext' in typeof(parentcontext))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -17290,7 +17292,7 @@ class IfcMaterialDefinitionRepresentation_OnlyStyledRepresentations:
|
||||
def __call__(self):
|
||||
representations = self.Representations
|
||||
|
||||
assert ((sizeof([temp for temp in representations if not 'ifc4x3_rc1.ifcstyledrepresentation' in typeof(temp)])) == 0) is not False
|
||||
assert ((sizeof([temp for temp in representations if not ('ifc4x3_rc1.ifcstyledrepresentation' in typeof(temp))])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -17764,7 +17766,7 @@ class IfcOccupant_WR31:
|
||||
def __call__(self):
|
||||
predefinedtype = self.PredefinedType
|
||||
|
||||
assert ((not predefinedtype == IfcOccupantTypeEnum.USERDEFINED) or exists(self.ObjectType)) is not False
|
||||
assert ((not (predefinedtype == IfcOccupantTypeEnum.USERDEFINED)) or exists(self.ObjectType)) is not False
|
||||
|
||||
|
||||
|
||||
@@ -17878,7 +17880,7 @@ class IfcOrientedEdge_EdgeElementNotOriented:
|
||||
def __call__(self):
|
||||
edgeelement = self.EdgeElement
|
||||
|
||||
assert (not 'ifc4x3_rc1.ifcorientededge' in typeof(edgeelement)) is not False
|
||||
assert (not ('ifc4x3_rc1.ifcorientededge' in typeof(edgeelement))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -18615,7 +18617,7 @@ class IfcProductDefinitionShape_OnlyShapeModel:
|
||||
def __call__(self):
|
||||
representations = self.Representations
|
||||
|
||||
assert ((sizeof([temp for temp in representations if not 'ifc4x3_rc1.ifcshapemodel' in typeof(temp)])) == 0) is not False
|
||||
assert ((sizeof([temp for temp in representations if not ('ifc4x3_rc1.ifcshapemodel' in typeof(temp))])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -18793,7 +18795,7 @@ class IfcPropertyEnumeration_WR01:
|
||||
def __call__(self):
|
||||
|
||||
|
||||
assert ((sizeof([temp for temp in self.EnumerationValues if not (typeof(self.EnumerationValues[1 - 1])) == typeof(temp)])) == 0) is not False
|
||||
assert ((sizeof([temp for temp in self.EnumerationValues if not ((typeof(self.EnumerationValues[1 - 1])) == typeof(temp))])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -18808,7 +18810,7 @@ class IfcPropertyListValue_WR31:
|
||||
def __call__(self):
|
||||
|
||||
|
||||
assert ((sizeof([temp for temp in self.ListValues if not (typeof(self.ListValues[1 - 1])) == typeof(temp)])) == 0) is not False
|
||||
assert ((sizeof([temp for temp in self.ListValues if not ((typeof(self.ListValues[1 - 1])) == typeof(temp))])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -19586,7 +19588,7 @@ class IfcRectangularTrimmedSurface_UsenseCompatible:
|
||||
u2 = self.U2
|
||||
usense = self.Usense
|
||||
|
||||
assert ((('ifc4x3_rc1.ifcelementarysurface' in typeof(basissurface)) and (not 'ifc4x3_rc1.ifcplane' in typeof(basissurface))) or ('ifc4x3_rc1.ifcsurfaceofrevolution' in typeof(basissurface)) or (usense == (u2 > u1))) is not False
|
||||
assert ((('ifc4x3_rc1.ifcelementarysurface' in typeof(basissurface)) and (not ('ifc4x3_rc1.ifcplane' in typeof(basissurface)))) or ('ifc4x3_rc1.ifcsurfaceofrevolution' in typeof(basissurface)) or (usense == (u2 > u1))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -20152,7 +20154,7 @@ class IfcRelReferencedInSpatialStructure_AllowedRelatedElements:
|
||||
def __call__(self):
|
||||
relatedelements = self.RelatedElements
|
||||
|
||||
assert ((sizeof([temp for temp in relatedelements if ('ifc4x3_rc1.ifcspatialstructureelement' in typeof(temp)) and (not 'ifc4x3_rc1.ifcspace' in typeof(temp))])) == 0) is not False
|
||||
assert ((sizeof([temp for temp in relatedelements if ('ifc4x3_rc1.ifcspatialstructureelement' in typeof(temp)) and (not ('ifc4x3_rc1.ifcspace' in typeof(temp)))])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -20202,7 +20204,7 @@ class IfcRelSpaceBoundary_CorrectPhysOrVirt:
|
||||
relatedbuildingelement = self.RelatedBuildingElement
|
||||
physicalorvirtualboundary = self.PhysicalOrVirtualBoundary
|
||||
|
||||
assert (((physicalorvirtualboundary == IfcPhysicalOrVirtualEnum.Physical) and (not 'ifc4x3_rc1.ifcvirtualelement' in typeof(relatedbuildingelement))) or ((physicalorvirtualboundary == IfcPhysicalOrVirtualEnum.Virtual) and (('ifc4x3_rc1.ifcvirtualelement' in typeof(relatedbuildingelement)) or ('ifc4x3_rc1.ifcopeningelement' in typeof(relatedbuildingelement)))) or (physicalorvirtualboundary == IfcPhysicalOrVirtualEnum.NotDefined)) is not False
|
||||
assert (((physicalorvirtualboundary == IfcPhysicalOrVirtualEnum.Physical) and (not ('ifc4x3_rc1.ifcvirtualelement' in typeof(relatedbuildingelement)))) or ((physicalorvirtualboundary == IfcPhysicalOrVirtualEnum.Virtual) and (('ifc4x3_rc1.ifcvirtualelement' in typeof(relatedbuildingelement)) or ('ifc4x3_rc1.ifcopeningelement' in typeof(relatedbuildingelement)))) or (physicalorvirtualboundary == IfcPhysicalOrVirtualEnum.NotDefined)) is not False
|
||||
|
||||
|
||||
|
||||
@@ -20742,7 +20744,7 @@ class IfcShapeRepresentation_NoTopologicalItem:
|
||||
def __call__(self):
|
||||
items = self.Items
|
||||
|
||||
assert ((sizeof([temp for temp in items if ('ifc4x3_rc1.ifctopologicalrepresentationitem' in typeof(temp)) and (not (sizeof(['ifc4x3_rc1.ifcvertexpoint','ifc4x3_rc1.ifcedgecurve','ifc4x3_rc1.ifcfacesurface'] * typeof(temp))) == 1)])) == 0) is not False
|
||||
assert ((sizeof([temp for temp in items if ('ifc4x3_rc1.ifctopologicalrepresentationitem' in typeof(temp)) and (not ((sizeof(['ifc4x3_rc1.ifcvertexpoint','ifc4x3_rc1.ifcedgecurve','ifc4x3_rc1.ifcfacesurface'] * typeof(temp))) == 1))])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -21711,7 +21713,7 @@ class IfcStyledItem_ApplicableItem:
|
||||
def __call__(self):
|
||||
item = self.Item
|
||||
|
||||
assert (not 'ifc4x3_rc1.ifcstyleditem' in typeof(item)) is not False
|
||||
assert (not ('ifc4x3_rc1.ifcstyleditem' in typeof(item))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -21726,7 +21728,7 @@ class IfcStyledRepresentation_OnlyStyledItems:
|
||||
def __call__(self):
|
||||
|
||||
|
||||
assert ((sizeof([temp for temp in self.Items if not 'ifc4x3_rc1.ifcstyleditem' in typeof(temp)])) == 0) is not False
|
||||
assert ((sizeof([temp for temp in self.Items if not ('ifc4x3_rc1.ifcstyleditem' in typeof(temp))])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -21796,7 +21798,7 @@ class IfcSurfaceCurve_CurveIsNotPcurve:
|
||||
def __call__(self):
|
||||
curve3d = self.Curve3D
|
||||
|
||||
assert (not 'ifc4x3_rc1.ifcpcurve' in typeof(curve3d)) is not False
|
||||
assert (not ('ifc4x3_rc1.ifcpcurve' in typeof(curve3d))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -22558,7 +22560,7 @@ class IfcTextLiteralWithExtent_WR31:
|
||||
def __call__(self):
|
||||
extent = self.Extent
|
||||
|
||||
assert (not 'ifc4x3_rc1.ifcplanarbox' in typeof(extent)) is not False
|
||||
assert (not ('ifc4x3_rc1.ifcplanarbox' in typeof(extent))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -22624,7 +22626,7 @@ class IfcTopologyRepresentation_WR21:
|
||||
def __call__(self):
|
||||
|
||||
|
||||
assert ((sizeof([temp for temp in self.Items if not 'ifc4x3_rc1.ifctopologicalrepresentationitem' in typeof(temp)])) == 0) is not False
|
||||
assert ((sizeof([temp for temp in self.Items if not ('ifc4x3_rc1.ifctopologicalrepresentationitem' in typeof(temp))])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -22872,7 +22874,7 @@ class IfcTrimmedCurve_NoTrimOfBoundedCurves:
|
||||
def __call__(self):
|
||||
basiscurve = self.BasisCurve
|
||||
|
||||
assert (not 'ifc4x3_rc1.ifcboundedcurve' in typeof(basiscurve)) is not False
|
||||
assert (not ('ifc4x3_rc1.ifcboundedcurve' in typeof(basiscurve))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -22963,7 +22965,7 @@ class IfcTypeProduct_ApplicableOccurrence:
|
||||
def __call__(self):
|
||||
|
||||
|
||||
assert ((not exists(lambda: self.Types[1 - 1])) or ((sizeof([temp for temp in self.Types[1 - 1].RelatedObjects if not 'ifc4x3_rc1.ifcproduct' in typeof(temp)])) == 0)) is not False
|
||||
assert ((not (exists(lambda: self.Types[1 - 1]))) or ((sizeof([temp for temp in self.Types[1 - 1].RelatedObjects if not ('ifc4x3_rc1.ifcproduct' in typeof(temp))])) == 0)) is not False
|
||||
|
||||
|
||||
|
||||
@@ -23439,7 +23441,7 @@ class IfcWindowLiningProperties_WR31:
|
||||
liningdepth = self.LiningDepth
|
||||
liningthickness = self.LiningThickness
|
||||
|
||||
assert (not exists(liningdepth) and (not exists(liningthickness))) is not False
|
||||
assert (not (exists(liningdepth) and (not exists(liningthickness)))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -23454,7 +23456,7 @@ class IfcWindowLiningProperties_WR32:
|
||||
firsttransomoffset = self.FirstTransomOffset
|
||||
secondtransomoffset = self.SecondTransomOffset
|
||||
|
||||
assert (not (not exists(firsttransomoffset)) and exists(secondtransomoffset)) is not False
|
||||
assert (not ((not exists(firsttransomoffset)) and exists(secondtransomoffset))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -23469,7 +23471,7 @@ class IfcWindowLiningProperties_WR33:
|
||||
firstmullionoffset = self.FirstMullionOffset
|
||||
secondmullionoffset = self.SecondMullionOffset
|
||||
|
||||
assert (not (not exists(firstmullionoffset)) and exists(secondmullionoffset)) is not False
|
||||
assert (not ((not exists(firstmullionoffset)) and exists(secondmullionoffset))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -23601,7 +23603,7 @@ class IfcZone_WR1:
|
||||
def __call__(self):
|
||||
|
||||
|
||||
assert ((sizeof(self.IsGroupedBy) == 0) or ((sizeof([temp for temp in self.IsGroupedBy[1 - 1].RelatedObjects if not ('ifc4x3_rc1.ifczone' in typeof(temp)) or ('ifc4x3_rc1.ifcspace' in typeof(temp)) or ('ifc4x3_rc1.ifcspatialzone' in typeof(temp))])) == 0)) is not False
|
||||
assert ((sizeof(self.IsGroupedBy) == 0) or ((sizeof([temp for temp in self.IsGroupedBy[1 - 1].RelatedObjects if not (('ifc4x3_rc1.ifczone' in typeof(temp)) or ('ifc4x3_rc1.ifcspace' in typeof(temp)) or ('ifc4x3_rc1.ifcspatialzone' in typeof(temp)))])) == 0)) is not False
|
||||
|
||||
|
||||
|
||||
@@ -23617,7 +23619,7 @@ class IfcRepresentationContextSameWCS:
|
||||
if sizeof(IfcGeometricRepresentationContext) > 1:
|
||||
for i in range(2, hiindex(IfcGeometricRepresentationContext) + 1):
|
||||
if (IfcGeometricRepresentationContext[1 - 1].WorldCoordinateSystem) != (IfcGeometricRepresentationContext[i - 1].WorldCoordinateSystem):
|
||||
isdifferent = (not IfcSameValidPrecision(IfcGeometricRepresentationContext[1 - 1].Precision,IfcGeometricRepresentationContext[i - 1].Precision)) or (not IfcSameAxis2Placement(IfcGeometricRepresentationContext[1 - 1].WorldCoordinateSystem,IfcGeometricRepresentationContext[i - 1].WorldCoordinateSystem,IfcGeometricRepresentationContext[1 - 1].Precision))
|
||||
isdifferent = (not (IfcSameValidPrecision(IfcGeometricRepresentationContext[1 - 1].Precision,IfcGeometricRepresentationContext[i - 1].Precision))) or (not (IfcSameAxis2Placement(IfcGeometricRepresentationContext[1 - 1].WorldCoordinateSystem,IfcGeometricRepresentationContext[i - 1].WorldCoordinateSystem,IfcGeometricRepresentationContext[1 - 1].Precision)))
|
||||
if isdifferent == True:
|
||||
break
|
||||
|
||||
@@ -23937,25 +23939,25 @@ def IfcCorrectObjectAssignment(constraint, objects):
|
||||
if constraint == IfcObjectTypeEnum.NOTDEFINED:
|
||||
return True
|
||||
elif constraint == IfcObjectTypeEnum.PRODUCT:
|
||||
count = sizeof([temp for temp in objects if not 'ifc4x3_rc1.ifcproduct' in typeof(temp)])
|
||||
count = sizeof([temp for temp in objects if not ('ifc4x3_rc1.ifcproduct' in typeof(temp))])
|
||||
return count == 0
|
||||
elif constraint == IfcObjectTypeEnum.PROCESS:
|
||||
count = sizeof([temp for temp in objects if not 'ifc4x3_rc1.ifcprocess' in typeof(temp)])
|
||||
count = sizeof([temp for temp in objects if not ('ifc4x3_rc1.ifcprocess' in typeof(temp))])
|
||||
return count == 0
|
||||
elif constraint == IfcObjectTypeEnum.CONTROL:
|
||||
count = sizeof([temp for temp in objects if not 'ifc4x3_rc1.ifccontrol' in typeof(temp)])
|
||||
count = sizeof([temp for temp in objects if not ('ifc4x3_rc1.ifccontrol' in typeof(temp))])
|
||||
return count == 0
|
||||
elif constraint == IfcObjectTypeEnum.RESOURCE:
|
||||
count = sizeof([temp for temp in objects if not 'ifc4x3_rc1.ifcresource' in typeof(temp)])
|
||||
count = sizeof([temp for temp in objects if not ('ifc4x3_rc1.ifcresource' in typeof(temp))])
|
||||
return count == 0
|
||||
elif constraint == IfcObjectTypeEnum.ACTOR:
|
||||
count = sizeof([temp for temp in objects if not 'ifc4x3_rc1.ifcactor' in typeof(temp)])
|
||||
count = sizeof([temp for temp in objects if not ('ifc4x3_rc1.ifcactor' in typeof(temp))])
|
||||
return count == 0
|
||||
elif constraint == IfcObjectTypeEnum.GROUP:
|
||||
count = sizeof([temp for temp in objects if not 'ifc4x3_rc1.ifcgroup' in typeof(temp)])
|
||||
count = sizeof([temp for temp in objects if not ('ifc4x3_rc1.ifcgroup' in typeof(temp))])
|
||||
return count == 0
|
||||
elif constraint == IfcObjectTypeEnum.PROJECT:
|
||||
count = sizeof([temp for temp in objects if not 'ifc4x3_rc1.ifcproject' in typeof(temp)])
|
||||
count = sizeof([temp for temp in objects if not ('ifc4x3_rc1.ifcproject' in typeof(temp))])
|
||||
return count == 0
|
||||
else:
|
||||
return None
|
||||
@@ -23967,13 +23969,13 @@ def IfcCorrectUnitAssignment(units):
|
||||
monetaryunitnumber = 0
|
||||
namedunitnames = express_set([])
|
||||
derivedunitnames = express_set([])
|
||||
namedunitnumber = sizeof([temp for temp in units if ('ifc4x3_rc1.ifcnamedunit' in typeof(temp)) and (not temp.UnitType == IfcUnitEnum.USERDEFINED)])
|
||||
derivedunitnumber = sizeof([temp for temp in units if ('ifc4x3_rc1.ifcderivedunit' in typeof(temp)) and (not temp.UnitType == IfcDerivedUnitEnum.USERDEFINED)])
|
||||
namedunitnumber = sizeof([temp for temp in units if ('ifc4x3_rc1.ifcnamedunit' in typeof(temp)) and (not (temp.UnitType == IfcUnitEnum.USERDEFINED))])
|
||||
derivedunitnumber = sizeof([temp for temp in units if ('ifc4x3_rc1.ifcderivedunit' in typeof(temp)) and (not (temp.UnitType == IfcDerivedUnitEnum.USERDEFINED))])
|
||||
monetaryunitnumber = sizeof([temp for temp in units if 'ifc4x3_rc1.ifcmonetaryunit' in typeof(temp)])
|
||||
for i in range(1, sizeof(units) + 1):
|
||||
if ('ifc4x3_rc1.ifcnamedunit' in (typeof(units[i - 1]))) and (not (units[i - 1].UnitType) == IfcUnitEnum.USERDEFINED):
|
||||
if ('ifc4x3_rc1.ifcnamedunit' in (typeof(units[i - 1]))) and (not ((units[i - 1].UnitType) == IfcUnitEnum.USERDEFINED)):
|
||||
namedunitnames = namedunitnames + (units[i - 1].UnitType)
|
||||
if ('ifc4x3_rc1.ifcderivedunit' in (typeof(units[i - 1]))) and (not (units[i - 1].UnitType) == IfcDerivedUnitEnum.USERDEFINED):
|
||||
if ('ifc4x3_rc1.ifcderivedunit' in (typeof(units[i - 1]))) and (not ((units[i - 1].UnitType) == IfcDerivedUnitEnum.USERDEFINED)):
|
||||
derivedunitnames = derivedunitnames + (units[i - 1].UnitType)
|
||||
return (sizeof(namedunitnames) == namedunitnumber) and (sizeof(derivedunitnames) == derivedunitnumber) and (monetaryunitnumber <= 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user