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

SectionedSurface Aplitop 1 #106

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

javierNadal
Copy link
Contributor

Unit test

This scenario is a simple road visualization (IfcSectionedSurface and IfcOpenCrossProfileDef)

Covered topics

tick one/many

  • project setup
  • georeferencing
  • alignment semantics
  • alignment geometry
  • linear placement
  • project breakdown structure / spatial structure
  • terrain
  • triangulated irregular network
  • open cross profile
  • sectioned surface & solid
  • pavement & course
  • surface feature
  • earthworks
  • geotechnics
  • longitudinal products (barriers, guardrail, ...)
  • interchange
  • structural
  • drainage
  • signage
  • road furniture
  • rail furniture
  • ports & waterways furniture
  • bridge furniture

#45=IFCRELNESTS('1qVzEdro5CFf5K20Wsg4rv',#9,$,$,#31,(#33));
#46=IFCCOMPOSITECURVE((#44),.F.);
#47=IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Axis','Model',*,*,*,*,#19,$,.GRAPH_VIEW.,$);
#48=IFCSHAPEREPRESENTATION(#47,'Axis','Curve2D',(#46));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When there is an IfcGradientCurve available, I wonder if the shape representation for an IfcAlignment should refer to this (65) instead if the IfcCompositeCurve?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a simple sample like this, just a straight line, yes.

But in a more general sample, I still don't have an implementation to build a single IfcCompositeCurve from any 2D alingment and grade line info. So I kept alignment representation as 2D.

I will change it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems as if the IfcProductDefinitionShape on line #49 no longer has an owning IfcProduct. I assume that this should be the IfcAlignment?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that IfcAlignmentHorizontal has a shape representation = IfcCompositeCurve.
IfcAlignmentVertical has a shape representation = IfcGradientCurve
I wonder whether IfcAlignment (no shape representation in this file) should have the gradient curve as its representation (Axis,Curve3D)? @SergejMuhic ?


#272=IFCPRODUCTDEFINITIONSHAPE($,$,(#273));
#273=IFCSHAPEREPRESENTATION(#19,'Profiles','',(#274));
#274=IFCSECTIONEDSURFACE(#65,(#275,#277,#279,#281,#283),(#276,#278,#280,#282,#284),.F.);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks to me as if the list of CrossSectionPositions should come as attribute 2 and CrossSections as attribute nr 3. I checked with the KIT checker where the data passes regardless of the ordering between these two?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right. I will swap them.

#274=IFCSECTIONEDSURFACE(#65,(#275,#277,#279,#281,#283),(#276,#278,#280,#282,#284),.F.);

#275=IFCOPENCROSSPROFILEDEF(.CURVE.,$,.T.,(0.031,3.5,3.5,0.056),(-0.667,0.,0.,-0.667),('119','30','0','30','139'));
#276=IFCPOINTBYDISTANCEEXPRESSION(IFCLENGTHMEASURE(0.),IFCLENGTHMEASURE(3.531),0.,0.,#65);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From looking at the xml data, it would seem that there should be a negative vertical offset needed in this case. Also, i am not sure where the value 3.531 comes from. In the xml at station 0 we have -2.736 and at station 20 we have -3.778.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Value 3.351 is a left displacement of the OpenCrossProfile. First two widths (0.031 & 3.5) are located at left side of alignment.
I will check vertical offsets.

#273=IFCSHAPEREPRESENTATION(#19,'Profiles','',(#274));
#274=IFCSECTIONEDSURFACE(#65,(#275,#277,#279,#281,#283),(#276,#278,#280,#282,#284),.F.);

#275=IFCOPENCROSSPROFILEDEF(.CURVE.,$,.T.,(0.031,3.5,3.5,0.056),(-0.667,0.,0.,-0.667),('119','30','0','30','139'));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The slope values seem off. Please consult the documentation (x to the left and y up, positive angles from x to y). Typically, the slope value when starting from the left would be relatively close to PI radians.

Also, unique tags would be recommended.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'm changing slopes

#277=IFCOPENCROSSPROFILEDEF(.CURVE.,$,.T.,(0.543,3.5,3.5,0.301),(-0.6667,0.,0.,-0.667),('119','30','0','30','119'));
#278=IFCPOINTBYDISTANCEEXPRESSION(IFCLENGTHMEASURE(30.),IFCLENGTHMEASURE(4.043),0.,0.,#65);

#279=IFCOPENCROSSPROFILEDEF(.CURVE.,$,.T.,(0.663,3.5,3.5,3.154),(-0.667,0.,0.,0.6667),('139','30','0','30','139'));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is by design to switch from tag '119' to tag '139', I would recommend adding '139' to the previous cross section or '119' to this. See documentation:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will include one more vertex with 139 code in previous/next profile, and 0 width vector.

#45=IFCRELNESTS('1qVzEdro5CFf5K20Wsg4rv',#9,$,$,#31,(#33));
#46=IFCCOMPOSITECURVE((#44),.F.);
#47=IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Axis','Model',*,*,*,*,#19,$,.GRAPH_VIEW.,$);
#48=IFCSHAPEREPRESENTATION(#47,'Axis','Curve2D',(#46));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems as if the IfcProductDefinitionShape on line #49 no longer has an owning IfcProduct. I assume that this should be the IfcAlignment?

#46=IFCCOMPOSITECURVE((#44),.F.);
#47=IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Axis','Model',*,*,*,*,#19,$,.GRAPH_VIEW.,$);
#48=IFCSHAPEREPRESENTATION(#47,'Axis','Curve2D',(#46));
#49=IFCPRODUCTDEFINITIONSHAPE($,$,(#48));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should be referenced somewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In updated file, #49 is representation of IFCHORIZONTALALINGMENT

#65=IFCGRADIENTCURVE((#63),.F.,#46,$);
#66=IFCSHAPEREPRESENTATION(#47,'Axis','Curve3D',(#65));
#67=IFCPRODUCTDEFINITIONSHAPE($,$,(#66));
#68=IFCFACILITYPART('2VJRykc916eO0F0TUHiUj9',$,$,$,'ROADSEGMENT',#24,#87,$,.COMPLEX.,$,.LONGITUDINAL.);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an error here. The 10th (penutimate) attribute should be the predefined type. Suggestion: IFCROADPARTTYPEENUM(.ROADSEGMENT.). The 5th attribute (ObjectType) can thereby be removed (set to $) since it doesn't add anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,87 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition []'),'2;1');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ViewDefinition can be set to [Ifc4X3NotAssigned] for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Fixed IFCROADPARTTYPEENUM(.ROADSEGMENT.) , representation of IFCALIGNMENTHORIZONTAL, and ViewDefinition
#72=IFCPOINTBYDISTANCEEXPRESSION(IFCLENGTHMEASURE(0.),3.531,0.,0.,#65);
#73=IFCOPENCROSSPROFILEDEF(.CURVE.,'CrossProfile-2',.T.,(0.543,3.5,3.5,0.301),(2.47492598733333,3.141592654,3.141592654,2.47714082675747),('119','30','0','30','119'));
#75=IFCPOINTBYDISTANCEEXPRESSION(IFCLENGTHMEASURE(30.),4.043,0.,0.,#65);
#76=IFCOPENCROSSPROFILEDEF(.CURVE.,'CrossProfile-3',.T.,(0.663,3.5,3.5,0.,3.154),(2.47492598733333,3.141592654,3.141592654,3.141592654,3.80836500656817),('119','30','0','30','119','139'));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My interpretation is according to this image:
image
Is it possible that cross section at 60 should join 119 and 139 (at section 60) instead of 119 and 30, i.e. have the width 0 as last value?
Please also check that my interpretation is correct. Other than that, I think that the file LFTM!

Copy link
Contributor Author

@javierNadal javierNadal Jun 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a new IfcOpenCrossProfileDef at station 45. Now I think it looks better.

image

#45=IFCRELNESTS('1qVzEdro5CFf5K20Wsg4rv',#9,$,$,#31,(#33));
#46=IFCCOMPOSITECURVE((#44),.F.);
#47=IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Axis','Model',*,*,*,*,#19,$,.GRAPH_VIEW.,$);
#48=IFCSHAPEREPRESENTATION(#47,'Axis','Curve2D',(#46));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that IfcAlignmentHorizontal has a shape representation = IfcCompositeCurve.
IfcAlignmentVertical has a shape representation = IfcGradientCurve
I wonder whether IfcAlignment (no shape representation in this file) should have the gradient curve as its representation (Axis,Curve3D)? @SergejMuhic ?

