How to connect Matlab to Rhino/grasshopper or autocad?

Discussion in 'Software' started by valefrisbee, Nov 5, 2012.

  1. valefrisbee
    Joined: Dec 2011
    Posts: 5
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Italy

    valefrisbee Junior Member

    Hi all,
    I'm a student and I'm working on a keel optimization using a Genetic algorithm.
    I would like to use the GA of Matlab and modify the geometry in rhino (also maybe with grasshopper) or Autocad.
    The GA will generate the parameters that I want to modify, after that I need to send it to Rhino/grasshopper, where I can change the geometry, close all surface and send to the CFD solver, analyze the result and start a new cycle.

    I've some problem to connect Matlab with the Cads.

    I've tried some different working line:

    1) generate the paramaters with the GA, create the point of the surface in Matlab, open Rhino,
    try to start a rhinoscript that will import the point, generate the surface, close it and export and Iges

    2)generate the params with the GA, try to send it to Grasshopper, use that parameters to modify the already created geometry, export the iges

    3) like the 1) using Autocad instead of Rhino

    My Problem is:
    work line 1) I can open Rhino from matlab, but i can't run the rhinoscript
    work line 2) I don't know how to send the parameters to grasshopper and open the grasshop file (I can open the Rhino's file, open grasshopper and nothing else)

    Anybody have already done it? Or have an idea how to do it?

    I've seen some works done with Catia and ModeFrontier but i don't have those program (and don't know how to use them).

    And I think I can't bypass the Cad program, because i need to create a closed surface to send to the Cfd solver.

    Thanks, and sorry for my bad english.

  2. DCockey
    Joined: Oct 2009
    Posts: 5,211
    Likes: 611, Points: 113, Legacy Rep: 1485
    Location: Midcoast Maine

    DCockey Senior Member

  3. valefrisbee
    Joined: Dec 2011
    Posts: 5
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Italy

    valefrisbee Junior Member

    thanks DCockey,
    I've already searched in some forum (matlab, rhinoscript, grasshopper), and I found only people asking the same things, but with no answer...
    Like in the forum that you suggested to me.

    thanks anyway.

  4. sottorf
    Joined: Sep 2007
    Posts: 192
    Likes: 20, Points: 0, Legacy Rep: 202
    Location: South Africa

    sottorf member

    Hi Vale,
    I am afraid you could struggle a long time with Rhino. My experience is that Rhino does not make good surfaces for CFD. The edges are never closed and always require manual finishing to get things working.

    If you are goingto optimize, I propose you contact the people at Friendship Systems THey have an optimization tool for CFD worked out (Framework) and for academic purposes you can get it very cheaply.
Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
When making potentially dangerous or financial decisions, always employ and consult appropriate professionals. Your circumstances or experience may be different.