Probably, the OP, whant to make something like.
- Store an object shape () in his case only some edges that e want to modify
- operate on the shape, modifying it as needed
- have the ability to "recover" the original shape
- apply new modification to the old shape
Or similar thing, like storing some "position" on the original shape and apply modification to the same positions, when as example a dims is changes.
He was speaking of joints, I have in mind some like you want to model say a rod and apply some modification to an edge, but if the rod is changed (maybe modify only the length or the diameter), store edges and apply modification to "same" edges of the new object.
In this case, the problem is to determine a proper position as edge number could change.
For this a simple object in my opinion is not sufficient.
You have to script a whole new object class that could build and object and store "joints position" in a manner that it could survive some shape modifications, in other word, even if it is a simple "tube" you have to store "building parameters" and "joints positions" and rebuild the whole object if something is changed.
This is derived from the analysis of the code he posted:
Code: Select all
class Revolutepin:
def __init__(self, obj, label, node, reference1, reference2):
...
He is storing reference1 and reference2 as a way to retrieve the "joint positions" based on "edge number" on the original shape.
maybe using some mean to store a relative position in respect of the center of mass, wil make something useful, but the shapes should be simple shapes, where some reference like "N", "NE" or similar could have sense.
if you think of doing some joints to a rod that is a cylinder, and then modify the rod shape to a "hexagonal rod" you could have some idea, the edge count is very different, but some "N", "S", "E", "W" positions could have a logical mean.
Different thing would be if you want to generalize things, and use maybe a figure similar to the image posted, where maybe if this something that resemble a "modified cube" with six faces, maybe slanted it could have even a sense, but if you modify a face to have say a protrusion, edge count and position is not helping a lot.
So a sort of abstraction or categories of shapes has to be done to have a mean to have a "predictable joint position" when altering "base shape", simply storing edge reference will not be enough.
Hoping have not guessed things wrong.
Regards
Carlo D.