Click here to Skip to main content
15,891,708 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
When I add a curve with an array of points the point are multiplied.
Dim Temp_Pts_Orig23 As New List(Of PointF)

For Each Move In Code_stripped
Dim Temp_Point23 As Point3D = New Point3D(0, 0, 0)
Temp_Point23 = New Point3D(Move.X_point, Move.Y_point, Move.Z_point)
Temp_Point23 = Temp_Point23.RotateX(X_Rotate).RotateY(Y_Rotate).RotateZ(Z_Rotate)

Next
Colour_Path.AddCurve(Temp_Pts_Orig23.ToArray()) 'Array of 32 points

But when array count is done after there are 93.
Many Thanks

What I have tried:

This only happens on curve and not on addlines. I have tried flattern to get the 32 points (approx) but this will mess up all the other arrays which are working in tandem.

Also tried :-
Colour_Path.AddCurve(Temp_Pts_Orig23.ToArray(), 0.0F, Temp_Pts_Orig23.Count - 1, 1.0F)


Is there a way of stopping this & give me what I need?
Posted
Updated 9-Aug-17 23:09pm
v3
Comments
Ralf Meier 8-Aug-17 6:02am    
What is 'Temp_Pts_Orig23' as kind of type and what is the content of it ?
Knight school 9-Aug-17 3:40am    
Sorry I should of added more detail.

Dim Temp_Pts_Orig23 As New List(Of PointF)
Ralf Meier 10-Aug-17 2:57am    
Sorry ... that doesn't help me much ... Show the complete code of your method (use 'Improve question' to add it) and tell when this method is called ...
Ralf Meier 10-Aug-17 5:42am    
OK ... I will be a little more specific :
I have seen that you added a code-snippet to your question.

You created a new type Point3D which has a X,Y and Z-value. 'Temp_Pts_Orig23' has the type PointF which has only a X and a Y-value.
So how are those 3D-Coordinates translated to a 2D-Coordinate ?
Give a sample of the Content of your List(of PointF) - whatever this list contains will be directly (without any multiplyings) converted into an Array with the ToArray-method.

Please remember : what you are doing is completly abstract for me - I can't see what you see and I can't read in your mind ... so you should give a little help if you want some help ...
Knight school 10-Aug-17 6:06am    
Hi,
The Point3D converts X,Y,Z points to 2D points so it can displayed on screen. Which works very well & the point count is OK (32 points in & 32 points out). The problem really lies when add the array to the graphicspath (add curve only). I add 32 points & when I do graphicspath data point count it is 93. So when I want to use a tandem array with other info which is no points (color etc.)the counts get out of sync.

I hope this helps understand the problem I am having.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900