-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Polyline problem calculating s in long distance #12439
Comments
When building a polyline, the shortest length of the line segment is calculated, and then the length of each segment is equal to how many minimum lengths n*a (Math.ceil) are calculated, and the s value of each vertex is determined For example, if there are 3 points (two segments), the first segment is a and the second segment is 1.5a (Math.ceil(1.5) = 2), then the first point has an s value of 0, and the second point has an s value of 0.333, and when rendering, s=0.5, the rendered red-green dividing point position should be to the right of the midpoint, not the midpoint. You can draw it on paper and you'll understand. According to the debugging results of the example, there are 76 points in the example, and the shortest length is 88, and according to the length distribution result, when s=0.5, the red-green dividing point is not in the center of the segment |
ok, but this is troublesome if you want to use the info st.s to draw arrows with the same size : the sandcastle : |
What happened?
When you create a long polyline, the st.s at 0.5 is not the middle, you can see the example in the sandcastle
Reproduction steps
Sandcastle example
https://sandcastle.cesium.com/#c=7Vn/b+O2Ff9XBP9kYx7D76Sc9LZb2rt1WHvD5VAMmIdWselEmC0Zkpw7X5H/fY+kKJOyE9x+H4u2Ft+Hj+87H5mnosmeSvPZNNl3WWU+Z7emLQ879Iubmy4nK/d9W1ddUVamWU5m18tqWT3BunZlKgPL/HrkPh3x6ip7d6hWXVlXWVdnbfFksu7RZKtiZ5oia7uiM8tqEyCWfutId5YynWW/L6ssW9VV2/VrHAG2coQs29dtaZcuwt4ehcI8Wm3rChjNPXxdNmZ1CT8QRgsO+zHysB9BmvLhsRuj3GQCfL4OqtRbg7b1A5jU65p5ne5A+fViOZlnf7v78DNqu6asHsrNcRopPps5Lo3pDk0VWwSmn3uD3zbGstvX2+MWHJU9mHpnuuboXTVMJ07+Rz/7vsdOnXmDEdtFwN0WTQe/ioqhTVPvvjcPjTHt26Ypjn81VuV2uqz+xSjKc4FPQ8w5RoRqLE5jTghjGgk5ZwxhTKPh0CxlY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LamUWmGierb24VbB9YRA1ypziVVOe64giuQYdrMkTSQVzHJ1QR4zxlQSwSV0SrkkkhMtThLn0hKJa8F4LsTAmrq9KIHuEOQS9Nlmyl1RrVdF20HEQ2n8VNfb+6L5y6Hr6grC33nPu8a+og+hGgrG2HWQbGel5Tqu3h+jNHCLR/Hwujhh9SsSlZtsOpZqFmL8ldze1tAKXfxbwRm3cKBeyNczrIM+ZwZq/2Uhfq4TC3ijIP+XIHcu97b7ls2y68l8ctN2x615E3L1z+VuXzdddmi2U4SuOrPbbwHbXt0fVv8xUDnbNuhzcxUvvVmXT1m5/u7CX6my1bZoW6BsDtvtXfnVLCdvbq4Af7bUWhXM+AFa9m1xtLBH8ubvfhIhdHMFn5dXdt71I87/BQ
Environment
Browser:
CesiumJS Version:
Operating System:
The text was updated successfully, but these errors were encountered: