On 30/06/2015 at 06:03, xxxxxxxx wrote:
Cinema 4D Version: R16
Platform: Mac OSX ;
Language(s) : C++ ;
Got a short question:
How does one get the writeable edge array?
It seems like the answer will be a lot longer than my question
It's easy to store the writeable points array in a vector, with GetPointW(), but for edges, there seems to be no such function.
Should I convert my selection from edge to point, and work on my points? And if so, how should I do that?
Thanks in advance for your help and time!!
On 30/06/2015 at 06:59, xxxxxxxx wrote:
You are on the correct path. Edges are inferred by the relationship of vertices in polygons and do not exist outright as a thing. It would be best to get your edges and you will be updating their corresponding vertex pairs. Note that edges sharing a vertex will need to be considered. If you update a vertex for one edge and then update the same vertex for another common edge, you will get twice the effect.
On 30/06/2015 at 07:06, xxxxxxxx wrote:
Thanks for your answer!
And, I allready had in mind that it could give weird problems with common vertices in edges, but I change all my edges at once, so that shouldn't be a problem.
With kind regards,
On 01/07/2015 at 01:23, xxxxxxxx wrote:
as pointed out by Kuroyume there is no explicit data structure for edges. To handle edges you can use the Neighbor class; an example of its usage can be found in the Atom Object example.
On 01/07/2015 at 02:17, xxxxxxxx wrote:
I can't see how this would help me :s
I need to get the vertices attached to the selected edges, but, if I have one edge selected, I can't get that points with the Neighbor class, right?
The Neighbor class only gives me access to polygons, doesn't it?
Thanks for your help and time!
On 02/07/2015 at 01:29, xxxxxxxx wrote:
using the Neighbor class you can loop through all edges, check if they are selected and then handle the vertices that define a given edge. See the example in PolyInfo Struct Reference.
On 02/07/2015 at 08:12, xxxxxxxx wrote:
So, if I had multiple edges sharing the same point, this could give me a huge problem, right?
Isn't it easier then to convert the selection with a modelingCommand? This would also allow me to do that on ALL my objects, instead for each object.
On 03/07/2015 at 07:24, xxxxxxxx wrote:
It seems like the easiest way to do this was with a selectionChanger, the solution can be found here:
Another way around was temporarily converting the edge-selection to a point-selection, then adjust the points, and convert the selection back. That solution can be found here:
I won't look any further into the Neighbor class right now, because my problem is fixed.
You can mark this thread as solved!