algorithmic modeling for Rhino
Hi!,
We are finding that some students are "copying" the work of past courses in some exercises that we propose. The first measure has been changing the exercises for the next courses but for the time being we need to deal with the copycats.
We want to check automatically if there is any geometry literally identical between models. As fas as I know ObjectID are created for every object and are totally different, so if someone opened an old RH file and work over it keeping geometry, we could detect comparing IDs if the work was copied or not. If the student copies from one file to other, I suppose that the IDs are refreshed and our work is going to be harder (checking geometry measures, etc), but at least in some cases, just importing the files in gh and creating a set per file and checking ".isdisjoint()" between them should do the work.
So, here is my request/question, could it be possible to get the original objectIDs from the referenced *.3dm files?
If there is no easy solution I will return to plain python scripts over Rhino, but first I wanted to check if there is any chance to do this using GH.
Thanks in advance.
Best Regards.
Tags:
I'm a bit confused. How is the geometry imported? Using the Import 3DM component, or as referenced geometry via parameters, or...?
Using the import component to be able to load different files at the same time and check which of those files uses geometry that is in other one.
The problem is that when importing GH creates new IDs for the objects to be able to deal with them in the GH context. What I want to know is if there is any chance to get the original ObjectID stored in the RH file.
Thanks for the fast reply.
Checking IDs is pretty trivial, but Grasshopper doesn't have IDs associated with its geometry. I mean sometimes it exists because the geometry was referenced from a 3dm file, but GH doesn't enforce this.
Rhino object IDs persist during save/open but they can indeed be mutated when a file is imported. Certainly geometry that get baked again will have different IDs.
It sounds like the most useful thing to have here is to compare actual geometry. Bounding boxes, key locations on the shape, topology. We have reliable comparison algorithms (SelDup relies on them), but I don't know if they are available in the SDK. I'll ask during the mcneel dev meeting tomorrow.
Thank you so much :) I will use the python code in rhino then, waiting for your information about better tools to compare geometry between files.
The thing is that what people are giving us are Rhino files with just Rhino geometry. The GH stuff only relies on me, trying to find a good way to find copycats in an easier way than checking one object at a time in rhino. So I'm trying to develop a tool that makes my work a little bit easier.
The ideal workflow:
Step 1: Use GH to read different 3dm files at once and store objectID in different Data Paths.
Step 2: Create one set per data Path and check is there is any coincidence between values in those sets.
Step 3: If any value is coincident print the ID, files from where it is loaded, etc.
I got all the three steps already, the problem was that the component that imports Rhino geometry doesn't keep objectsIDs from the original file. And that was why I started this post.
I don't know if I've explained myself properly this time :P
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by