Difference between revisions of "Importing models"
(Created page with "''Importing models'' refers to the creation of model objects based on coordinates and angles computed outside ''Dynamo''. It might also imply the embedding of the resulting m...") |
|||
Line 4: | Line 4: | ||
==With the GUI== | ==With the GUI== | ||
− | + | XXXXX | |
== From the command line== | == From the command line== | ||
+ | === dynamo_model_import== | ||
The basic command is {{t|dynamo_model_import}}. | The basic command is {{t|dynamo_model_import}}. | ||
+ | |||
+ | <tt> | ||
+ | m = dmimport(myFormat,mySource); | ||
+ | </tt> | ||
+ | |||
+ | Here,{{t|mySource}} can be different objects or files that contain coordinates or angles. You specify the format of the source with {{t|myFormat}}. | ||
+ | Different options are | ||
+ | #{{t|'xyz'}} | ||
+ | #{{t,|'table'}} if the input is a table,{{t|'motl'} | ||
+ | |||
+ | |||
+ | === Manual creation == | ||
+ | Alternatively, you can generate a model from scratch and then fill it with coordinates and angles. In this case, you just wirte | ||
+ | |||
+ | <tt> | ||
+ | m = dmodels.general(); | ||
+ | </tt> | ||
+ | |||
+ | This generates a general model where you can store coordinates with method {{t|addPoint}}. For instance, if you have a text file with three columns representing x,y,z coordinates, you can read it and feed the model with: | ||
+ | |||
+ | <tt> | ||
+ | r = dread(someFile.txt); | ||
+ | m.addPoint(r); | ||
+ | </tt> | ||
+ | |||
+ | When you are finished adding points, you close the model with {{t|updateCrop}}: | ||
+ | |||
+ | <tt> | ||
+ | m.updateCrop(); | ||
+ | </tt> |
Revision as of 10:08, 27 April 2016
Importing models refers to the creation of model objects based on coordinates and angles computed outside Dynamo. It might also imply the embedding of the resulting model into an existing catalogue entry.
With the GUI
XXXXX
From the command line
= dynamo_model_import
The basic command is dynamo_model_import.
m = dmimport(myFormat,mySource);
Here,mySource can be different objects or files that contain coordinates or angles. You specify the format of the source with myFormat. Different options are
- 'xyz'
- Template:T, if the input is a table,{{t|'motl'}
= Manual creation
Alternatively, you can generate a model from scratch and then fill it with coordinates and angles. In this case, you just wirte
m = dmodels.general();
This generates a general model where you can store coordinates with method addPoint. For instance, if you have a text file with three columns representing x,y,z coordinates, you can read it and feed the model with:
r = dread(someFile.txt); m.addPoint(r);
When you are finished adding points, you close the model with updateCrop:
m.updateCrop();