algorithmic modeling for Rhino
Hi all,
based on the file karamba setup_02_simple parametric truss.gh from the karamba homepage, I am trying to get optimal cross section values for the beams.
Using the OptiCroSec component results in cross section properties being assigned to individual beams. In practice, however, the upper "flange" of a truss is usually made of the same cross section, the same applies to the lower flange and the web.
Does somebody know how I can do the following?
- for each Beam Id group:
- find the optimal cross sections for the individual beams
- take the relevant (=largest) crosss section and assign it to all beams in the group
This screenshot is the result I get with the default OptiCroSect component:
The desired result would be something like:
upper = HEA 320
lower = HEA 180
mid = HEA 140
I experimented with something alon the line "after OptiCroSec: take all beams in a certain id group; find the largest cross section in this group; extract its name; assign this to all beams in this group", but that didnt get me very far and seems a bit complicated:
I am grateful for any ideas how to solve this. Thanks in advance :)
Best regards
Stefan
Tags:
I did the same thing recently for polylines that have been joined in the underlying rhino geometry.
However, currently it IS kind of cumbersome, but it is my request to clemens to implement it in the next release because i most likely is just a few lines of code in the opti-crosssection component.
i could post you a snippet of my definition if you want
best
r
Hi Robert,
thanks for replying.
Parts of your code would be helpful indeed.
Stefan
Finally, I am coming back to this...
I am considering using a scripting componet to achieve the goal described above.
What I have up to now is this:
the above code takes the input as a flattened list and simply prints all list items.
Based on this, I could use a lot of string manipulation to extract the beam and crosec data and use them to define the new beam properties.
But it works only if I run the output of karamba's Disassemble Model component through a note component, which seems to convert the raw data to strings.
If I plug the raw data from the Disassemble Model component directly into my VB script, I get an error "error: Conversion from type 'RawBeam' to type 'String' is not valid. (line: 0)":
What I am thinking about now is
1. are the definitions of karamba's raw data available somewhere, and is the data accessible? I.e. is ther something like beam(2).ID() or beam(2).FirstNode() that I could use directly without having to go through a string?
2. assuming I stick with the string manipulation method: will I ever be able to feed the string I am creating back into the karamba model?
I am aware that all this is sort of unusual...
But I highly appreciate any help, hints, thoughts, ...
Best regards
Stefan
Dear Stefan,
what comes out of the disassemble-component are objects. They can be accessed from any DotNet language like e.g. VB script. You can use Reflector or the like to have a look at the source code which is contained in karamba.gha. If you reference that .dll in an MSVC project there should even be comments/help available.
I plan to integrate the feature with the beam groups in the next release of Karamba.
Best,
Clemens
Just in case somebody comes back to this...
This is what I came up with: a VB scripting component that searches for the largest (=highest) cross section in each BeamID group. For hollow cross sections, this will not work very well, since there are more than one cross section per Diameter - but its a start ;)
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by