An vital question: curve 'raw’ parameter And distances When Curve is Spline

An vital question: curve 'raw’ parameter And distances When Curve is Spline

ChengboZhang
Enthusiast Enthusiast
1,250 Views
4 Replies
Message 1 of 5

An vital question: curve 'raw’ parameter And distances When Curve is Spline

ChengboZhang
Enthusiast
Enthusiast

An vital question: Equal distances in the curve 'raw’ parameter space are transformed to equal distances in real world coordinates When Curve is Spline ???  

一个至关重要的问题: 当曲线是样条曲线时,其"原始参数的变化值" 和 "曲线的长度变化值" 是否相等 ?

 

 My application scenario: Precise distance positioning on a  Spline .

 我的应用场景是: 在样条曲线上按精确距离定位

 

I need an expert to help me out, thanks very much!
麻烦大神帮我解答一下,非常感谢!

 

Also Ref:
以下两篇参考文章非常好,但是并没有直接回复我的问题.
https://thebuildingcoder.typepad.com/blog/2010/01/curve-parameterisation.html
https://thebuildingcoder.typepad.com/blog/2013/11/placing-equidistant-points-along-a-curve.html#comm...

Also Thanks jeremy tammik for the answers in the comments section!But it didn't work out...
同样感谢 jeremy tammik的绕圈圈的回答,但是没能解答问问题

 

0 Likes
Accepted solutions (1)
1,251 Views
4 Replies
Replies (4)
Message 2 of 5

jeremytammik
Autodesk
Autodesk
Accepted solution

Thank you for your vital question.

  

As we discussed in The Building Coder comments that you point out, I believe that the Revit API does not offer any direct support for this requirement of yours.

  

As I already suggested there as well, a quick approximation could be achieved using the Revit API to retrieve the tessellated curve and determine the approximate real-world partial curve length from the summed-up distances between the tessellation points.

  



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 5

ChengboZhang
Enthusiast
Enthusiast

Thank you very much !

I am concerned about the lack of precision of "tessellated curve", especially if it is very long, then the cumulative error is magnified.

Now I know the Answer is "There is no easy way to get precise split points on a spline". 😂

Thanks again for answer me

Cheers.

0 Likes
Message 4 of 5

ChengboZhang
Enthusiast
Enthusiast

I just read jeremy tammik'' answer on thebuildingcoder:
"You can use ApproximateLength and Length to determine the entire curve length, and I see no corresponding method for a partial length. So, again, step through the curve using a small increment size and sum the distances between the points you encounter. Basically, this is an integration method; you compute the curve length as an integral of the partial distances. I would also suggest testing to see what results you obtain using the Tessellate method. Maybe it returns enough points to provide a quite speedy and accurate integration to determine the partial curve length."

I should really do the test instead of always asking questions at the beginning.  

But I'm not familiar with the API Document, and I've always wondered if the API would solve the problem.
The approach you provide is an alternative to the API.
Thank you for taking the trouble to answer, I'm really impressed.

thanks again.


0 Likes
Message 5 of 5

jeremytammik
Autodesk
Autodesk

Thank you for your update and appreciation. I am glad you see a way forward now. Yes, unfortunately the documentation is almost never perfect, and some experimentation is almost always required with every API to determine exactly how things work and fit with your specific requirements.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes