![]() update call on a previous line before you call factory.getCreatedObjects(), something like this instead (and also be modified to deal with the ObjectList that is returned from getCreatedObjects(), you are treating it as a single object being returned rather than an object list), something like: So your code would need to be changed to have the. That's different than factory.calculate() - calling factory.calculate() does directly return an object list to the caller and generates "loose objects" which are not yet part of the geometry database main object list of objects to draw and save in the file and so forth. If you then want to get at those created objects you need to call factory.getCreatedObjects(). The problem here is factory.update() does not return anything directly itself, it just causes the geometry factory to calculate the objects and update the factory's own internal lists of objects for what was created. > objectstojoin.addObject( FactoryLine.update().getCreatedObjects() ) > objectstojoin.addObject( FactoryAirfoil.update().getCreatedObjects() ) Hi Hamish, to put in a code block here in the forum use make sure you're not using something like instead. Most things in the current scripting environment are heavily oriented towards creating things in the same way as a regular command would, basically by setting some options and then having the objects show up on screen, so usually a regular MoI command just calls factory.update() and does not deal with the generated objects directly itself after that. You can call these if you use factory.update() - the call to factory.update() will generate objects and put them into the GeometryDatabase automatically, if you then want to get a hold of an object list of what was actually generated then the. > use or am I barking up the wrong tree? Where might they be used anyway? The GeometryDatabase is not something you create yourself, it's basically the master list of all objects in the model, for example when the screen draws it's every object in the GeometryDatabase that gets drawn. > I just don't have a grasp on the construct of a GeometryFactory vs a GeometryDatabase.Ī GeometryFactory is something that you use to generate objects, it has inputs that can be set on it, and then for regular commands a call to factory.update() will cause the factory to generate objects and put them in the GeometryDatabase. I'd like to change how this works in the future so as not to have this requirement but it will take some work since some parts of object serialization and deserialization are based off of a unique object id number that is set when objects get added to the geometry database. These objects currently have to be added in to the geometry database in order for them to be used as inputs to an async factory and Join is one of these types of factories. You get a "loose object" if you use factory.calculate() to generate it. One thing you might be running into is if a factory does asynchronous object generation (meaning it actually does its calculation in a separate moi_commandprocessor.exe process, generally used for possibly long running calculations) the inputs you give to it need to be active in the geometry database and not a "loose object" that has just been dynamically created but not added to the geometry database yet. I'm not sure it's even possible, or a correct approach. > a GeomObject object for the join factory. ![]() > I got stuck trying to get (convert?) the ObjectList objects from an interpcurve factory into > working yet - I just don't have a grasp on the construct of a GeometryFactory vs a I also played with joining a line segment to a curve, before each is committed - it's not
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |