mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-18 03:19:53 +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:
|
||||
@@ -11521,7 +11523,7 @@ class IfcAdvancedBrep_HasAdvancedFaces:
|
||||
def __call__(self):
|
||||
|
||||
|
||||
assert ((sizeof([afs for afs in self.Outer.CfsFaces if not 'ifc4x3_rc3.ifcadvancedface' in typeof(afs)])) == 0) is not False
|
||||
assert ((sizeof([afs for afs in self.Outer.CfsFaces if not ('ifc4x3_rc3.ifcadvancedface' in typeof(afs))])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -11536,7 +11538,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_rc3.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_rc3.ifcadvancedface' in typeof(afs))])) == 0])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -11565,7 +11567,7 @@ class IfcAdvancedFace_RequiresEdgeCurve:
|
||||
def __call__(self):
|
||||
|
||||
|
||||
assert ((sizeof([elpfbnds for elpfbnds in [bnds for bnds in self.Bounds if 'ifc4x3_rc3.ifcedgeloop' in typeof(bnds.Bound)] if not (sizeof([oe for oe in elpfbnds.Bound.EdgeList if not 'ifc4x3_rc3.ifcedgecurve' in typeof(oe.EdgeElement)])) == 0])) == 0) is not False
|
||||
assert ((sizeof([elpfbnds for elpfbnds in [bnds for bnds in self.Bounds if 'ifc4x3_rc3.ifcedgeloop' in typeof(bnds.Bound)] if not ((sizeof([oe for oe in elpfbnds.Bound.EdgeList if not ('ifc4x3_rc3.ifcedgecurve' in typeof(oe.EdgeElement))])) == 0)])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -11579,7 +11581,7 @@ class IfcAdvancedFace_ApplicableEdgeCurves:
|
||||
def __call__(self):
|
||||
|
||||
|
||||
assert ((sizeof([elpfbnds for elpfbnds in [bnds for bnds in self.Bounds if 'ifc4x3_rc3.ifcedgeloop' in typeof(bnds.Bound)] if not (sizeof([oe for oe in elpfbnds.Bound.EdgeList if not (sizeof(['ifc4x3_rc3.ifcline','ifc4x3_rc3.ifcconic','ifc4x3_rc3.ifcpolyline','ifc4x3_rc3.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_rc3.ifcedgeloop' in typeof(bnds.Bound)] if not ((sizeof([oe for oe in elpfbnds.Bound.EdgeList if not ((sizeof(['ifc4x3_rc3.ifcline','ifc4x3_rc3.ifcconic','ifc4x3_rc3.ifcpolyline','ifc4x3_rc3.ifcbsplinecurve'] * typeof(oe.EdgeElement.EdgeGeometry))) == 1)])) == 0)])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -11842,7 +11844,7 @@ class IfcArbitraryClosedProfileDef_WR2:
|
||||
def __call__(self):
|
||||
outercurve = self.OuterCurve
|
||||
|
||||
assert (not 'ifc4x3_rc3.ifcline' in typeof(outercurve)) is not False
|
||||
assert (not ('ifc4x3_rc3.ifcline' in typeof(outercurve))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -11856,7 +11858,7 @@ class IfcArbitraryClosedProfileDef_WR3:
|
||||
def __call__(self):
|
||||
outercurve = self.OuterCurve
|
||||
|
||||
assert (not 'ifc4x3_rc3.ifcoffsetcurve2d' in typeof(outercurve)) is not False
|
||||
assert (not ('ifc4x3_rc3.ifcoffsetcurve2d' in typeof(outercurve))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -12213,7 +12215,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
|
||||
|
||||
|
||||
|
||||
@@ -12689,7 +12691,7 @@ class IfcBooleanResult_FirstOperandClosed:
|
||||
def __call__(self):
|
||||
firstoperand = self.FirstOperand
|
||||
|
||||
assert ((not 'ifc4x3_rc3.ifctessellatedfaceset' in typeof(firstoperand)) or (exists(firstoperand.Closed) and firstoperand.Closed)) is not False
|
||||
assert ((not ('ifc4x3_rc3.ifctessellatedfaceset' in typeof(firstoperand))) or (exists(firstoperand.Closed) and firstoperand.Closed)) is not False
|
||||
|
||||
|
||||
|
||||
@@ -12703,7 +12705,7 @@ class IfcBooleanResult_SecondOperandClosed:
|
||||
def __call__(self):
|
||||
secondoperand = self.SecondOperand
|
||||
|
||||
assert ((not 'ifc4x3_rc3.ifctessellatedfaceset' in typeof(secondoperand)) or (exists(secondoperand.Closed) and secondoperand.Closed)) is not False
|
||||
assert ((not ('ifc4x3_rc3.ifctessellatedfaceset' in typeof(secondoperand))) or (exists(secondoperand.Closed) and secondoperand.Closed)) is not False
|
||||
|
||||
|
||||
|
||||
@@ -12772,7 +12774,7 @@ class IfcBoxedHalfSpace_UnboundedSurface:
|
||||
def __call__(self):
|
||||
|
||||
|
||||
assert (not 'ifc4x3_rc3.ifccurveboundedplane' in typeof(self.BaseSurface)) is not False
|
||||
assert (not ('ifc4x3_rc3.ifccurveboundedplane' in typeof(self.BaseSurface))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -15051,7 +15053,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
|
||||
|
||||
|
||||
|
||||
@@ -15066,7 +15068,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
|
||||
|
||||
|
||||
|
||||
@@ -16720,7 +16722,7 @@ class IfcGeometricRepresentationSubContext_ParentNoSub:
|
||||
def __call__(self):
|
||||
parentcontext = self.ParentContext
|
||||
|
||||
assert (not 'ifc4x3_rc3.ifcgeometricrepresentationsubcontext' in typeof(parentcontext)) is not False
|
||||
assert (not ('ifc4x3_rc3.ifcgeometricrepresentationsubcontext' in typeof(parentcontext))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -17529,7 +17531,7 @@ class IfcMaterialDefinitionRepresentation_OnlyStyledRepresentations:
|
||||
def __call__(self):
|
||||
representations = self.Representations
|
||||
|
||||
assert ((sizeof([temp for temp in representations if not 'ifc4x3_rc3.ifcstyledrepresentation' in typeof(temp)])) == 0) is not False
|
||||
assert ((sizeof([temp for temp in representations if not ('ifc4x3_rc3.ifcstyledrepresentation' in typeof(temp))])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -18003,7 +18005,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
|
||||
|
||||
|
||||
|
||||
@@ -18126,7 +18128,7 @@ class IfcOrientedEdge_EdgeElementNotOriented:
|
||||
def __call__(self):
|
||||
edgeelement = self.EdgeElement
|
||||
|
||||
assert (not 'ifc4x3_rc3.ifcorientededge' in typeof(edgeelement)) is not False
|
||||
assert (not ('ifc4x3_rc3.ifcorientededge' in typeof(edgeelement))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -18938,7 +18940,7 @@ class IfcProductDefinitionShape_OnlyShapeModel:
|
||||
def __call__(self):
|
||||
representations = self.Representations
|
||||
|
||||
assert ((sizeof([temp for temp in representations if not 'ifc4x3_rc3.ifcshapemodel' in typeof(temp)])) == 0) is not False
|
||||
assert ((sizeof([temp for temp in representations if not ('ifc4x3_rc3.ifcshapemodel' in typeof(temp))])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -19128,7 +19130,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
|
||||
|
||||
|
||||
|
||||
@@ -19143,7 +19145,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
|
||||
|
||||
|
||||
|
||||
@@ -19933,7 +19935,7 @@ class IfcRectangularTrimmedSurface_UsenseCompatible:
|
||||
u2 = self.U2
|
||||
usense = self.Usense
|
||||
|
||||
assert ((('ifc4x3_rc3.ifcelementarysurface' in typeof(basissurface)) and (not 'ifc4x3_rc3.ifcplane' in typeof(basissurface))) or ('ifc4x3_rc3.ifcsurfaceofrevolution' in typeof(basissurface)) or (usense == (u2 > u1))) is not False
|
||||
assert ((('ifc4x3_rc3.ifcelementarysurface' in typeof(basissurface)) and (not ('ifc4x3_rc3.ifcplane' in typeof(basissurface)))) or ('ifc4x3_rc3.ifcsurfaceofrevolution' in typeof(basissurface)) or (usense == (u2 > u1))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -20499,7 +20501,7 @@ class IfcRelReferencedInSpatialStructure_AllowedRelatedElements:
|
||||
def __call__(self):
|
||||
relatedelements = self.RelatedElements
|
||||
|
||||
assert ((sizeof([temp for temp in relatedelements if ('ifc4x3_rc3.ifcspatialstructureelement' in typeof(temp)) and (not 'ifc4x3_rc3.ifcspace' in typeof(temp))])) == 0) is not False
|
||||
assert ((sizeof([temp for temp in relatedelements if ('ifc4x3_rc3.ifcspatialstructureelement' in typeof(temp)) and (not ('ifc4x3_rc3.ifcspace' in typeof(temp)))])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -20549,7 +20551,7 @@ class IfcRelSpaceBoundary_CorrectPhysOrVirt:
|
||||
relatedbuildingelement = self.RelatedBuildingElement
|
||||
physicalorvirtualboundary = self.PhysicalOrVirtualBoundary
|
||||
|
||||
assert (((physicalorvirtualboundary == IfcPhysicalOrVirtualEnum.Physical) and (not 'ifc4x3_rc3.ifcvirtualelement' in typeof(relatedbuildingelement))) or ((physicalorvirtualboundary == IfcPhysicalOrVirtualEnum.Virtual) and (('ifc4x3_rc3.ifcvirtualelement' in typeof(relatedbuildingelement)) or ('ifc4x3_rc3.ifcopeningelement' in typeof(relatedbuildingelement)))) or (physicalorvirtualboundary == IfcPhysicalOrVirtualEnum.NotDefined)) is not False
|
||||
assert (((physicalorvirtualboundary == IfcPhysicalOrVirtualEnum.Physical) and (not ('ifc4x3_rc3.ifcvirtualelement' in typeof(relatedbuildingelement)))) or ((physicalorvirtualboundary == IfcPhysicalOrVirtualEnum.Virtual) and (('ifc4x3_rc3.ifcvirtualelement' in typeof(relatedbuildingelement)) or ('ifc4x3_rc3.ifcopeningelement' in typeof(relatedbuildingelement)))) or (physicalorvirtualboundary == IfcPhysicalOrVirtualEnum.NotDefined)) is not False
|
||||
|
||||
|
||||
|
||||
@@ -21110,7 +21112,7 @@ class IfcShapeRepresentation_NoTopologicalItem:
|
||||
def __call__(self):
|
||||
items = self.Items
|
||||
|
||||
assert ((sizeof([temp for temp in items if ('ifc4x3_rc3.ifctopologicalrepresentationitem' in typeof(temp)) and (not (sizeof(['ifc4x3_rc3.ifcvertexpoint','ifc4x3_rc3.ifcedgecurve','ifc4x3_rc3.ifcfacesurface'] * typeof(temp))) == 1)])) == 0) is not False
|
||||
assert ((sizeof([temp for temp in items if ('ifc4x3_rc3.ifctopologicalrepresentationitem' in typeof(temp)) and (not ((sizeof(['ifc4x3_rc3.ifcvertexpoint','ifc4x3_rc3.ifcedgecurve','ifc4x3_rc3.ifcfacesurface'] * typeof(temp))) == 1))])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -22099,7 +22101,7 @@ class IfcStyledItem_ApplicableItem:
|
||||
def __call__(self):
|
||||
item = self.Item
|
||||
|
||||
assert (not 'ifc4x3_rc3.ifcstyleditem' in typeof(item)) is not False
|
||||
assert (not ('ifc4x3_rc3.ifcstyleditem' in typeof(item))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -22114,7 +22116,7 @@ class IfcStyledRepresentation_OnlyStyledItems:
|
||||
def __call__(self):
|
||||
|
||||
|
||||
assert ((sizeof([temp for temp in self.Items if not 'ifc4x3_rc3.ifcstyleditem' in typeof(temp)])) == 0) is not False
|
||||
assert ((sizeof([temp for temp in self.Items if not ('ifc4x3_rc3.ifcstyleditem' in typeof(temp))])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -22184,7 +22186,7 @@ class IfcSurfaceCurve_CurveIsNotPcurve:
|
||||
def __call__(self):
|
||||
curve3d = self.Curve3D
|
||||
|
||||
assert (not 'ifc4x3_rc3.ifcpcurve' in typeof(curve3d)) is not False
|
||||
assert (not ('ifc4x3_rc3.ifcpcurve' in typeof(curve3d))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -22946,7 +22948,7 @@ class IfcTextLiteralWithExtent_WR31:
|
||||
def __call__(self):
|
||||
extent = self.Extent
|
||||
|
||||
assert (not 'ifc4x3_rc3.ifcplanarbox' in typeof(extent)) is not False
|
||||
assert (not ('ifc4x3_rc3.ifcplanarbox' in typeof(extent))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -23015,7 +23017,7 @@ class IfcTopologyRepresentation_WR21:
|
||||
def __call__(self):
|
||||
|
||||
|
||||
assert ((sizeof([temp for temp in self.Items if not 'ifc4x3_rc3.ifctopologicalrepresentationitem' in typeof(temp)])) == 0) is not False
|
||||
assert ((sizeof([temp for temp in self.Items if not ('ifc4x3_rc3.ifctopologicalrepresentationitem' in typeof(temp))])) == 0) is not False
|
||||
|
||||
|
||||
|
||||
@@ -23260,7 +23262,7 @@ class IfcTrimmedCurve_NoTrimOfBoundedCurves:
|
||||
def __call__(self):
|
||||
basiscurve = self.BasisCurve
|
||||
|
||||
assert (not 'ifc4x3_rc3.ifcboundedcurve' in typeof(basiscurve)) is not False
|
||||
assert (not ('ifc4x3_rc3.ifcboundedcurve' in typeof(basiscurve))) is not False
|
||||
|
||||
|
||||
|
||||
@@ -23351,7 +23353,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_rc3.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_rc3.ifcproduct' in typeof(temp))])) == 0)) is not False
|
||||
|
||||
|
||||
|
||||
@@ -23858,7 +23860,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
|
||||
|
||||
|
||||
|
||||
@@ -23873,7 +23875,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
|
||||
|
||||
|
||||
|
||||
@@ -23888,7 +23890,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
|
||||
|
||||
|
||||
|
||||
@@ -24020,7 +24022,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_rc3.ifczone' in typeof(temp)) or ('ifc4x3_rc3.ifcspace' in typeof(temp)) or ('ifc4x3_rc3.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_rc3.ifczone' in typeof(temp)) or ('ifc4x3_rc3.ifcspace' in typeof(temp)) or ('ifc4x3_rc3.ifcspatialzone' in typeof(temp)))])) == 0)) is not False
|
||||
|
||||
|
||||
|
||||
@@ -24036,7 +24038,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
|
||||
|
||||
@@ -24356,25 +24358,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_rc3.ifcproduct' in typeof(temp)])
|
||||
count = sizeof([temp for temp in objects if not ('ifc4x3_rc3.ifcproduct' in typeof(temp))])
|
||||
return count == 0
|
||||
elif constraint == IfcObjectTypeEnum.PROCESS:
|
||||
count = sizeof([temp for temp in objects if not 'ifc4x3_rc3.ifcprocess' in typeof(temp)])
|
||||
count = sizeof([temp for temp in objects if not ('ifc4x3_rc3.ifcprocess' in typeof(temp))])
|
||||
return count == 0
|
||||
elif constraint == IfcObjectTypeEnum.CONTROL:
|
||||
count = sizeof([temp for temp in objects if not 'ifc4x3_rc3.ifccontrol' in typeof(temp)])
|
||||
count = sizeof([temp for temp in objects if not ('ifc4x3_rc3.ifccontrol' in typeof(temp))])
|
||||
return count == 0
|
||||
elif constraint == IfcObjectTypeEnum.RESOURCE:
|
||||
count = sizeof([temp for temp in objects if not 'ifc4x3_rc3.ifcresource' in typeof(temp)])
|
||||
count = sizeof([temp for temp in objects if not ('ifc4x3_rc3.ifcresource' in typeof(temp))])
|
||||
return count == 0
|
||||
elif constraint == IfcObjectTypeEnum.ACTOR:
|
||||
count = sizeof([temp for temp in objects if not 'ifc4x3_rc3.ifcactor' in typeof(temp)])
|
||||
count = sizeof([temp for temp in objects if not ('ifc4x3_rc3.ifcactor' in typeof(temp))])
|
||||
return count == 0
|
||||
elif constraint == IfcObjectTypeEnum.GROUP:
|
||||
count = sizeof([temp for temp in objects if not 'ifc4x3_rc3.ifcgroup' in typeof(temp)])
|
||||
count = sizeof([temp for temp in objects if not ('ifc4x3_rc3.ifcgroup' in typeof(temp))])
|
||||
return count == 0
|
||||
elif constraint == IfcObjectTypeEnum.PROJECT:
|
||||
count = sizeof([temp for temp in objects if not 'ifc4x3_rc3.ifcproject' in typeof(temp)])
|
||||
count = sizeof([temp for temp in objects if not ('ifc4x3_rc3.ifcproject' in typeof(temp))])
|
||||
return count == 0
|
||||
else:
|
||||
return None
|
||||
@@ -24386,13 +24388,13 @@ def IfcCorrectUnitAssignment(units):
|
||||
monetaryunitnumber = 0
|
||||
namedunitnames = express_set([])
|
||||
derivedunitnames = express_set([])
|
||||
namedunitnumber = sizeof([temp for temp in units if ('ifc4x3_rc3.ifcnamedunit' in typeof(temp)) and (not temp.UnitType == IfcUnitEnum.USERDEFINED)])
|
||||
derivedunitnumber = sizeof([temp for temp in units if ('ifc4x3_rc3.ifcderivedunit' in typeof(temp)) and (not temp.UnitType == IfcDerivedUnitEnum.USERDEFINED)])
|
||||
namedunitnumber = sizeof([temp for temp in units if ('ifc4x3_rc3.ifcnamedunit' in typeof(temp)) and (not (temp.UnitType == IfcUnitEnum.USERDEFINED))])
|
||||
derivedunitnumber = sizeof([temp for temp in units if ('ifc4x3_rc3.ifcderivedunit' in typeof(temp)) and (not (temp.UnitType == IfcDerivedUnitEnum.USERDEFINED))])
|
||||
monetaryunitnumber = sizeof([temp for temp in units if 'ifc4x3_rc3.ifcmonetaryunit' in typeof(temp)])
|
||||
for i in range(1, sizeof(units) + 1):
|
||||
if ('ifc4x3_rc3.ifcnamedunit' in (typeof(units[i - 1]))) and (not (units[i - 1].UnitType) == IfcUnitEnum.USERDEFINED):
|
||||
if ('ifc4x3_rc3.ifcnamedunit' in (typeof(units[i - 1]))) and (not ((units[i - 1].UnitType) == IfcUnitEnum.USERDEFINED)):
|
||||
namedunitnames = namedunitnames + (units[i - 1].UnitType)
|
||||
if ('ifc4x3_rc3.ifcderivedunit' in (typeof(units[i - 1]))) and (not (units[i - 1].UnitType) == IfcDerivedUnitEnum.USERDEFINED):
|
||||
if ('ifc4x3_rc3.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