Script - Center line to solid

Pavel Yakovlev (Moderator (RUS)) 8 years ago in Scripting 0
Hi there!

Sometimes it happens that you need to create a solid from a center line but you don't have it in explicit form. You have measurements to walls, bottom and roof only which are all different. The solution is to calculate coordinates of the center line according to the measurements. The script is created to solve this problem. The script window is below:

Image 653

Specify your STR file as an input file. Fields X, Y, Z, Join, Left, Right, Up and Down can be defined automatically in case they are named X/EAST, /EAST, Y/NORTH, Z/RL, JOIN, LEFT, RIGHT, UP and DOWN respectively. If they are not defined automatically then choose them by hand.
An output is four calculated fields - Width, Height, X offset and Y offset. Choose them or type new ones. All data from the fields will be required in Mining\Underground Tools\Underground Solid(OBSOLETE) function.

After running the script three new fields, where coordinates of the center line would be stored, will be created. The script always adds these fields to your STR file by adding "_" to them. If they are already exist in the file then two underscores will be added. This is how it is. If you find it inconvenient then it's possible to add entry boxes where you can specify these fields too.

When the script is finished, go to Mining\Underground Tools\Underground Solid(OBSOLETE).

On the Input tab choose fields where calculated coordinates are:

Image 655

On the Profile Shape set all options as you need and do not forget to choose Width, Height, X offset and Y offset fields.

Image 654

I hope that this description of the script is understandable enough, but if you have any questions I am always happy to help out.

P.S.: The screenshots are made in Micromine 2014. Some of them can differ from Micromine 2013.

Download script here: GUI - Underground solid.py

Before running the script on your machine, ensure that you have Python installed because it uses Tkinter module that is not built in Micromine. You can download Python using one of the following links:
  • Micromine 2013 – download Python here.
  • Micromine 2014 32bit – download Python here.
  • Micromine 2014 64bit – download Python here.
  • Not recommended to install several versions of Python on one machine
  • Restart Micromine when instalation process is finished.
If you have any problems, feel free to ask.