#68=IFCFACILITYPART('2VJRykc916eO0F0TUHiUj9',$,$,$,$,#24,#87,$,.COMPLEX.,IFCROADPARTTYPEENUM(.ROADSEGMENT.),.LONGITUDINAL.);
#69=IFCRELAGGREGATES('0nVIlPiJ1D0Opi4EVcPTpM',#9,$,$,#28,(#68));
#70=IFCOPENCROSSPROFILEDEF(.CURVE.,'CrossProfile-1',.T.,(0.0310000000000001,3.5,3.5,0.056),(2.49643136367755,3.141592654,3.141592654,2.48087836828573),('119','30','0','30','119'));
#72=IFCPOINTBYDISTANCEEXPRESSION(IFCLENGTHMEASURE(0.),3.531,0.,0.,#65);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KIT checker doesn't seem to detect this, but shouldn't DistanceAlong be IfcNonNegativeLengthMeasure
and not IfcLengthMeasure ?? This applies too all occurrences.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be an IfcNonNegativeLengthMeasure for the IfcPointByDistanceExpression:
TYPE IfcCurveMeasureSelect = SELECT (
IfcParameterValue,
IfcNonNegativeLengthMeasure);
END_TYPE;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more thing. I discussed with the rest of the team this morning and even if the documentation lacks this information, the conclusion was that it is at least recommended to keep the tags unique within a profile. Would it be possible to e.g. add a "R" and "L" prefix to separate e.g. 30 on the left vs 30 on the right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator

@jmirtsch jmirtsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a great test case and it's close. Please check my comments, it's possible I need to improve my own implementation. I would note that the example isn't a replica of the landxml data, but a simplification.

I think the schema could be improved to allow the section curve to be relocated with start point not at origin, as I'd suggest the intent is to have the middle of the carriage way coincident elevation with the alignment. You've offset laterally, but offsetting vertically then causes problems with nominating vertical profiles (pivot point).

210624 sections gg 02

#33=IFCALIGNMENTSEGMENT('0sVreI8Kn6tuw4UYDmeHtA',$,$,$,$,#24,$,#35);
#34=IFCCARTESIANPOINT((286.47559897,239.79766567));
#35=IFCALIGNMENTHORIZONTALSEGMENT($,$,#34,1.50346536986339,0.,0.,107.15812752,$,.LINE.);
#36=IFCDIRECTION((0.999655739909883,0.0262374096515884));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semantics of Alignment seem to be south to north, where as this direction positions the geometry to near east/west (ie x). Which is correct?

IFCDIRECTION((0.999655739909883,0.0262374096515884));

210624 alignment direction gg

#72=IFCPOINTBYDISTANCEEXPRESSION(IFCNONNEGATIVELENGTHMEASURE(0.),3.531,0.,0.,#65);
#73=IFCOPENCROSSPROFILEDEF(.CURVE.,'CrossProfile-2',.T.,(0.543,3.5,3.5,0.301),(2.47492598733333,3.141592654,3.141592654,2.47714082675747),('L119','L30','0','R30','R119'));
#75=IFCPOINTBYDISTANCEEXPRESSION(IFCNONNEGATIVELENGTHMEASURE(30.),4.043,0.,0.,#65);
#76=IFCOPENCROSSPROFILEDEF(.CURVE.,'CrossProfile-3',.T.,(0.663,3.5,3.5,3.154),(2.47492598733333,3.141592654,3.141592654,3.80836500656817),('L119','L30','0','R30','R119'));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(0.663,3.5,3.5,3.154)

3.154 for the road side width doesn't seem to match sketch of intent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there is a swap between stations 45 and 60

#67=IFCPRODUCTDEFINITIONSHAPE($,$,(#66));
#68=IFCFACILITYPART('2VJRykc916eO0F0TUHiUj9',$,$,$,$,#24,#87,$,.COMPLEX.,IFCROADPARTTYPEENUM(.ROADSEGMENT.),.LONGITUDINAL.);
#69=IFCRELAGGREGATES('0nVIlPiJ1D0Opi4EVcPTpM',#9,$,$,#28,(#68));
#70=IFCOPENCROSSPROFILEDEF(.CURVE.,'CrossProfile-1',.T.,(0.0310000000000001,3.5,3.5,0.056),(2.49643136367755,3.141592654,3.141592654,2.48087836828573),('L119','L30','0','R30','R119'));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aplitop

Image above might be an incorrect interpretation, but as the last slope ( 2.48087836828573 ) is less than pi, the road side slopes as nominated in ifc would look more like the image below as I understand it. Can you please confirm?

210624 sections gg

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, slope was wrong

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

Successfully merging this pull request may close these issues.

3 participants