buildingSMART / IFC4.x-IF

IFC4.x Implementers Forum
28 stars 33 forks source link

Correct polynomial spiral equations #144

Closed RickBrice closed 4 months ago

RickBrice commented 5 months ago

Problem The $\lambda(u)$ equations for IfcSecond, IfcThird, and IfcSeventhOrderPolynomialSpiral are incorrect. The equations are of the form:

$$\lambda(u) = C + \int{0}^{u}\cos \theta(t) dt x \int{0}^{u}\sin \theta(t) dt y$$

The integrals yield scalar values while C is a location with length units.

Solution(s) I think the equation should be $$\lambda(u) = C + L ( \int{0}^{u}\cos \theta(t) dt x \int{0}^{u}\sin \theta(t) dt y )$$ where $L$ is the arc length when $u=1.0$.

The documentation might also benefit from stating $u=1.0$ when $\theta=\frac{\pi}{2}$

Require schema changes?

Require documentation changes?

RickBrice commented 4 months ago

The hand calculations in issue #146 suggest that the integral equations may be correct, but there are likely other inaccuracies in the documented equations for the Ifc___PolynomialSpiralCurve types.

RickBrice commented 4 months ago

After learning of the correct repository for ifc rail unit tests, I am able to exactly match horizontal and vertical for the polynomial spirals. Have not yet compared unit test results with cant. I’ll close this issue with no changes required.

@peterrdf @apinzenoehler @evandroAlfieri