CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > ANSYS Meshing & Geometry

[DesignModeler] Scripting a Straight Line

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 24, 2016, 11:11
Default Scripting a Straight Line
  #1
New Member
 
Harry Eggo
Join Date: Feb 2016
Posts: 10
Rep Power: 10
harry94 is on a distinguished road
If I wanted to script a straight line which was say from my last data point in one coordinate file and my first data point in another - how would I do this?

This is the code that I thought would acomplish this but it just produces a line with no point segmenets.

var PF1 = agb.FPoint(agc.FPointConstruction, agc.FPointCoordinateFile);
PF1.CoordinateFile = "C:......";
agb.Regen();

var PF2 = agb.FPoint(agc.FPointConstruction, agc.FPointCoordinateFile);
PF2.CoordinateFile = "C:.......";
agb.Regen();

var LF1 = agb.LinePt();
LF1.AddSegment(PF1.GetPoint(250,2), PF2.GetPoint(1,2));
agb.Regen();

I have (250, 2) because this corresponds to my first ID (which is 250 rows down and 2 columns in) and similarly (1,2).

Can anyone explain a little bit more as it'd help me understand what is going on behind the scripting, thank you!

EDIT: Additional question - Is it possible to use the get point feature on a curve so I can sketch a straight line from the start of one curve to the end of another?
harry94 is offline   Reply With Quote

Old   August 24, 2016, 19:08
Default
  #2
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14
Kapi is on a distinguished road
never scripted for 3d plane before so I cant help there.
But i m sure you can create straight line from one curve to other with the help of coordinates of both ends
Kapi is offline   Reply With Quote

Reply

Tags
scripting line segments


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' muth OpenFOAM Running, Solving & CFD 3 August 27, 2018 04:18
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 02:09
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 01:27
[Gmsh] boundaries with gmshToFoam‏ ouafa OpenFOAM Meshing & Mesh Conversion 7 May 21, 2010 12:43
[Gmsh] GMSH and OpenFOAM derath OpenFOAM Meshing & Mesh Conversion 44 September 4, 2008 05:09


All times are GMT -4. The time now is 14:51.