Select to view content in your preferred language

I'm having some trouble with ce.getVertices(), now with even more pictures

749
0
08-01-2016 08:59 AM
LR
by
Frequent Contributor

I'm trying to read the vertices of some shapes I created in ArcMap (imported from GDB) and in CE. On some shapes, the reading fails consistently, returning "None". On some, it works sometimes. This changes usually after a CE restart. What could be the reason?

These are the shapes; blue = imported, yellow = drawn in CE:
vert_01.png

Shapes that consistently don't work:

blue:

- pacman

- rightmost C shape

yellow:

- northern yellow building footprint (traced from blue + moved)

- two rightmost C shapes (both freehand)

Works always so far:

blue:

- northern building footprint

- leftmost round and rectangular shapes

yellow:

- pacman (traced from blue + moved)

The others can be read sometimes, sometimes not.

Furthermore, sometimes, usually when the shape is hand-drawn or imported, I'm getting a pretty weird (but at least consistent) reading order for the vertices. The first vertex (actually the second, since 0 is the first) is listed first in the array, then comes the 0th, then the leftover vertices are listed bottom up / counterclock-wise (last vertex = 3rd position). What's up with that?

vert_02.png

Attached you'll find a sample project (v. 2016) containing the shapes and script/rules I wrote.

===============

/EDIT:

I made some progress, the permanently and sometimes "None" shapes can be read this way:

  1. select shape with model
  2. delete models, turning the display off doesn't work (sometimes this is enough --> run script, otherwise keep going)
  3. deselect, select again
  4. run script

Now this is curious: when you generate the models afterwards and select the shape with the model on it again, the script works with models on as well.

As for the vertex part, when you write exactly the same vertices back you read, the vertices are numbered as expected ( 1 = 0), but the face is flipped. When you read and write the vertices back another time, they return to the original configuration.

vw___0000_0.png

vw___0001_1.png

vw___0002_2.png

However, this problem never occurs with programmatically created shapes, as they already have the expected vertex numbering:

circ___0000_0.png

circ___0001_1.png

0 Kudos
0 Replies