Page 1 of 1
Model generation in separate files
Posted: Tue Aug 29, 2017 6:52 pm
by guillermoyr
Hello everyone! I am currently working on a parametric model generation project. Specifically in steel connections. To do this, I made a problem type that generates these models from a database (.xml) which contains the geometric properties (width, height, thickness, etc.) of the elements of the connection such as columns, beams and welding.
However I realized that doing this sequentially would have many problems if you want to parameterize, because working with many points, lines, areas and volumes in the same drawing is a disaster.
What I would like to know is that if GiD can work with separate files (column.gid, beam.gid, welding.gid) to generate the geometries with a "slave code" taking its properties from the .xml file (separately) and then assemble all these elements and get the Connection using a "Master Code".
Thank you very much!
Re: Model generation in separate files
Posted: Thu Aug 31, 2017 6:18 pm
by escolano
You can add a model to another previous model with
Files->Import->Insert GiD model
(entities of the second model are renumbered, avoiding repeat identifiers)
Re: Model generation in separate files
Posted: Mon Sep 04, 2017 10:38 pm
by guillermoyr
escolano wrote:You can add a model to another previous model with
Files->Import->Insert GiD model
(entities of the second model are renumbered, avoiding repeat identifiers)
Thank you for answering!
But there is a problem. What i'm trying to do is to generate automatically those models and I was looking for a solution that doesn't involve manual work, only code. Yes, I want to insert the connection elements in a new project file called "connection.gid", but those elements never have the same geometric properties, because I'm changing its parameters.
Here's a screen capture of my data tree
When I change "column section" or "beam section" fields, the models generated are the following:
My current code creates the connection sequentially, but I would like to make this easier (for the reasons exposed above) and generate the elements separately using a "slave code". It is possible? Maybe using several .tcl files?
Thank you again!
Re: Model generation in separate files
Posted: Wed Sep 06, 2017 6:18 pm
by escolano
You can automatize tasks without user intervention
e.g.
to do the same that manually from the menu: Files->Import->Insert GiD model
must do it with the GiD_Process Tcl command
GiD_Process Mescape Files InsertGeom $filename.gid escape
Information of groups (entities associated to a group name) is also imported by "Insert GiD model",
if your model has the appropriated groups then applying the conditions on it could be simple
Layers information is also imported. It could also aid to apply your boundary conditions, but groups data is better for this purpose
You can also write a batch file with the GiD commands to be processed and read this batch file.
Re: Model generation in separate files
Posted: Wed Sep 06, 2017 10:12 pm
by guillermoyr
escolano wrote:You can automatize tasks without user intervention
e.g.
to do the same that manually from the menu: Files->Import->Insert GiD model
must do it with the GiD_Process Tcl command
GiD_Process Mescape Files InsertGeom $filename.gid escape
Information of groups (entities associated to a group name) is also imported by "Insert GiD model",
if your model has the appropriated groups then applying the conditions on it could be simple
Layers information is also imported. It could also aid to apply your boundary conditions, but groups data is better for this purpose
You can also write a batch file with the GiD commands to be processed and read this batch file.
Thank you so much, Escolano!
Greetings from Mexico!