Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jwg12 IfcSweptDiskSolid where rule Directrix IfcIndexedPolyCurve #16

Open
aothms opened this issue Sep 5, 2022 · 8 comments
Open

jwg12 IfcSweptDiskSolid where rule Directrix IfcIndexedPolyCurve #16

aothms opened this issue Sep 5, 2022 · 8 comments

Comments

@aothms
Copy link
Member

aothms commented Sep 5, 2022

IfcCurve has no attributes Segments

@aothms
Copy link
Member Author

aothms commented Sep 5, 2022

--- tmp/a/IFC.exp	2022-09-03 11:39:03.838097700 +0200
+++ tmp/b/IFC.exp	2022-09-05 20:20:07.874382000 +0200
@@ -11256,21 +11256,21 @@
 	DirectrixDim : Directrix.Dim = 3;
 	InnerRadiusSize : (NOT EXISTS(InnerRadius)) OR (Radius > InnerRadius);
 END_ENTITY;
 
 ENTITY IfcSweptDiskSolidPolygonal
  SUBTYPE OF (IfcSweptDiskSolid);
 	FilletRadius : OPTIONAL IfcNonNegativeLengthMeasure;
  WHERE
 	CorrectRadii : NOT(EXISTS(FilletRadius)) OR (FilletRadius >= SELF\IfcSweptDiskSolid.Radius);
 	DirectrixIsPolyline : ('IFC4X3_DEV.IFCPOLYLINE' IN TYPEOF(SELF\IfcSweptDiskSolid.Directrix)) OR
-(('IFC4X3_DEV.IFCINDEXEDPOLYCURVE' IN TYPEOF(SELF\IfcSweptDiskSolid.Directrix)) AND NOT(EXISTS(SELF\IfcSweptDiskSolid.Directrix.Segments)));
+(('IFC4X3_DEV.IFCINDEXEDPOLYCURVE' IN TYPEOF(SELF\IfcSweptDiskSolid.Directrix)) AND NOT(EXISTS(SELF\IfcSweptDiskSolid.Directrix\IfcIndexedPolyCurve.Segments)));
 END_ENTITY;
 
 ENTITY IfcSweptSurface
  ABSTRACT SUPERTYPE OF (ONEOF
 	(IfcSurfaceOfLinearExtrusion
 	,IfcSurfaceOfRevolution))
  SUBTYPE OF (IfcSurface);
 	SweptCurve : IfcProfileDef;
 	Position : OPTIONAL IfcAxis2Placement3D;
  WHERE

@SergejMuhic
Copy link

SergejMuhic commented Sep 25, 2022

I don't think this change is necessary. Would it not just return null as we have discussed here:
buildingSMART/IFC4.3.x-development#507

If we start such corrections, then there are plenty more to go around.

@aothms
Copy link
Member Author

aothms commented Sep 26, 2022

I tend to agree. This was reported to us as an issue, I'm not entirely sure of the severity of this issue (is it a tool that's being over cautious, is it something of a best practice, or is our interpretation of p11 wrong) or even what tool was being used, but I trust the user of the tool to be highly knowledgeable. With this handful of fixes their list of errors was empty. I propose we just go ahead with it assuming we both agree there is no harm in it.

Can you give an another example of not fully qualified subtype attribute usage?

@SergejMuhic
Copy link

Can you give an another example of not fully qualified subtype attribute usage?

I can have a look. Do you have a time restriction?

@aothms
Copy link
Member Author

aothms commented Sep 27, 2022

Do you have a time restriction?

Well, no. What we see here is what is being submitted to ISO, so there isn't an immediate need to know more now. I'm also working myself on a bit better tooling for express rule constructs (model validation to begin with) but maybe also semantic analysis at some point (depends a bit on where we go with schema languages in the community). So maybe something will also come out of that.

@SergejMuhic
Copy link

SergejMuhic commented Sep 27, 2022

1.  IF ('IFC4X3_RC4.IFCPOLYLINE' IN TYPEOF(Curve))
    THEN RETURN(Curve\IfcPolyline.Points[1].Dim);
  END_IF;

2.  REPEAT i := 0 TO B.UpperIndexOnControlPoints;

3.  IfcSameCartesianPoint(ap1.Location,ap2.Location,Epsilon));

Just clicked through a few manually. I could run it on the entire schema and make a log because now I have completely skipped derived attributes, where rules, global rules etc.

@aothms
Copy link
Member Author

aothms commented Sep 28, 2022

RETURN(Curve\IfcPolyline.Points[1].Dim);

Dim is defined on IfcPoint, supertype of IfcCartesianPoint (Curve\IfcPolyline.Points[1])

B.UpperIndexOnControlPoints

UpperIndexOnKnots is defined on IfcBSplineCurveWithKnots, supertype of IfcRationalBSplineCurveWithKnots (B)

IfcSameCartesianPoint(ap1.Location,ap2.Location,Epsilon));

Location is defined on IfcPlacement, supertype of IfcAxis2Placement (ap1, ap2).

--

It's the reverse of:

NOT(EXISTS(SELF\IfcSweptDiskSolid.Directrix\IfcIndexedPolyCurve.Segments)))

Segments defined on IfcIndexedPolyCurve subtype of IfcCurve (Directrix)

@SergejMuhic
Copy link

SergejMuhic commented Sep 28, 2022

I am sorry but I do not see this difference in the scope of EXPRESS.

I also do not understand this:

Location is defined on IfcPlacement, supertype of IfcAxis2Placement (ap1, ap2).

IfcPlacement cannot be a supertype of a select i.e. IfcAxis2Placement.

I might have pasted a wrong example in No 1. I cannot see what is wrong there as IfcCartesianPoint has its own Dim and there is actually no Dim on IfcPoint. 😕

As you have pasted in the issue #507:

If the specified attribute is not present in the
entity instance or partial complex entity value, indeterminate (indeterminate (?)) is returned.

it says nothing about into which "direction" (whether subtype or supertype) of the complex entity instance we are looking. Am I missing something? At this point in time, I have it implemented like this. Maybe I should change.

Could you explain what you meant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants