|
[Sponsors] |
August 24, 2016, 11:11 |
Scripting a Straight Line
|
#1 |
New Member
Harry Eggo
Join Date: Feb 2016
Posts: 10
Rep Power: 10 |
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? |
|
August 24, 2016, 19:08 |
|
#2 |
Senior Member
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14 |
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 |
|
Tags |
scripting line segments |
|
|
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 |