Open-Infra-Platform icon indicating copy to clipboard operation
Open-Infra-Platform copied to clipboard

IfcPolynomialCurve

Open Elvira2227 opened this issue 3 years ago • 1 comments

In this pull request implementation was added for IfcPolynomialCurve. The following functions were added in CurveConverter.h:

  1. getPointOnCurve
  2. getDirectionOfCurve - here we need to implement additional code in covertIfcCurveSegment to calculate rotation around x,y axis and also rotation in 3D. Now we can only rotate around axis z.
  3. calculatePolynomialCurve - to calculate polynomial from coefficietnts

For explanation there is a screen shot of cubic curve with coefficientsX (0., 1., 0.) and coefficientsY (0., 0., 0.01, 0.).

image

Note: This is related to #524 Please see starting from commit 2b83b5b

Elvira2227 avatar Apr 16 '22 12:04 Elvira2227

There are several changes in the last commits cf59b36 and 28f6421.

  • First, I was trying to find corresponding functions from the SpiralUtils, but it returned high values of X and Y. Thats why I desided to write a separate functions which calculates integral by using numerical methods. That will helps to find appropriate values for X and Y.
  • New functions integrateParameter , calculatePolynomialDerivative, intagral have been placed in CurveConverter.h.
  • I have noticed that integrateParameter returned the value with the approximation error 0.4%.
  • In the commit 28f6421 are small corrections for integrateParameter function.
  • I tested my code with polynomialConstantX = (0.,1.,0.) and polynomialConstantY = (0.,0.,1., 0.)

Here is the implemented polycurve: image

Elvira2227 avatar May 12 '22 15:05 Elvira2227