persistent_id is not persistent

Found a bug in SketchUp? Report it here

persistent_id is not persistent

Postby arion » Sat Mar 03, 2018 7:24 am

If you draw two lines (line A and B) that are connected at one point(point P) the persistent id on this point is:
because you're referring to the same point.
Now if you put one of the lines in a group the point P has now two persistent ids. This should be named just id because its not persistent.


Re: persistent_id is not persistent

Postby TIG » Sat Mar 03, 2018 10:41 pm

Your are perhaps confusing 'vertex' and 'point'.
An edge has a start vertex and an end vertex.
This vertex can belong to more edges depending on the 3d geometry, and context arrangements.
A vertex has a 'position' which is represented by a 'point' in space.

In newer SketchUp versions an Entity has a persistent_id.
A 'vertex' is an Entity.

If you move a vertex in space its 'position', and therefore its 'point', can change, but its persistent_id remains intact.

If you have two edges sharing a vertex, then that vertex is a single entity, and has one persistent_id.
But if you subsequently separate the two edges into different contexts - e.g. one is now moved inside a group - those two edges have been changed and each now has a separate vertex where they shared one, the vertex that stays in the original context might be expected to keep the persistent_id, but the one that is now inside the group's context is in effect a new vertex and gets its own unique persistent_id.

If SketchUp did not do this, then chaos would result with persistent_id's !

You can track your edges by persistent_id as these move en mass into any new context - with their vertices can get recreated when shared ones get split-off in this way.
Use a persistent_id for each edge and reference its start/end vertices etc...
The edge will keep its persistent_id, but some vertices might not...
User avatar
Global Moderator

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Ad Machine 


Return to SketchUp Bug Reporting

Who is online

Users browsing this forum: No registered users and 3 guests

Visit our sponsors: