add source files for element generation rules

This commit is contained in:
Joachim Schöberl 2015-11-15 16:42:54 +01:00
parent 3a937d1f36
commit 001ecb9629
8 changed files with 4018 additions and 0 deletions

65
rules/makerlsfile.cpp Normal file
View File

@ -0,0 +1,65 @@
#include <stdlib.h>
#include <iostream>
#include <fstream>
using namespace std;
#define maxlen 1000
int main (int argc, char ** argv)
{
if (argc != 3)
{
cout << "use: makerlsfile infile outfile" << endl;
exit(1);
}
char line[maxlen], infile[maxlen], outfile[maxlen];\
char ch;
int i, j;
/*
cout << "infile: ";
cin >> infile;
cout << "outfile: ";
cin >> outfile;
*/
ifstream inf (argv[1]);
ofstream outf (argv[2]);
outf << "const char * ngscript[] = {" << endl;
while (inf.good())
{
i = 0;
inf.get(ch);
while (ch != '\n' && inf.good() && i < maxlen)
{
if (ch == '\"')
{
line[i] = '\\';
line[i+1] = '\"';
i+= 2;
}
else if (ch == '\\')
{
line[i] = '\\';
line[i+1] = '\\';
i+= 2;
}
else
{
line[i] = ch;
i++;
}
inf.get(ch);
}
line[i] = 0;
cout << line << endl;
outf << "\"" << line << "\\n\",\\" << endl;
}
outf << "0};" << endl;
return 0;
}

259
rules/prisms.rls Normal file
View File

@ -0,0 +1,259 @@
tolfak 0.5
rule "prism on quad"
quality 1
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0, -0.86);
(0.5, 1, -0.86);
mapfaces
(1, 2, 3, 4) del;
(1, 5, 2) del;
(4, 3, 6) del;
newpoints
newfaces
(5, 2, 3, 6);
(1, 5, 6, 4);
elements
(1, 5, 2, 4, 6, 3);
orientations
(1, 2, 3, 5);
(1, 3, 4, 6);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
{ 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 };
{ -0.1 P1, 0.3 P2, 0.3 P3, -0.1 P4, 0.3 P5, 0.3 P6 };
freezonelimit
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
{ 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 };
{ 0 P1, 0.25 P2, 0.25 P3, 0 P4, 0.25 P5, 0.25 P6 };
endrule
rule "prism on 2 quad"
quality 1
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0, -0.86);
(0.5, 1, -0.86);
mapfaces
(1, 2, 3, 4) del;
(2, 5, 6, 3) del;
(1, 5, 2) del;
(4, 3, 6) del;
newpoints
newfaces
(1, 5, 6, 4);
elements
(1, 5, 2, 4, 6, 3);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
{ 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 };
freezonelimit
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
{ 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 };
freeset
1 2 4 5 6 7;
freeset
2 3 4 6;
endrule
rule "prism on 2 quada"
quality 1
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0, -0.86);
(0.5, 1, -0.86);
mapfaces
(1, 2, 3, 4) del;
(5, 1, 4, 6) del;
(1, 5, 2) del;
(4, 3, 6) del;
newpoints
newfaces
(5, 2, 3, 6);
elements
(1, 5, 2, 4, 6, 3);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
{ -0.1 P1, 0.3 P2, 0.3 P3, -0.1 P4, 0.3 P5, 0.3 P6 };
freezonelimit
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
{ 0 P1, 0.25 P2, 0.25 P3, 0 P4, 0.25 P5, 0.25 P6 };
freeset
1 2 3 5 6 7;
freeset
1 3 4 6;
endrule
rule "fill prism"
quality 1
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0, -0.86);
(0.5, 1, -0.86);
mapfaces
(1, 2, 3, 4) del;
(2, 5, 6, 3) del;
(5, 1, 4, 6) del;
(1, 5, 2) del;
(4, 3, 6) del;
newpoints
newfaces
elements
(1, 5, 2, 4, 6, 3);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
freeset
1 2 4 5;
freeset
2 3 4 6;
endrule
rule "flat prism"
quality 1
mappoints
(0, 0, 0);
(1, 0, 0);
(0.5, 0.866, 0);
(0, 0, -1);
(1, 0, -1);
(0.5, 0.866, -1);
mapfaces
(1, 2, 3) del;
(5, 4, 6) del;
newpoints
newfaces
(1, 2, 4);
(4, 2, 5);
(2, 3, 5);
(5, 3, 6);
(3, 1, 6);
(6, 1, 4);
elements
(1, 2, 3, 5, 4, 6);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P5 };
{ 1 P6 };
endrule

451
rules/prisms2.rls Normal file
View File

@ -0,0 +1,451 @@
tolfak 0.5
rule "prism on quad"
quality 1
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0, -0.86);
(0.5, 1, -0.86);
mapfaces
(1, 2, 3, 4) del;
(1, 5, 2) del;
(4, 3, 6) del;
newpoints
newfaces
(5, 2, 3, 6);
(1, 5, 6, 4);
elements
(1, 5, 2, 4, 6, 3);
orientations
(1, 2, 3, 5);
(1, 3, 4, 6);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
{ 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 };
{ -0.1 P1, 0.3 P2, 0.3 P3, -0.1 P4, 0.3 P5, 0.3 P6 };
freezonelimit
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
{ 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 };
{ 0 P1, 0.25 P2, 0.25 P3, 0 P4, 0.25 P5, 0.25 P6 };
freeset
1 2 4 5 6 7;
freeset
2 3 4 5 6 8;
endrule
rule "prism on quad, one trig"
quality 2
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0, -0.86);
(0.5, 1, -0.86);
mapfaces
(1, 2, 3, 4) del;
(1, 5, 2) del;
newpoints
newfaces
(5, 2, 3, 6);
(1, 5, 6, 4);
(4, 6, 3);
elements
(1, 5, 2, 4, 6, 3);
orientations
(1, 2, 3, 5);
(1, 3, 4, 6);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
{ 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 };
{ -0.1 P1, 0.3 P2, 0.3 P3, -0.1 P4, 0.3 P5, 0.3 P6 };
freezonelimit
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
{ 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 };
{ 0 P1, 0.25 P2, 0.25 P3, 0 P4, 0.25 P5, 0.25 P6 };
freeset
1 2 4 5 6 7;
freeset
2 3 4 5 6 8;
endrule
rule "prism on 2 quad"
quality 1
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0, -0.86);
(0.5, 1, -0.86);
mapfaces
(1, 2, 3, 4) del;
(2, 5, 6, 3) del;
(1, 5, 2) del;
(4, 3, 6) del;
newpoints
newfaces
(1, 5, 6, 4);
elements
(1, 5, 2, 4, 6, 3);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
{ 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 };
freezonelimit
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
{ 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 };
freeset
1 2 4 5 6 7;
freeset
2 3 4 6;
endrule
rule "prism on 2 quad, one trig"
quality 2
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0, -0.86);
(0.5, 1, -0.86);
mapfaces
(1, 2, 3, 4) del;
(2, 5, 6, 3) del;
(1, 5, 2) del;
newpoints
newfaces
(1, 5, 6, 4);
(4, 6, 3);
elements
(1, 5, 2, 4, 6, 3);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
{ 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 };
freezonelimit
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
{ 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 };
freeset
1 2 4 5 6 7;
freeset
2 3 4 6;
endrule
rule "prism on 2 quada"
quality 1
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0, -0.86);
(0.5, 1, -0.86);
mapfaces
(1, 2, 3, 4) del;
(5, 1, 4, 6) del;
(1, 5, 2) del;
(4, 3, 6) del;
newpoints
newfaces
(5, 2, 3, 6);
elements
(1, 5, 2, 4, 6, 3);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
{ -0.1 P1, 0.3 P2, 0.3 P3, -0.1 P4, 0.3 P5, 0.3 P6 };
freezonelimit
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
{ 0 P1, 0.25 P2, 0.25 P3, 0 P4, 0.25 P5, 0.25 P6 };
freeset
1 2 3 5 6 7;
freeset
1 3 4 6;
endrule
rule "fill prism"
quality 1
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0, -0.86);
(0.5, 1, -0.86);
mapfaces
(1, 2, 3, 4) del;
(2, 5, 6, 3) del;
(5, 1, 4, 6) del;
(1, 5, 2) del;
(4, 3, 6) del;
newpoints
newfaces
elements
(1, 5, 2, 4, 6, 3);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
freeset
1 2 4 5;
freeset
2 3 4 6;
endrule
rule "prism on 3 quad, one trig"
quality 2
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0, -0.86);
(0.5, 1, -0.86);
mapfaces
(1, 2, 3, 4) del;
(2, 5, 6, 3) del;
(5, 1, 4, 6) del;
(1, 5, 2) del;
newpoints
newfaces
(4, 6, 3);
elements
(1, 5, 2, 4, 6, 3);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 1 P6 };
freeset
1 2 4 5;
freeset
2 3 4 6;
endrule
rule "flat prism"
quality 100
mappoints
(0, 0, 0);
(1, 0, 0);
(0.5, 0.866, 0);
(0, 0, -1);
(1, 0, -1);
(0.5, 0.866, -1);
mapfaces
(1, 2, 3) del;
(5, 4, 6) del;
newpoints
newfaces
(1, 2, 4);
(4, 2, 5);
(2, 3, 5);
(5, 3, 6);
(3, 1, 6);
(6, 1, 4);
elements
(1, 2, 3, 5, 4, 6);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P5 };
{ 1 P6 };
endrule

257
rules/pyramids.rls Normal file
View File

@ -0,0 +1,257 @@
tolfak 0.5
rule "Pyramid on quad"
quality 100
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
mapfaces
(1, 2, 3, 4) del;
newpoints
(0.5, 0.5, -0.5)
{ 0.25 X1, 0.25 X2, 0.25 X3, 0.25 X4 }
{ 0.25 Y1, 0.25 Y2, 0.25 Y3, 0.25 Y4 } { };
newfaces
(1, 2, 5);
(2, 3, 5);
(3, 4, 5);
(4, 1, 5);
elements
(1, 2, 3, 4, 5);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1.4 P5, -0.1 P1, -0.1 P2, -0.1 P3, -0.1 P4 };
freezonelimit
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
freeset
1 2 3 5;
freeset
1 3 4 5;
endrule
rule "small Pyramid on quad"
quality 100
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
mapfaces
(1, 2, 3, 4) del;
newpoints
(0.5, 0.5, -0.1 )
{ 0.25 X1, 0.25 X2, 0.25 X3, 0.25 X4 }
{ 0.25 Y1, 0.25 Y2, 0.25 Y3, 0.25 Y4 } { };
newfaces
(1, 2, 5);
(2, 3, 5);
(3, 4, 5);
(4, 1, 5);
elements
(1, 2, 3, 4, 5);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1.4 P5, -0.1 P1, -0.1 P2, -0.1 P3, -0.1 P4 };
freezonelimit
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
freeset
1 2 3 5;
freeset
1 3 4 5;
endrule
rule "connect pyramid"
quality 1
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0.5, -0.5);
mapfaces
(1, 2, 3, 4) del;
newpoints
newfaces
(1, 2, 5);
(2, 3, 5);
(3, 4, 5);
(4, 1, 5);
elements
(1, 2, 3, 4, 5);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
freeset
1 2 3 5;
freeset
1 3 4 5;
endrule
rule "pyramid with one trig"
quality 1
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0.5, -0.5);
mapfaces
(1, 2, 3, 4) del;
(2, 1, 5) del;
newpoints
newfaces
(2, 3, 5);
(3, 4, 5);
(4, 1, 5);
elements
(1, 2, 3, 4, 5);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 0.34 P2, 0.34 P3, 0.34 P5, -0.02 P1 };
{ 0.34 P3, 0.34 P4, 0.34 P5, -0.02 P1 };
{ 0.34 P1, 0.34 P4, 0.34 P5, -0.02 P3 };
freezonelimit
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 0.333 P2, 0.333 P3, 0.334 P5, 0 P1 };
{ 0.333 P3, 0.333 P4, 0.334 P5, 0 P1 };
{ 0.333 P1, 0.333 P4, 0.334 P5, 0 P3 };
orientations
(1, 2, 3, 5);
(1, 3, 4, 5);
freeset
1 2 3 5;
freeset
1 3 4 5;
freeset
2 3 5 6;
freeset
3 4 5 7;
freeset
1 4 5 8;
endrule
rule "pyramid with two trig"
quality 1
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0.5, -0.5);
mapfaces
(1, 2, 3, 4) del;
(2, 1, 5) del;
(3, 2, 5) del;
newpoints
newfaces
(3, 4, 5);
(4, 1, 5);
elements
(1, 2, 3, 4, 5);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
freeset
1 2 3 5;
freeset
1 3 4 5;
endrule

303
rules/pyramids2.rls Normal file
View File

@ -0,0 +1,303 @@
tolfak 0.5
rule "Pyramid on quad"
quality 100
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
mapfaces
(1, 2, 3, 4) del;
newpoints
(0.5, 0.5, -0.5)
{ 0.25 X1, 0.25 X2, 0.25 X3, 0.25 X4 }
{ 0.25 Y1, 0.25 Y2, 0.25 Y3, 0.25 Y4 } { };
newfaces
(1, 2, 5);
(2, 3, 5);
(3, 4, 5);
(4, 1, 5);
elements
(1, 2, 3, 4, 5);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1.4 P5, -0.1 P1, -0.1 P2, -0.1 P3, -0.1 P4 };
freezonelimit
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
freeset
1 2 3 5;
freeset
1 3 4 5;
endrule
rule "small Pyramid on quad"
quality 100
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
mapfaces
(1, 2, 3, 4) del;
newpoints
(0.5, 0.5, -0.1 )
{ 0.25 X1, 0.25 X2, 0.25 X3, 0.25 X4 }
{ 0.25 Y1, 0.25 Y2, 0.25 Y3, 0.25 Y4 } { };
newfaces
(1, 2, 5);
(2, 3, 5);
(3, 4, 5);
(4, 1, 5);
elements
(1, 2, 3, 4, 5);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1.4 P5, -0.1 P1, -0.1 P2, -0.1 P3, -0.1 P4 };
freezonelimit
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
freeset
1 2 3 5;
freeset
1 3 4 5;
endrule
rule "connect pyramid"
quality 100
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0.5, -0.5);
mapfaces
(1, 2, 3, 4) del;
newpoints
newfaces
(1, 2, 5);
(2, 3, 5);
(3, 4, 5);
(4, 1, 5);
elements
(1, 2, 3, 4, 5);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
freeset
1 2 3 5;
freeset
1 3 4 5;
endrule
rule "pyramid with one trig"
quality 1
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0.5, -0.5);
mapfaces
(1, 2, 3, 4) del;
(2, 1, 5) del;
newpoints
newfaces
(2, 3, 5);
(3, 4, 5);
(4, 1, 5);
elements
(1, 2, 3, 4, 5);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 0.34 P2, 0.34 P3, 0.34 P5, -0.02 P1 };
{ 0.34 P3, 0.34 P4, 0.34 P5, -0.02 P1 };
{ 0.34 P1, 0.34 P4, 0.34 P5, -0.02 P2 };
freezonelimit
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
{ 0.333 P2, 0.333 P3, 0.334 P5, 0 P1 };
{ 0.333 P3, 0.333 P4, 0.334 P5, 0 P1 };
{ 0.333 P1, 0.333 P4, 0.334 P5, 0 P2 };
orientations
(1, 2, 3, 5);
(1, 3, 4, 5);
freeset
1 2 3 5;
freeset
1 3 4 5;
freeset
2 3 5 6;
freeset
3 4 5 7;
freeset
1 4 5 8;
endrule
rule "pyramid with two trig"
quality 1
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0.5, -0.5);
mapfaces
(1, 2, 3, 4) del;
(2, 1, 5) del;
(3, 2, 5) del;
newpoints
newfaces
(3, 4, 5);
(4, 1, 5);
elements
(1, 2, 3, 4, 5);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
freeset
1 2 3 5;
freeset
1 3 4 5;
endrule
rule "pyramid with two trig, left"
quality 1
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0.5, -0.5);
mapfaces
(1, 2, 3, 4) del;
(2, 1, 5) del;
(1, 4, 5) del;
newpoints
newfaces
(3, 4, 5);
(2, 3, 5);
elements
(1, 2, 3, 4, 5);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
freeset
1 2 3 5;
freeset
1 3 4 5;
endrule

759
rules/quad.rls Normal file
View File

@ -0,0 +1,759 @@
rule "Free Quad (1)"
quality 1
mappoints
(0, 0);
(1, 0);
maplines
(1, 2) del;
newpoints
(1, 1) { 1 X2 } { };
(0, 1) { } { };
newlines
(3, 2);
(4, 3);
(1, 4);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1.5, 1.5) { 1.5 X2 } { };
(-0.5, 1.5) { -0.5 X2 } { };
elements
(1, 2, 3, 4);
endrule
rule "Free Quad (5)"
quality 5
mappoints
(0, 0);
(1, 0);
maplines
(1, 2) del;
newpoints
(1, 1) { 1 X2 } { };
(0, 1) { } { };
newlines
(3, 2);
(4, 3);
(1, 4);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1.5, 1.5) { 1.5 X2 } { };
(-0.5, 1.5) { -0.5 X2 } { };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(1, 1) { 1 X2 } { };
(0, 1) { } { };
elements
(1, 2, 3, 4);
endrule
rule "Quad Right (1)"
quality 1
mappoints
(0, 0);
(1, 0);
(1, 1);
maplines
(1, 2) del;
(2, 3) del;
newpoints
(0, 1) { } { 1 y3 };
newlines
(1, 4);
(4, 3);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1, 1) { 1 X3 } { 1 Y3 };
(-0.5, 1.5) { } { 1.5 Y3 };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(1, 1) { 1 X3 } { 1 Y3 };
(0, 1) { } { 1 Y3 };
elements
(1, 2, 3, 4);
endrule
rule "Quad P Right (2)"
quality 2
mappoints
(0, 0);
(1, 0);
(1, 1);
maplines
(1, 2) del;
newpoints
(0, 1) { -1 X2, 1 X3 } { 1 Y3 };
newlines
(1, 4);
(4, 3);
(3, 2);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1.2, 0.5) { 0.7 X2, 0.5 X3 } { 0.5 Y3 };
(1, 1) { 1 X3 } { 1 Y3 };
(-0.5, 1.5) { -2 X2, 1.5 X3 } { 1.5 Y3 };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(1, 0.5) { 0.5 X2, 0.5 X3 } { 0.5 Y3 };
(1, 1) { 1 X3 } { 1 Y3 };
(0, 1) { -1 X2, 1 X3 } { 1 Y3 };
elements
(1, 2, 3, 4);
orientations
(1, 2, 3);
endrule
rule "Quad Right PL (2)"
quality 2
mappoints
(0, 0);
(1, 0);
(1, 1);
(0, 1);
maplines
(1, 2) del;
(2, 3) del;
newpoints
newlines
(1, 4);
(4, 3);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1, 1) { 1 X3 } { 1 Y3 };
(0.5, 1.2) { -0.1 X2, 0.6 X3, 0.6 X4 } { -0.1 Y2, 0.6 Y3, 0.6 Y4 };
(0, 1) { 1 X4 } { 1 Y4 };
(-0.2, 0.5) { -0.1 X2, -0.1 X3, 0.6 X4 } { -0.1 Y2, -0.1 Y3, 0.6 Y4 };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(1, 1) { 1 X3 } { 1 Y3 };
(0.5, 1) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 };
(0, 1) { 1 X4 } { 1 Y4 };
(0, 0.5) { 0.5 X4 } { 0.5 Y4 };
elements
(1, 2, 3, 4);
orientations
(1, 2, 3);
(1, 3, 4);
(1, 2, 4);
(4, 2, 3);
endrule
rule "Left Quad (1)"
quality 1
mappoints
(0, 0);
(1, 0);
(0, 1);
maplines
(1, 2) del;
(3, 1) del;
newpoints
(1, 1) { 1 X2, 1 X3 } { 1 Y3 };
newlines
(3, 4);
(4, 2);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1.5, 1.5) { 1.5 X2, 1.5 X3 } { 1.5 Y3 };
(0, 1) { 1 X3 } { 1 Y3 };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(1, 1) { 1 X2, 1 X3 } { 1 Y3 };
(0, 1) { 1 X3 } { 1 Y3 };
elements
(1, 2, 4, 3);
endrule
rule "Left P Quad (2)"
quality 2
mappoints
(0, 0);
(1, 0);
(0, 1);
maplines
(1, 2) del;
newpoints
(1, 1) { 1 X2, 1 X3 } { 1 Y3 };
newlines
(1, 3);
(3, 4);
(4, 2);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1.5, 1.5) { 1.5 X2, 1.5 X3 } { 1.5 Y3 };
(0, 1) { 1 X3 } { 1 Y3 };
(-0.2, 0.6) { -0.2 X2, 0.6 X3 } { 0.6 Y3 };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(1, 1) { 1 X2, 1 X3 } { 1 Y3 };
(0, 1) { 1 X3 } { 1 Y3 };
(0, 0.5) { 0.5 X3 } { 0.5 Y3 };
elements
(1, 2, 4, 3);
endrule
rule "Left Quad RP (2)"
quality 2
mappoints
(0, 0);
(1, 0);
(0, 1);
(1, 1);
maplines
(1, 2) del;
(3, 1) del;
newpoints
newlines
(3, 4);
(4, 2);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1.2, 0.5) { 0.6 X2, 0.6 X4, -0.1 X3 } { 0.6 Y2, 0.6 Y4, -0.1 Y3 };
(1, 1) { 1 X4 } { 1 Y4 };
(0.5, 1.2) { -0.1 X2, 0.6 X3, 0.6 X4 } { -0.1 Y2, 0.6 Y3, 0.6 Y4 };
(0, 1) { 1 X3 } { 1 Y3 };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(1, 0.5) { 0.5 X2, 0.5 X4 } { 0.5 Y2, 0.5 Y4 };
(1, 1) { 1 X4 } { 1 Y4 };
(0.5, 1) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 };
(0, 1) { 1 X3 } { 1 Y3 };
elements
(1, 2, 4, 3);
orientations
(1, 2, 4);
(1, 4, 3);
endrule
rule "Two left (1)"
quality 1
mappoints
(0, 0);
(1, 0);
(1, 1);
(0, 1);
maplines
(1, 2) del;
(3, 4) del;
(4, 1) del;
newpoints
newlines
(3, 2);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1.5, 0.5) { 0.75 X2, 0.75 X3, -0.25 X4 } { 0.75 Y3, -0.25 Y4 };
(1, 1) { 1 X3 } { 1 Y3 };
(0, 1) { 1 X4 } { 1 Y4 };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(1, 0.5) { 0.5 X2, 0.5 X3 } { 0.5 Y3 };
(1, 1) { 1 X3 } { 1 Y3 };
(0, 1) { 1 X4 } { 1 Y4 };
elements
(1, 2, 3, 4);
endrule
rule "Two Right (1)"
quality 1
mappoints
(0, 0);
(1, 0);
(1, 1);
(0, 1);
maplines
(1, 2) del;
(2, 3) del;
(3, 4) del;
newpoints
newlines
(1, 4);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1, 1) { 1 X3 } { 1 Y3 };
(0, 1) { 1 X4 } { 1 Y4 };
(-0.5, 0.5) { -0.25 X2, -0.25 X3, 0.75 X4 } { -0.25 Y3, 0.75 Y4 };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(1, 1) { 1 X3 } { 1 Y3 };
(0, 1) { 1 X4 } { 1 Y4 };
(0, 0.5) { 0.5 X4 } { 0.5 Y4 };
elements
(1, 2, 3, 4);
endrule
rule "Right 120 (1)"
quality 1000
mappoints
(0, 0);
(1, 0);
(1.5, 0.866);
maplines
(1, 2) del;
(2, 3) del;
newpoints
(0.5, 0.866) { 1 X3, -1 X2 } { 1 Y3 };
newlines
(1, 4);
(4, 3);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1.5, 0.866) { 1 X3 } { 1 Y3 };
(1, 1.732) { -2 X2, 2 X3 } { 2 Y3 };
(0, 1.732) { -3 X2, 2 X3 } { 2 Y3 };
(-0.5, 0.866) { -2 X2, 1 X3 } {1 Y3 };
elements
(1, 2, 4);
(2, 3, 4);
endrule
rule "Left 120 (1)"
quality 1000
mappoints
(0, 0);
(1, 0);
(-0.5, 0.866);
maplines
(1, 2) del;
(3, 1) del;
newpoints
(0.5, 0.866) { 1 X3, 1 X2 } { 1 Y3 };
newlines
(3, 4);
(4, 2);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1.5, 0.866) { 2 X2, 1 X3 } { 1 Y3 };
(1, 1.732) { 2 X2, 2 X3 } { 2 Y3 };
(0, 1.732) { -1 X2, 2 X3 } { 2 Y3 };
(-0.5, 0.866) { 1 X3 } {1 Y3 };
elements
(1, 2, 4);
(2, 3, 4);
endrule
rule "Left Right (1)"
quality 1
mappoints
(0, 0);
(1, 0);
(1, 1);
(0, 1);
maplines
(1, 2) del;
(2, 3) del;
(4, 1) del;
newlines
(4, 3);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1, 1) { 1 X3 } { 1 Y3 };
(0.5, 1.5) { -0.25 X2, 0.75 X3, 0.75 X4 } { 0.75 Y3, 0.75 Y4 };
(0, 1) { 1 X4 } { 1 Y4 };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(1, 1) { 1 X3 } { 1 Y3 };
(0.5, 1) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 };
(0, 1) { 1 X4 } { 1 Y4 };
elements
(1, 2, 3, 4);
endrule
rule "Fill Quad"
quality 1
mappoints
(0, 0);
(1, 0);
(1, 1);
(0, 1);
maplines
(1, 2) del;
(2, 3) del;
(3, 4) del;
(4, 1) del;
newpoints
newlines
freearea
(0, 0);
(1, 0) { 1 X2 } { 1 Y2 };
(1, 1) { 1 X3 } { 1 Y3 };
(0, 1) { 1 X4 } { 1 Y4 };
elements
(1, 2, 3, 4);
endrule
rule "Fill Triangle"
quality 10
mappoints
(0, 0);
(1, 0);
(0.5, 0.86);
maplines
(1, 2) del;
(2, 3) del;
(3, 1) del;
newpoints
newlines
freearea
(0, 0);
(1, 0) { 1 X2 } { 1 Y2 };
(0.5, 0.86) { 1 X3 } { 1 Y3 };
elements
(1, 2, 3);
endrule
rule "Right 60 (1)"
quality 10
mappoints
(0, 0);
(1, 0) { 0.5, 0, 1.0 };
(0.5, 0.866) { 0.6, 0, 0.8 };
maplines
(1, 2) del;
(2, 3) del;
newpoints
newlines
(1, 3);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(0.5, 0.866) { 1 X3 } { 1 Y3 };
(-0.125, 0.6495) { -0.5 X2, 0.75 X3 } { -0.5 Y2, 0.75 Y3 };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(0.5, 0.866) { 1 X3 } { 1 Y3 };
(0.25, 0.433) { 0.5 X3 } { 0.5 Y3 };
elements
(1, 2, 3);
endrule
rule "Vis A Vis (2)"
quality 2
mappoints
(0, 0);
(1, 0);
(1, 1);
(0, 1);
maplines
(1, 2) del;
(3, 4) del;
newpoints
newlines
(1, 4);
(3, 2);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1.5, 0.5) { 0.75 X2, 0.75 X3, -0.25 X4 } { 0.75 Y3, -0.25 Y4 };
(1, 1) { 1 X3 } { 1 Y3 };
(0, 1) { 1 X4 } { 1 Y4 };
(-0.5, 0.5) { -0.25 X2, -0.25 X3, 0.75 X4 } { -0.25 Y3, 0.75 Y4 };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(1, 0.5) { 0.5 X2, 0.5 X3 } { 0.5 Y3 };
(1, 1) { 1 X3 } { 1 Y3 };
(0, 1) { 1 X4 } { 1 Y4 };
(0, 0.5) { 0.5 X4 } { 0.5 Y4 };
elements
(1, 2, 3, 4);
orientations
(1, 3, 4);
(2, 3, 4);
(1, 2, 3);
(1, 2, 4);
endrule
rule "2 h Vis A Vis (1)"
quality 3000
mappoints
(0, 0);
(1, 0);
(1, 1.732);
(0, 1.732);
maplines
(1, 2) del;
(3, 4) del;
newpoints
(0.5, 0.866) { 0.25 X3, 0.25 X4 } { 0.25 Y2, 0.25 Y3, 0.25 Y4 };
newlines
(1, 5);
(5, 4);
(3, 5);
(5, 2);
freearea
(0, 0);
(1, 0) { 1 X2 } { 1 Y2 };
(1.5, 0.866) { 0.75 X2, 0.75 X3, -0.25 X4 } { 0.75 Y2, 0.75 Y3, -0.25 Y4 };
(1, 1.732) { 1 X3 } { 1 Y3 };
(0, 1.732) { 1 X4 } { 1 Y4 };
(-0.5, 0.866) { 0.75 X4, -0.25 X2, -0.25 X3 } { 0.75 Y4, -0.25 Y3 };
elements
(1, 2, 5);
(3, 4, 5);
endrule

1462
rules/tetra.rls Normal file

File diff suppressed because it is too large Load Diff

462
rules/triangle.rls Normal file
View File

@ -0,0 +1,462 @@
rule "Free Triangle (1)"
quality 1
mappoints
(0, 0);
(1, 0) { 1.0, 0, 1.0 };
maplines
(1, 2) del;
newpoints
(0.5, 0.866) { 0.5 X2 } { };
newlines
(1, 3);
(3, 2);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1.5, 0.7) { 0.5 X2 } { };
(0.5, 1.5) { 0.5 X2 } { };
(-0.5, 0.7) { 0.5 X2 } { };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(0.5, 0.866) { 0.5 X2 } { };
(0.5, 0.866) { 0.5 X2 } { };
(0.5, 0.866) { 0.5 X2 } { };
elements
(1, 2, 3);
endrule
rule "Free Triangle (5)"
quality 5
mappoints
(0, 0);
(1, 0) { 1.0, 0, 1.0 };
maplines
(1, 2) del;
newpoints
(0.5, 0.5) { 0.5 X2 } { };
newlines
(1, 3);
(3, 2);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1, 0.7) { 1 X2 } { };
(0, 0.7) { } { };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(0.5, 0.5) { 0.5 X2 } { };
(0.5, 0.5) { 0.5 X2 } { };
elements
(1, 2, 3);
endrule
rule "Free Triangle (10)"
quality 10
mappoints
(0, 0);
(1, 0) { 1.0, 0, 1.0 };
maplines
(1, 2) del;
newpoints
(0.5, 0.3) { 0.5 X2 } { };
newlines
(1, 3);
(3, 2);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1, 0.5) { 1 X2 } { };
(0, 0.5) { } { };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(0.5, 0.3) { 0.5 X2 } { };
(0.5, 0.3) { 0.5 X2 } { };
elements
(1, 2, 3);
endrule
rule "Free Triangle (20)"
quality 20
mappoints
(0, 0);
(1, 0) { 1.0, 0, 1.0 };
maplines
(1, 2) del;
newpoints
(0.5, 0.1) { 0.5 X2 } { };
newlines
(1, 3);
(3, 2);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1, 0.2) { 1 X2 } { };
(0, 0.2) { } { };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(0.5, 0.1) { 0.5 X2 } { };
(0.5, 0.1) { 0.5 X2 } { };
elements
(1, 2, 3);
endrule
rule "Right 60 (1)"
quality 1
mappoints
(0, 0);
(1, 0) { 0.5, 0, 1.0 };
(0.5, 0.866) { 0.6, 0, 0.8 };
maplines
(1, 2) del;
(2, 3) del;
newpoints
newlines
(1, 3);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(0.5, 0.866) { 1 X3 } { 1 Y3 };
(-0.125, 0.6495) { -0.5 X2, 0.75 X3 } { -0.5 Y2, 0.75 Y3 };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(0.5, 0.866) { 1 X3 } { 1 Y3 };
(0.25, 0.433) { 0.5 X3 } { 0.5 Y3 };
elements
(1, 2, 3);
endrule
rule "Left 60 (1)"
quality 1
mappoints
(0, 0);
(1, 0);
(0.5, 0.866);
maplines
(1, 2) del;
(3, 1) del;
newpoints
newlines
(3, 2);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1.125, 0.6495) { 0.75 X2, 0.75 X3 } { 0.75 Y3 };
(0.5, 0.866) { 1 X3 } { 1 Y3 };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(0.75, 0.433) { 0.5 X2, 0.5 X3 } { 0.5 Y2, 0.5 Y3 };
(0.5, 0.866) { 1 X3 } { 1 Y3 };
elements
(1, 2, 3);
endrule
rule "Right 120 (1)"
quality 1
mappoints
(0, 0);
(1, 0);
(1.5, 0.866);
maplines
(1, 2) del;
(2, 3) del;
newpoints
(0.5, 0.866) { 1 X3, -1 X2 } { 1 Y3 };
newlines
(1, 4);
(4, 3);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1.5, 0.866) { 1 X3 } { 1 Y3 };
(1, 1.732) { -2 X2, 2 X3 } { 2 Y3 };
(0, 1.732) { -3 X2, 2 X3 } { 2 Y3 };
(-0.5, 0.866) { -2 X2, 1 X3 } {1 Y3 };
elements
(1, 2, 4);
(2, 3, 4);
endrule
rule "Left 120 (1)"
quality 1
mappoints
(0, 0);
(1, 0);
(-0.5, 0.866);
maplines
(1, 2) del;
(3, 1) del;
newpoints
(0.5, 0.866) { 1 X3, 1 X2 } { 1 Y3 };
newlines
(3, 4);
(4, 2);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1.5, 0.866) { 2 X2, 1 X3 } { 1 Y3 };
(1, 1.732) { 2 X2, 2 X3 } { 2 Y3 };
(0, 1.732) { -1 X2, 2 X3 } { 2 Y3 };
(-0.5, 0.866) { 1 X3 } {1 Y3 };
elements
(1, 2, 4);
(2, 3, 4);
endrule
rule "Left Right 120 (1)"
quality 1
mappoints
(0, 0);
(1, 0);
(-0.5, 0.866);
(1.5, 0.866);
maplines
(1, 2) del;
(3, 1) del;
(2, 4) del;
newpoints
(0.5, 0.866) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 };
newlines
(3, 5);
(5, 4);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1.5, 0.866) { 1 X4 } { 1 Y4 };
(1, 1.299) { -0.5 X2, 0.375 X3, 1.125 X4 } { -0.5 Y2, 0.375 Y3, 1.125 Y4 };
(0, 1.299) { 1.125 X3, 0.375 X4 } { 1.125 Y3, 0.375 Y4 };
(-0.5, 0.866) { 1 X3 } { 1 Y3 };
elements
(1, 2, 5);
(3, 1, 5);
(2, 4, 5);
endrule
rule "Fill Triangle"
quality 1
mappoints
(0, 0);
(1, 0);
(0.5, 0.866);
maplines
(1, 2) del;
(2, 3) del;
(3, 1) del;
newpoints
newlines
freearea
(0, 0);
(1, 0) { 1 X2 } { 1 Y2 };
(0.5, 0.866) { 1 X3 } { 1 Y3 };
elements
(1, 2, 3);
endrule
rule "Vis A Vis (1)"
quality 100
mappoints
(0, 0);
(1, 0);
(0.5, 0.866);
maplines
(1, 2) del;
newpoints
newlines
(1, 3);
(3, 2);
freearea
(0, 0);
(1, 0) { 1 X2 } { };
(1.2, 0.693) { 0.8 X2, 0.8 X3 } { 0.8 Y2, 0.8 Y3 };
(0.5, 0.866) { 1 X3 } { 1 Y3 };
(-0.2, 0.693) { -0.6 X2, 0.8 X3 } { -0.6 Y2, 0.8 Y3 };
freearea2
(0, 0);
(1, 0) { 1 X2 } { };
(0.75, 0.433) { 0.5 X2, 0.5 X3 } { 0.5 Y2, 0.5 Y3 };
(0.5, 0.866) { 1 X3 } { 1 Y3 };
(0.25, 0.433) { 0.5 X3 } { 0.5 Y3 };
elements
(1, 2, 3);
endrule
rule "2 h Vis A Vis (1)"
quality 3
mappoints
(0, 0);
(1, 0);
(1, 1.732);
(0, 1.732);
maplines
(1, 2) del;
(3, 4) del;
newpoints
(0.5, 0.866) { 0.25 X3, 0.25 X4 } { 0.25 Y2, 0.25 Y3, 0.25 Y4 };
newlines
(1, 5);
(5, 4);
(3, 5);
(5, 2);
freearea
(0, 0);
(1, 0) { 1 X2 } { 1 Y2 };
(1.5, 0.866) { 0.75 X2, 0.75 X3, -0.25 X4 } { 0.75 Y2, 0.75 Y3, -0.25 Y4 };
(1, 1.732) { 1 X3 } { 1 Y3 };
(0, 1.732) { 1 X4 } { 1 Y4 };
(-0.5, 0.866) { 0.75 X4, -0.25 X2, -0.25 X3 } { 0.75 Y4, -0.25 Y3 };
elements
(1, 2, 5);
(3, 4, 5);
endrule