Minimum length of a curve

Minimum length of a curve

jeroen.vanvlierden
Enthusiast Enthusiast
1,160 Views
1 Reply
Message 1 of 2

Minimum length of a curve

jeroen.vanvlierden
Enthusiast
Enthusiast

I am writing a program that creates Stucco walls in Revit. The height (or z-coordinate) to where the stucco goes is always the highest point in the room, at a given (x,y) coordinate

jeroenvanvlierden_0-1639491532288.png

I calculate the points by creating 3d curves from (x,y) segments in the room. The algorithm seems to work quite nicely, however, if I try do do it more accurate I get an exception. It seems to have to do with the length of the curves

Does anyone now if there is a minimum length for curves when you use and IList<Curve> with the call Wall.Create

 

This works:

xyz: 13,94 23,37 19,72 xyz: 24,62 23,37 19,72 length: 10,6800841582423
xyz: 24,62 23,37 19,72 xyz: 24,62 23,37 28,31 length: 8,59580052493438
xyz: 24,62 23,37 28,31 xyz: 21,28 23,37 28,31 length: 3,33752629945071
xyz: 21,28 23,37 28,31 xyz: 21,11 23,37 28,31 length: 0,166876314972534
xyz: 21,11 23,37 28,31 xyz: 20,94 23,37 28,22 length: 0,191533404495919
xyz: 20,94 23,37 28,22 xyz: 14,27 23,37 22,42 length: 8,8445314248311
xyz: 14,27 23,37 22,42 xyz: 14,10 23,37 22,27 length: 0,221113285620777
xyz: 14,10 23,37 22,27 xyz: 13,94 23,37 22,16 length: 0,202839691919588
xyz: 13,94 23,37 22,16 xyz: 13,94 23,37 19,72 length: 2,43888602246705

 

and this fails

 

xyz: 13,94 23,37 19,72 xyz: 24,62 23,37 19,72 length: 10,6800841582423
xyz: 24,62 23,37 19,72 xyz: 24,62 23,37 28,31 length: 8,59580052493438
xyz: 24,62 23,37 28,31 xyz: 21,20 23,37 28,31 length: 3,42096445693698
xyz: 21,20 23,37 28,31 xyz: 21,11 23,37 28,31 length: 0,0834381574862668
xyz: 21,11 23,37 28,31 xyz: 21,03 23,37 28,29 length: 0,0861575355274924
xyz: 21,03 23,37 28,29 xyz: 14,19 23,37 22,34 length: 9,06564471045188
xyz: 14,19 23,37 22,34 xyz: 14,10 23,37 22,27 length: 0,110556642810389
xyz: 14,10 23,37 22,27 xyz: 14,02 23,37 22,20 length: 0,110526557850615
xyz: 14,02 23,37 22,20 xyz: 13,94 23,37 22,16 length: 0,0937858051233761
xyz: 13,94 23,37 22,16 xyz: 13,94 23,37 19,72 length: 2,43888602246705

0 Likes
Accepted solutions (1)
1,161 Views
1 Reply
Reply (1)
Message 2 of 2

RPTHOMAS108
Mentor
Mentor
Accepted solution

Some of your lengths are significantly different in the second set from those in the first.

 

Therefore if you think it is about accuracy then it is likely instead about units, you should be working in decimal feet.  The same two lengths or indeed input ordinates shouldn't have a significant difference to the left hand side of the decimal place and some appear to.

 

Check lengths against Application.ShortCurveTolerance which is also in feet.

 

Hard to know how to compare the two sets when you have 9 points in the first and 10 in the second.

0 Likes