FoamBlade Command Reference-FoamBlade 0.03
This Document contains useful commands for the FoamBlade interactive session. Only QuadColumns (Quads) and DoubleColumns (Doubles) are covered.
Note that PathContainer commands fit for Quads as well as for Doubles. That means that you can call for example X.writeToFile('filename') where X can be a Quad or a Double.
contains Standard methods for it's subclasses
This means for you: Quad(arg) or Double(arg) create a new container by reading for example from a filename, a list or another PathContainer.
Eats filenames, ContentLists,other PathContainers, 'edit' and 'empty'
calls an external editor (gedit) if no other argument is given
Uses an external editor to edit thefile represetatation of the path.
If you want you can give the editor to use as argument, maybe 'kwrite'.
Return the underlying content List of the container
prints and returns the Filename the Path was read from
uses the filename that was given tothe interactive session, to save it back
print information and the contentList
reverse the complete Path
uses the filename the path was readfrom, to save it back
A List with two values -> twocolumns
Fits to most standard foils.
Alias name is Double
remove two following lines that are
tries to compose Quad from two
different shaped Doubles
Does a spline Interpolation to create two doubles with
the same point amount and merges them together to a quad.
The quad is returned.
A known problem is that both sides don't synchronize well,
when the Doubles differ much in their spape. The Doubles are
equalized over their length and then put together. A possible
Trick is: scale one Double in one direction, merge the quad
and scale the direction of the side you scaled before back to
the correct size.
returns a QuadColumn
The Quad has the Double on both sides.
convertToQuadColumn =convertToQuad( )
returns Length of the path in mm
merges two doubles with the same
length and returns a QuadColumn
call the pyton lab viewer
Scale the Double with xs and ys in x
and y direction.
returns a new approximated double
the point density is equalized
uses the built in viewer to open the quad
Quad = classQuadColumn(PathContainer)
A List with four values -> four
Represents a synchronized cut Path.
Alias name is Quad
Python Visual Viewer
be warned due to an unkown problem
ViView exits the comlete session after closing.
addOffset(x, y, u, v)
Shift: Add an constant offset
use a machine that has more width than the block you want to cut test it (theoreticaly it works:)
Unimplemented: Speed adjustion: the cut speed at the block ends will be slower than the choosen speed.
remove two following lines that are
returns two doubles
returns an interpolated StepList in
displace path : Burn away correction
returns the new quad
Better Algorithm needed.
-makes problems at small diameters
that should be shifted to inside
-begins to displace in the direction
that is at the top if a positive displacement is choosed
returns the object sizes in mm
return Length of both pathes
test it/fix it
do not use directly
flip xy and uv
mirror vertical at x and u
mirror_xu(0,0) : mirror vertically at
mirror horizontal planes at y and v
mirror_yv(0,0) : mirror horizontally
use pyton lab viewer to open the quad
repeatQuad(n, x, y, u, v)
repeats the quad n times by adding the
offset xyuv every time
the new quad is returned
rotate(xorgin, yorgin, uorgin,vorgin, xyangle, uvangle)
rotate around the given orgins
scale(xs, ys, us, vs)
Scale the Double with in x,y,u and v
setOffset(x, y, u, v)
shifts the begin of the quad to offset
shifts the begin of the quad to zero,
it can also shift only one side
side= [ none | 'xy' | 'uv'| 'xyuv' ]
returns a new interpolated Quad with
point density using "amount=..."
to use it a linear interpolation provide
degree=1 as parameter
split into returned quads
uses the built in viewer to open the
You don't need a path Container to call this funcions, although these might return a Path Container
notches(width, depth, num)
creates num notches that are width away from each other and
with depth of depth.
returns Path as Quad
There are also other Examples in the UsageHowto.
This example session cancels 5% from the rear part of a foil and scales it back to the original size. Then it is scaled and pepared for cutting.
* starting interactive Foamblade session *
# 95% Trick
read data file with 160 enteries
>>> ee=e.splineApprox() ##ee has now 1000 enteries
>>> s=Quad ( ee.getContentList()[25:975] ) #this is python Magic to throw the first and last 25 lines away.
object size: 94.9384400465, 9.99987507397, 94.9384400465, 9.99987507397
overall both sides: 94.9384400465, 9.99987507397
object size: 100.0, 10.5330096735, 100.0, 10.5330096735
overall both sides: 100.0, 10.5330096735
object size: 210.0, 22.1193203143, 105.0, 11.0596601572
overall both sides: 209.994736025, 22.1193203143
object size: 210.0, 22.1193203143, 265.0, 11.0596601572
overall both sides: 210.0, 22.1193203143
object size: 211.062809752, 24.119319957, 265.916130295, 13.0596597999
overall both sides: 211.062809752, 24.119319957