SolidLink (CST Studio to Solidworks interface)

CST View

CST View

Sometimes the CAD features in CST Studio can be limiting especially with complex rounding. SolidWorks allows you to draw much more intricate geometries but exporting and importing .SAT files can be irritating, and parameter sweeps become very time consuming.

SolidWorks View

SolidWorks View

This macro links the parameters in CST to equations in SolidWorks and automates the .SAT link between the two programs. With the link established a parameter change in CST (and a history update from the History List diaglogue box) updates the SolidWorks model and imports the new version into CST. This allows parameter sweeps to be performed on models with imported geometries.

Read More

Build master document from child in LyX

When you’ve got a large document with lots of children it’s nice to be able to build the whole document from a child document with one click. You can add some buttons to the standard toolbar to let you do this.

First find this bit of code in $LyX$\Resources\ui\stdtoolbars.inc:

Toolbar "view/update" "View/Update"
   Item "View DVI" "buffer-view dvi"
   Item "Update DVI" "buffer-update dvi"
   Item "View PDF (pdflatex)" "buffer-view pdf2"
   Item "Update PDF (pdflatex)" "buffer-update pdf2"
   Item "View PostScript" "buffer-view ps"
   Item "Update PostScript" "buffer-update ps"
End

Then add these two lines:

  Item "View PDF (pdflatex)" "master-buffer-view pdf2"
  Item "Update PDF (pdflatex)" "master-buffer-update pdf2"

If you want image buttons rather than text, save the two images below to $LyX$\Resources\ui\Resources\images\ (it’s the file name that is important).

Enjoy!

Read More

Plot fields with Vorpal Plotter

It occurred to me that it might be fairly straight forward to plot the fields on top of the block plots. It turns out that it is!

Update

Vorpal Plotter 0.31

  • Interpolates fields and grid bounds to plot them more accurately.
  • Fixed field arrow plots (so the arrows point in faintly the right direction)
  • Fixed some of the over plotting issues. STL and contour are now compatible.
Read More

Lyx reverse search in windows

I’m still using this setup in Lyx 2.0.0 as the method they describe in Help/Additional Features doesn’t take into account spaces in file names. I can’t get the reverse search button to do anything of value either.

I’ve had this working for a while. I’ve not noticed anyone posting about how to use it without cygwin. This works with the standard windows version of lyx rather than the cygwin version. Its a bit of a stupid method with some cludges but it does work fine, its not as neat as the cygwin version (which it’s basically a port of). If anyone manages to clean it up a bit and remove some of the dependancies that would be good.

Read More

Plot 3D blocks from Vorpal .in file (now with .stl files)

Following on from the last vorpal plotter I’ve updated things a bit. Instead of plotting everything in grid coordinates I’ve added a parser and appropriate conversion functions to plot everything in meters.

[scale, distanceOrigin, cellBounds, distanceBounds] = coords.getScales(file);

Where scale is the distance per cell; distanceOrigin is the position of grid position [0 0 0]; cellBounds is the boundary in cells; distance bounds is the same in meters.

Plot of pmlSlab.pre

This is a direct plot of Plot of pmlSlab.in using vorpal plotter.

Read More

Plot 3D blocks from Vorpal .in file

Vorpal lets you define several blocks using upper and lower bounds. Sometimes these are hard to visualise so it would be nice for the computer to do it for you. Sadly Tech-x don’t supply any means of doing this at this time. This is a little matlab script that takes an .in file and plots the blocks in 3D.

Vorpal Plotter

The output for an example geometry (you can see my mistakes).

At this time it can only plot blocks which are defined using coordinates but it could be altered to plot blocks defined using distances also. I’ve used plotcube for the drawing. As vorpal uses upper and lower bounds as opposed to origin and dimensions the coordinate systems need rearranging with bounds.m.

parser.m takes the in file you present it with (which must have been processed by txpp.py) and runs through looking for code blocks who’s type is in plotList (where a block is defined <type name>). It then plots it with the colour in plotColorList.

%set up a list of things to draw and their colors (ignore everything else
plotList = {'ParticleSink'};
plotColorList = {[1 0 0]};

In addition to plotcube the two files you need are in the archive: Vorpal Plotter

Read More