Skip to content
Snippets Groups Projects
Commit b17deb74 authored by Christian's avatar Christian
Browse files

added 3gs examples files

parent 99f9f519
No related branches found
No related tags found
No related merge requests found
solid base_models/test_split2_unchanged
facet normal 0. 0. -1.
outer loop
vertex 2. 0. 0.
vertex 1. -1. 0.
vertex 0.20000000000000001 -1. 0.
endloop
endfacet
facet normal 0. 0. 1.
outer loop
vertex 2. 0. 0.
vertex 0.20000000000000001 -1. 0.
vertex 0.5 -1. 0.
endloop
endfacet
facet normal -0.55470019622522915 0.83205029433784372 0.
outer loop
vertex 2. 0. 0.
vertex 0.5 -1. 0.
vertex 0.5 -1. 1.
endloop
endfacet
facet normal 0. -0.70710678118654746 -0.70710678118654746
outer loop
vertex 2. 0. 0.
vertex 0.5 -1. 1.
vertex 0. -1. 1.
endloop
endfacet
facet normal -0.57735026918962584 0.57735026918962584 -0.57735026918962584
outer loop
vertex 2. 0. 0.
vertex 1. -1. 0.
vertex 0. -1. 1.
endloop
endfacet
facet normal 0. 1. 0.
outer loop
vertex 1. -1. 0.
vertex 0.20000000000000001 -1. 0.
vertex 0. -1. 1.
endloop
endfacet
facet normal 0. -1. 0.
outer loop
vertex 0.20000000000000001 -1. 0.
vertex 0.5 -1. 1.
vertex 0. -1. 1.
endloop
endfacet
facet normal 0. -1. 0.
outer loop
vertex 0.20000000000000001 -1. 0.
vertex 0.5 -1. 0.
vertex 0.5 -1. 1.
endloop
endfacet
endsolid base_models/test_split2_unchanged
\ No newline at end of file
......@@ -1789,23 +1789,20 @@ InstallMethod( TestIntersections,
[],
function()
local surf, verticesPositions, pRecord;
surf := SimplicialSurfaceByVerticesInFaces( [[4,5,6],[1,2,3],[4,6,7],[5,4,8],[5,6,9]] );
verticesPositions :=[[ -1.0000000000, 0.0000000000, 0.0000000000 ],
[ 0.0000000000, 1.0000000000 , 0.0000000000 ],
[ 1.0000000000, 0.0000000000, 0.0000000000 ],
[ 0.0000000000, 0.300000000, -1.000000000 ],
[ 0.0000000000, 0.8000000000 , 0.0000000000 ],
[ 0.0000000000, 0.3000000000, 1.0000000000 ],
[ 0.0000000000, -1.0000000000 , 0.0000000000],
[ 0.0000000000, 1.0000000000, -1.000000000 ],
[ 0.0000000000, 1.000000000, 1.000000000 ],
surf := TriangularComplexByVerticesInFaces( [[1,2,6],[1,4,5]]);
verticesPositions :=[[ 2.0000000000, 0.0000000000, 0.0000000000 ],
[ 1.0000000000, -1.0000000000 , 0.0000000000 ],
[ 0.2000000000, -1.5000000000, 0.0000000000 ],
[ 0.3000000000, -1.500000000, 0.500000000 ],
[ 0.3000000000, -1.5000000000 , 1.0000000000 ],
[ -1.0000000000, -1.000000000, 1.0000000000 ],
];
pRecord := SetVertexCoordinates3D(surf, verticesPositions, rec());
DrawSurfaceToSTL(surf,"test_split2",pRecord, true);
DrawSurfaceToSTL(surf,"test_split2",pRecord, false);
end
);
#Coords := [[[ 2.0000000000, 0.0000000000, 0.0000000000 ],[ 1.0000000000, -1.0000000000 , 0.0000000000 ],[ -1.0000000000, -1.000000000, 1.0000000000 ]],[[ 2.0000000000, 0.0000000000, 0.0000000000 ],[ 0.5000000000, -1.500000000, 0.000000000 ],[ 0.4000000000, -1.5000000000 , 1.0000000000 ]]];
InstallMethod( TestIntersections2,
[],
function()
......@@ -1827,6 +1824,7 @@ InstallMethod( TestIntersections2,
end
);
InstallMethod( TestTriang2,
[],
function()
......
#3_2
ico := Icosahedron();
Coord3_2:= [
[ 0.9510565160, 0.0000000000, 0.0000000000 ],
[ 0.4253254040, 0.8506508085, 0.0000000000 ],
[ 0.4253254040, 0.2628655560, 0.8090169940 ],
[ -0.0449027976, -0.0277514551, 0.0854101965 ],
[ 0.4253254040, -0.6881909604, -0.4999999998 ],
[ 0.4253254040, -0.6881909604, 0.4999999998 ],
[ -0.4253254040, 0.6881909604, 0.4999999998 ],
[ -0.4253254040, 0.6881909604, -0.4999999998 ],
[ -0.4253254040, -0.2628655560, -0.8090169940 ],
[ -0.4253254040, -0.8506508085, 0.0000000000 ],
[ 0.0449027976, 0.0277514551, -0.0854101965 ],
[ -0.9510565160, 0.0000000000, 0.0000000000 ],
];
pRecord1 := SetVertexCoordinates3D(ico, Coord3_2, rec());
DrawComplexToJavaScript(ico,"ico_32",pRecord1);
# intersection example 1
coordinates:=[[0.,0.,1.],[1.5,0.,1],[0.,2.,1.],[0.75,0.5,1.5],[0.75,0.5,0.5],[2,0.5,0.5]];
faces:=[ [ 1, 2, 3 ], [ 4, 5, 6 ]];
t:=TriangularComplexByVerticesInFaces(faces);
pRecord2 := SetVertexCoordinates3D(t, coordinates, rec());
DrawComplexToJavaScript(t,"Intersection",pRecord2);
# intersection example 2
coordinates:=[[0.,0.,1.],[1.,0.,1],[0.,2.,1.],[1.5,0,1],[0.5,1.,1]];
faces:=[ [ 1, 2, 3 ], [ 2, 4, 5]];
t:=TriangularComplexByVerticesInFaces(faces);
pRecord2 := SetVertexCoordinates3D(t, coordinates, rec());
DrawComplexToJavaScript(t,"Intersection2",pRecord2);
# ramified example
coordinates:=[[0.,-1.,0.],[0.,1.,0.],[0.5,1.,0.5],[0.5,1.,-0.5],[-0.5,1.,0.5],[-0.5,1.,-0.5]];
faces:=[ [ 1, 2, 3 ], [ 1, 2, 4], [ 1, 2, 5], [ 1, 2, 6]];
t:=TriangularComplexByVerticesInFaces(faces);
pRecord3 := SetVertexCoordinates3D(t, coordinates, rec());
SetEdgeColour(t,1,0xFF0000,pRecord3);
pRecord3:=ActivateLineWidth(t, pRecord3);
DrawComplexToJavaScript(t,"ramified1",pRecord3);
# unramified example
coordinates:=[[0.,-1.,-0.1],[0.,1.,-0.1],[0.,-1.,0.1],[0.,1.,0.1],[0.5,1.,0.5],[0.5,1.,-0.5],[-0.5,1.,0.5],[-0.5,1.,-0.5]];
faces:=[ [ 3, 4, 5 ], [ 1, 2, 6], [ 3, 4, 7], [ 1, 2, 8]];
t:=TriangularComplexByVerticesInFaces(faces);
pRecord3 := SetVertexCoordinates3D(t, coordinates, rec());
SetEdgeColour(t,1,"0xFF0000",pRecord3);
SetEdgeColour(t,6,"0xFF0000",pRecord3);
pRecord3:=ActivateLineWidth(t, pRecord3);
DrawComplexToJavaScript(t,"un_ramified1",pRecord3);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
test.stl 0 → 100644
solid test
facet normal -0.40824829046386307 0.40824829046386307 -0.81649658092772615
outer loop
vertex 2. 0. 0.
vertex 1. -1. 0.
vertex -1. -1. 1.
endloop
endfacet
facet normal -0.6616216370868464 0.74983785536509251 0.
outer loop
vertex 2. 0. 0.
vertex 0.29999999999999999 -1.5 0.5
vertex 0.29999999999999999 -1.5 1.
endloop
endfacet
endsolid test
\ No newline at end of file
solid test_split2
facet normal 0. 0. -1.
outer loop
vertex 2. 0. 0.
vertex 1. -1. 0.
vertex 0.20000000000000001 -1.5 0.
endloop
endfacet
facet normal 0. 0. 1.
outer loop
vertex 2. 0. 0.
vertex 0.20000000000000001 -1.5 0.
vertex 0.5 -1.5 0.
endloop
endfacet
facet normal -0.70534561585859823 0.70534561585859823 -0.070534561585859995
outer loop
vertex 2. 0. 0.
vertex 0.5 -1.5 0.
vertex 0.40000000000000002 -1.5 1.
endloop
endfacet
facet normal -0.1534291029830539 -0.42960148835255091 -0.88988879730171255
outer loop
vertex 2. 0. 0.
vertex 0.40000000000000002 -1.5 1.
vertex -1. -1. 1.
endloop
endfacet
facet normal -0.40824829046386307 0.40824829046386307 -0.81649658092772615
outer loop
vertex 2. 0. 0.
vertex 1. -1. 0.
vertex -1. -1. 1.
endloop
endfacet
facet normal -0.36369648372665397 0.58191437396264634 -0.72739296745330795
outer loop
vertex 1. -1. 0.
vertex 0.20000000000000001 -1.5 0.
vertex -1. -1. 1.
endloop
endfacet
facet normal -0.33557802760701216 -0.93961847729963399 0.06711560552140243
outer loop
vertex 0.20000000000000001 -1.5 0.
vertex 0.40000000000000002 -1.5 1.
vertex -1. -1. 1.
endloop
endfacet
facet normal 0. -1. 0.
outer loop
vertex 0.20000000000000001 -1.5 0.
vertex 0.5 -1.5 0.
vertex 0.40000000000000002 -1.5 1.
endloop
endfacet
endsolid test_split2
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment