CreateMultipleSurfaces.vbs
Description
This
script creates multiple surfaces from a large selection of lines. It will create triangular surfaces from 3
lines where possible first, then it will create quadrilateral surfaces from 4
lines. The script will avoid creating
coincident surfaces and will check for the presence of triangular surfaces
before creating a quadrilateral surface coincident with existing triangular
surfaces. This is particularly useful
for creating multiple surfaces quickly where geometry from a CAD package has imported
just as a frame of lines and points. It
can also be useful for reconstructing surfaces that have been deleted to
resolve connectivity problems in the underlying points and lines.
Where
three lines would create a zero area triangle, the script will add these three
lines to a group “LinesBridgingAnotherPairOfLines”
and will refrain from trying to create a triangular surface from these lines.
Speed
The
default behaviour is that the script will create both triangular surfaces and
quadrilateral surfaces and it will avoid create them in the same space to an
extent. However, mainly to improve
speed, if you wish to turn off the creation of triangular surfaces, set “CrtTrnglSrfcOptn”
to 0 or if you wish to turn off the creation of quadrilateral surfaces, set “CrtQudrltrlSrfcOptn”
to 0.
If you
just select lines that will create triangles only it will take longer, or just
select lines that will create quadrilaterals only, the script will be quicker
than for a mixture. For example,
a) Creating only quadrilateral surfaces from 100 lines (2D grid
with 58 points creating 43 surfaces) may take 2 minutes with the default
settings. If the option to consider
creating triangular surfaces is turned off, this same grid of lines may be of
the order of 25% quicker.
b) Creating only triangular surfaces from 100 lines (2D grid
with 42 points) may take 12 minutes. If the option to consider creating quadrilaterals,
is turned off this may be of the order of 85% quicker.
Other general
aspects affecting speed:
·
The more surfaces to be
created, the longer it will take
·
The more points
underlying the selected lines, the longer it will take
·
The more lines common
to each point, the longer it will take
For
example,
a) 100 lines (2D grid with 53 points and 8 lines that cannot be
used, creating 48 surfaces) may take 6 minutes
b) 1000 lines (2D grid with 499 points and 100 lines that
cannot be used) may take 2 hours by comparison on the same PC.
Other Notes
2)
THIS SCRIPT IS NOT PART
OF LUSAS SOFTWARE AND AS SUCH IS NOT QUALITY APPROVED OR SUPPORTED. IT IS
PROVIDED ON AN AS IS BASIS FOR DEMONSTRATION PURPOSES ONLY.
3)
The script will only
try to create surfaces from the selected lines.
4)
If only three or four
lines are selected, the script will try to create a single surface and will
provide a message to the user if this fails which can be helpful in
highlighting where the user may have previously been unable to create a surface
due to connectivity problems.
5)
This script will not
create surfaces from 5 or more lines.
6)
Remember to check and
adjust the surface normal directions and surface axes as necessary.