CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   ANSYS Meshing & Geometry (http://www.cfd-online.com/Forums/ansys-meshing/)
-   -   Scripting API Design Modeler - Spline (http://www.cfd-online.com/Forums/ansys-meshing/82099-scripting-api-design-modeler-spline.html)

mieszko1st November 16, 2010 16:57

Scripting API Design Modeler - Spline
 
Hi
Need some help in Ansys Design Modeler scripting API. The goal is to write a script, which draws a spline using control points. According to DM API manual following functions are available : SplineXYW(x,y,weight), SplineKnot(knot), SplineCtrlPtEnd(beginParam, endParam, order, closed, rational, periodic)
I wrote some simple script,

Code:

  p.Sp7 = SplineBegin();
    with(p.Sp7)
    {
      SplineFlexibility = agc.Yes
    SplineXYW(0.0,0.0,1);
    SplineKnot(0.33);
    SplineXYW(0.5,0.7,1);
    SplineKnot(0.55);
  SplineXYW(0.9,0.4,1);
    SplineCtrlPtEnd(0.0,1.0,4,0,0,0);
    }

but the design modeler crashes after running the script. I guess that the functions or parameters in the script are wrong or not sufficient, causing the program to crash.
Do you have any experience in writing such scripts ? Any idea of correct syntax to draw a spline based on control points successfully ?

Thanks for any help
MM

fedefrance February 27, 2014 12:13

I have the same problem, did you find a work around?

mieszko1st March 1, 2014 08:30

I gave up modelling the geometry in Ansys Design Modeller and eventually imported geometry from external 3D modelling software (Pro/Engineer).

fedefrance March 3, 2014 06:09

Ok, thanks

I wil try to give the geometry by points and then let the design modeler interpolate. Something like what is explained here http://www.youtube.com/watch?v=6wQPeBpvwCk


All times are GMT -4. The time now is 16:24.