-
Notifications
You must be signed in to change notification settings - Fork 35
Draft IfcAlignment Implementation Guide - Request for feedback #169
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
Comments
@RickBrice this is fantastic! Thank you very much for this. If we get another couple of authors to chip in, I think we can publish it as official resource. |
@evandroAlfieri @jmirtsch @peterrdf @apinzenoehler @SergejMuhic @aothms @civilx64 I am continuing to work on this IfcAlignment Geometry Implementation Guide. I am looking at cant and I believe there to be an error in @peterrdf EnrichIFC4x3 software that has led me to incorrectly defining the equations for cant in this document and may be misleading others who use the example datasets for development and testing. The equation for cant has the same general mathematic form as the equation for curvature. For example, the BSI Standard 13803:2017 defines the mathematical function for Cosine curve cant transition as The curvature equation is With a few algebraic manipulations we can show that D(s) has the same form as k(s). However, we note that the cant equation yields values with length units and the curvature equation yields values with length^-1 units. For this reason we let which yields values with length units. Studying the code in EnricnIFC4x3 from https://github.com/bSI-RailwayRoom/IFC-Rail-Unit-Test-Reference-Code/ one sees that Constant term: Cosine term: The problem with A0 and A1 is that they are unitless quantities. These terms must have units of length when used in the curvature equation, k(s), defined in https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcCosineSpiral.htm. Consider the example https://github.com/bSI-RailwayRoom/IFC-Rail-Unit-Test-Reference-Code/blob/master/alignment_testset/IFC-WithGeneratedGeometry/GENERATED__CantAlignment_CosineCurve_100.0_1000_300_1_Meter.ifc. The cant segment is defined as
The geometric representation is
From the cant segment definition The constant and cosine terms match the parameters in the geometric representation of the cant segment. Evaluating the cant at the mid-point of the segment we get This results is obviously incorrect. I believe the correct constant and cosine terms are Constant term: Cosine term: which have units of length. The revised calculation of the IfcCosineSpiral parameters is The cosine spiral definition is them
and evaluation of the mid-segment cant is This is the correct result. The EnrichIFC4x3 program uses which also yields the correct result, in the correct units, but for the wrong reason. Implementer agreement is critical here. There is a very significant difference between these two representations of the same cant transition
The same concern holds true for polynomial spirals. The EnrichIFC4x3 program computes the polynomial coefficients and they all have the general form of which does not yield coefficients with length units. For the coefficient to have length units, its general form is The fundamental question is the correct relationship between D(s) and k(s). OR I believe the second relationship to be correct because it respects the units of measure of the parent curve terms and yields a result in the correct unit of measure. |
I kind of assumed that the documentation for ifcpolygonalcurve 1 | Position | IfcPlacement | No description available. means that for example Now I guess for alignment this means what in the document but it kind of jumps from IfcPolynomialCurve(undocumented) -> alignment curve. |
@SamiLyden thank you for the feedback. Yes, I think the guidance document jumps from the general IfcPolynomialCurve, which could be used for any geometry, to the specific case of a cubic transition curve without explanation. I have made the same "jump" for the spiral types. This was recently pointed out to me by others as well. I will endeavor to add introductory remarks in the document that distinguishes between general geometry and specific cases applicable to alignments. There are some issues with mapping of business to geometry for cant in the document as well. I'll post an updated version soon. |
Here is an updated draft of the implementation guide. There is still much work to be done. Feedback is appreciated. Alignment Geometry Implementation Guide.pdf @SamiLyden there are some serious problems with IfcPolynomialCurve and CUBIC transition spirals and PARABOLICARC vertical curves in the IFC specification. They are highlighted in the document but to summarize:
How are you determining the coefficients for IfcPolynomialCurve so it represents IfcAlignmentSegment for horizontal and vertical properly? |
@RickBrice what would you think of publishing the guide somewhere online, to allow for multiple contributors to make updates as well as to comment on specific items? I would probably default to using markdown, placing the content in its own repo, and using a Github action to publish a new PDF on every push to |
This would be the place for parabolic :https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/concepts/Partial_Templates/Geometry/Curve_Segment_Geometry/Parabolic_Transition_Segment/content.html I think these should be usages directly on |
The problem with parabolic and cubic is the unit of measure for the polynomial coefficients. IfcPolynomialCurve lists the coefficients as real values - these are scalar, unitless quantities. From parabolic transition y = CoefficientsX[3]*x² the CoefficientsX[3] must have a units of 1/Length so that y is in units of length. y = (1/Length)(Length^2) = Length From cubic, y = CoefficientsX[3]*x³, the CoefficientsX[3] must have a unit of 1/(Length^2) so that y is in units of length. y =(1/Length^2)(Length^3) = Length The coefficients cannot be unitless, but they must be for IfcPolynomialCurve - this is an error in the specification. |
I agree, I have been facing this issue when specifying the definition for Maybe a simple agreement in the form of: "the project length units define the units of the coefficients where the power of the coefficient is determined by the negative index subtracted by 1 in the Coefficients list i.e. index - 1 multiplied by -1". Could also make sense then to change I don't have a better idea unfortunately, but maybe others come up with something. |
The only solution I can think would be (a) to have the coefficients as a (b) define these as numeric measures, but access them by means of a derived attr that does the unit conversion based on the project length to the power ... That's more of a symbolic solution because the specification and unit remains wrong, just that you offer some sort of 'API' to deal with it embedded in the schema. |
Agree that this is a problem. especially since its in no way documented. so everyone now end up with whatever works for them. But I dont think the issue is the coefficients. Those are just a set of scalar multipliers. The whole thing is broken as the polynomial curve is defined for parameter values, for some reason we are now always using lengthmeasure as parameter value https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcCurveSegment.htm Tldr |
At this stage of the game, Ifc4x3 is an ISO standard so I don't think it can be changed. An agreement is needed for dealing with polynomials. Since we are talking about real world geometry the x, y, and z results of evaluating IfcPolynomial should have units of Length. I don't think there is any choice but for coefficient When Example: When Example: Since IfcCurveSegment.SegmentStart and .SegmentLength are agreed to be IfcLengthMeasure the first example seems to be the best we can do. If IfcCurveSegment.SegmentStart = IfcParameterValue(0.5) and IfcCurveSegment.SegmentLength = IfcParameterValue(0.9), there is no way to know the value of |
@civilx64 Good idea - I'll have to experiment with some Word to MD converters. |
I have had good luck with pandoc although mostly going the other direction. |
This was never the design intent. It was just there to make the first tests easier. I have posted an issue about that and have been trying even before publishing the ISO to fix this. buildingSMART/IFC4.3.x-development#884 To no avail. It should never have been a select in the ISO! @RickBrice agree, we make use of the ISO as is. Your example can be extended to the higher order polynomial spirals. Using
The problem here is however, that the So, as @RickBrice stated above and we treat the coefficients to be on the parameter u, we can put the equations back together. Parameter For the future though, the definition could be modified like this:
With the documentation on Coefficients : "The terms for the polynomial as |
@civilx64 I have moved the guide to it own repo. Ready for contributions and PRs |
Friends of the IF - I have made good progress in developing an implementation guide for IfcAlignment and the related geometries.
The draft guide is attached.
IfcAlignment Implementation Guide.pdf
The text was updated successfully, but these errors were encountered: