Add a test for the link group.

pull/216/head
whitequark 2017-03-09 17:48:44 +00:00
parent 15f349049c
commit 7e2b1b1d8d
9 changed files with 1928 additions and 1 deletions

View File

@ -261,7 +261,7 @@ bool SolveSpaceUI::SaveToFile(const std::string &filename) {
// will be exported. We reload the linked files because that rewrites
// the linkFileRel for our possibly-new filename.
SS.ScheduleShowTW();
SS.ReloadAllImported();
SS.ReloadAllImported(filename);
SS.GenerateAll(SolveSpaceUI::Generate::ALL);
fh = ssfopen(filename, "wb");

View File

@ -55,6 +55,7 @@ set(testsuite_SOURCES
request/datum_point/test.cpp
request/line_segment/test.cpp
request/ttf_text/test.cpp
group/link/test.cpp
group/translate_asy/test.cpp
group/translate_nd/test.cpp
)

BIN
test/group/link/normal.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

465
test/group/link/normal.slvs Normal file
View File

@ -0,0 +1,465 @@
±²³SolveSpaceREVa
Group.h.v=00000001
Group.type=5000
Group.name=#references
Group.color=ff000000
Group.skipFirst=0
Group.predef.swapUV=0
Group.predef.negateU=0
Group.predef.negateV=0
Group.visible=1
Group.suppress=0
Group.relaxConstraints=0
Group.allowRedundant=0
Group.allDimsReference=0
Group.scale=1.00000000000000000000
Group.remap={
}
AddGroup
Group.h.v=00000002
Group.type=5001
Group.order=1
Group.name=sketch-in-plane
Group.activeWorkplane.v=80020000
Group.color=ff000000
Group.subtype=6000
Group.skipFirst=0
Group.predef.q.w=1.00000000000000000000
Group.predef.origin.v=00010001
Group.predef.swapUV=0
Group.predef.negateU=0
Group.predef.negateV=0
Group.visible=1
Group.suppress=0
Group.relaxConstraints=0
Group.allowRedundant=0
Group.allDimsReference=0
Group.scale=1.00000000000000000000
Group.remap={
}
AddGroup
Group.h.v=00000003
Group.type=5300
Group.order=2
Group.name=rect-v20
Group.activeWorkplane.v=00010000
Group.color=00646464
Group.skipFirst=0
Group.meshCombine=2
Group.predef.swapUV=0
Group.predef.negateU=0
Group.predef.negateV=0
Group.visible=1
Group.suppress=0
Group.relaxConstraints=0
Group.allowRedundant=0
Group.allDimsReference=0
Group.scale=1.00000000000000000000
Group.remap={
1 00010000 0
2 00010001 0
3 00010020 0
4 00020000 0
5 00020001 0
6 00020020 0
7 00030000 0
8 00030001 0
9 00030020 0
10 00040000 0
11 00040001 0
12 00040002 0
13 00050000 0
14 00050001 0
15 00050002 0
16 00060000 0
17 00060001 0
18 00060002 0
19 00070000 0
20 00070001 0
21 00070002 0
22 80020000 0
23 80020001 0
24 80020002 0
}
Group.impFile=/TESTROOT/rect_v20.slvs
Group.impFileRel=rect_v20.slvs
AddGroup
Param.h.v.=00010010
AddParam
Param.h.v.=00010011
AddParam
Param.h.v.=00010012
AddParam
Param.h.v.=00010020
Param.val=1.00000000000000000000
AddParam
Param.h.v.=00010021
AddParam
Param.h.v.=00010022
AddParam
Param.h.v.=00010023
AddParam
Param.h.v.=00020010
AddParam
Param.h.v.=00020011
AddParam
Param.h.v.=00020012
AddParam
Param.h.v.=00020020
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00020021
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00020022
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00020023
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00030010
AddParam
Param.h.v.=00030011
AddParam
Param.h.v.=00030012
AddParam
Param.h.v.=00030020
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00030021
Param.val=-0.50000000000000000000
AddParam
Param.h.v.=00030022
Param.val=-0.50000000000000000000
AddParam
Param.h.v.=00030023
Param.val=-0.50000000000000000000
AddParam
Param.h.v.=80030000
Param.val=10.00000000000000000000
AddParam
Param.h.v.=80030001
Param.val=10.00000000000000000000
AddParam
Param.h.v.=80030002
AddParam
Param.h.v.=80030003
Param.val=1.00000000000000000000
AddParam
Param.h.v.=80030004
AddParam
Param.h.v.=80030005
AddParam
Param.h.v.=80030006
AddParam
Request.h.v=00000001
Request.type=100
Request.group.v=00000001
Request.construction=0
AddRequest
Request.h.v=00000002
Request.type=100
Request.group.v=00000001
Request.construction=0
AddRequest
Request.h.v=00000003
Request.type=100
Request.group.v=00000001
Request.construction=0
AddRequest
Entity.h.v=00010000
Entity.type=10000
Entity.construction=0
Entity.point[0].v=00010001
Entity.normal.v=00010020
Entity.actVisible=1
AddEntity
Entity.h.v=00010001
Entity.type=2000
Entity.construction=1
Entity.actVisible=1
AddEntity
Entity.h.v=00010020
Entity.type=3000
Entity.construction=0
Entity.point[0].v=00010001
Entity.actNormal.w=1.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=00020000
Entity.type=10000
Entity.construction=0
Entity.point[0].v=00020001
Entity.normal.v=00020020
Entity.actVisible=1
AddEntity
Entity.h.v=00020001
Entity.type=2000
Entity.construction=1
Entity.actVisible=1
AddEntity
Entity.h.v=00020020
Entity.type=3000
Entity.construction=0
Entity.point[0].v=00020001
Entity.actNormal.w=0.50000000000000000000
Entity.actNormal.vx=0.50000000000000000000
Entity.actNormal.vy=0.50000000000000000000
Entity.actNormal.vz=0.50000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=00030000
Entity.type=10000
Entity.construction=0
Entity.point[0].v=00030001
Entity.normal.v=00030020
Entity.actVisible=1
AddEntity
Entity.h.v=00030001
Entity.type=2000
Entity.construction=1
Entity.actVisible=1
AddEntity
Entity.h.v=00030020
Entity.type=3000
Entity.construction=0
Entity.point[0].v=00030001
Entity.actNormal.w=0.50000000000000000000
Entity.actNormal.vx=-0.50000000000000000000
Entity.actNormal.vy=-0.50000000000000000000
Entity.actNormal.vz=-0.50000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80020000
Entity.type=10000
Entity.construction=0
Entity.point[0].v=80020002
Entity.normal.v=80020001
Entity.actVisible=0
AddEntity
Entity.h.v=80020001
Entity.type=3010
Entity.construction=0
Entity.point[0].v=80020002
Entity.actNormal.w=1.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80020002
Entity.type=2012
Entity.construction=1
Entity.actVisible=1
AddEntity
Entity.h.v=80030002
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=10.00000000000000000000
Entity.actPoint.y=10.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030003
Entity.type=3011
Entity.construction=0
Entity.point[0].v=80030002
Entity.actNormal.w=1.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030005
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=10.00000000000000000000
Entity.actPoint.y=10.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030006
Entity.type=3011
Entity.construction=0
Entity.point[0].v=80030005
Entity.actNormal.w=0.50000000000000000000
Entity.actNormal.vx=0.50000000000000000000
Entity.actNormal.vy=0.50000000000000000000
Entity.actNormal.vz=0.50000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030008
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=10.00000000000000000000
Entity.actPoint.y=10.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030009
Entity.type=3011
Entity.construction=0
Entity.point[0].v=80030008
Entity.actNormal.w=0.50000000000000000000
Entity.actNormal.vx=-0.50000000000000000000
Entity.actNormal.vy=-0.50000000000000000000
Entity.actNormal.vz=-0.50000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=8003000a
Entity.type=11000
Entity.construction=0
Entity.point[0].v=8003000b
Entity.point[1].v=8003000c
Entity.actVisible=1
AddEntity
Entity.h.v=8003000b
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=15.00000000000000000000
Entity.actPoint.y=5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=8003000c
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=15.00000000000000000000
Entity.actPoint.y=15.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=8003000d
Entity.type=11000
Entity.construction=0
Entity.point[0].v=8003000e
Entity.point[1].v=8003000f
Entity.actVisible=1
AddEntity
Entity.h.v=8003000e
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=5.00000000000000000000
Entity.actPoint.y=5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=8003000f
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=15.00000000000000000000
Entity.actPoint.y=5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030010
Entity.type=11000
Entity.construction=0
Entity.point[0].v=80030011
Entity.point[1].v=80030012
Entity.actVisible=1
AddEntity
Entity.h.v=80030011
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=5.00000000000000000000
Entity.actPoint.y=15.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030012
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=5.00000000000000000000
Entity.actPoint.y=5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030013
Entity.type=11000
Entity.construction=0
Entity.point[0].v=80030014
Entity.point[1].v=80030015
Entity.actVisible=1
AddEntity
Entity.h.v=80030014
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=15.00000000000000000000
Entity.actPoint.y=15.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030015
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=5.00000000000000000000
Entity.actPoint.y=15.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030017
Entity.type=3011
Entity.construction=0
Entity.point[0].v=80030018
Entity.actNormal.w=1.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030018
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=10.00000000000000000000
Entity.actPoint.y=10.00000000000000000000
Entity.actVisible=1
AddEntity

View File

@ -0,0 +1,463 @@
±²³SolveSpaceREVa
Group.h.v=00000001
Group.type=5000
Group.name=#references
Group.skipFirst=0
Group.predef.swapUV=0
Group.predef.negateU=0
Group.predef.negateV=0
Group.visible=1
Group.suppress=0
Group.relaxConstraints=0
Group.allDimsReference=0
Group.remap={
}
Group.impFile=
Group.impFileRel=
AddGroup
Group.h.v=00000002
Group.type=5001
Group.order=1
Group.name=sketch-in-plane
Group.activeWorkplane.v=80020000
Group.subtype=6000
Group.skipFirst=0
Group.predef.q.w=1.00000000000000000000
Group.predef.origin.v=00010001
Group.predef.swapUV=0
Group.predef.negateU=0
Group.predef.negateV=0
Group.visible=1
Group.suppress=0
Group.relaxConstraints=0
Group.allDimsReference=0
Group.remap={
}
Group.impFile=
Group.impFileRel=
AddGroup
Group.h.v=00000003
Group.type=5300
Group.order=2
Group.name=rect-v20
Group.activeWorkplane.v=00010000
Group.opA.v=00000002
Group.color=00646464
Group.skipFirst=0
Group.meshCombine=2
Group.predef.swapUV=0
Group.predef.negateU=0
Group.predef.negateV=0
Group.visible=1
Group.suppress=0
Group.relaxConstraints=0
Group.allDimsReference=0
Group.scale=1.00000000000000000000
Group.remap={
1 00010000 0
2 00010001 0
3 00010020 0
4 00020000 0
5 00020001 0
6 00020020 0
7 00030000 0
8 00030001 0
9 00030020 0
10 00040000 0
11 00040001 0
12 00040002 0
13 00050000 0
14 00050001 0
15 00050002 0
16 00060000 0
17 00060001 0
18 00060002 0
19 00070000 0
20 00070001 0
21 00070002 0
22 80020000 0
23 80020001 0
24 80020002 0
}
Group.impFile=Z:\TESTROOT\rect_v20.slvs
Group.impFileRel=rect_v20.slvs
AddGroup
Param.h.v.=00010010
AddParam
Param.h.v.=00010011
AddParam
Param.h.v.=00010012
AddParam
Param.h.v.=00010020
Param.val=1.00000000000000000000
AddParam
Param.h.v.=00010021
AddParam
Param.h.v.=00010022
AddParam
Param.h.v.=00010023
AddParam
Param.h.v.=00020010
AddParam
Param.h.v.=00020011
AddParam
Param.h.v.=00020012
AddParam
Param.h.v.=00020020
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00020021
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00020022
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00020023
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00030010
AddParam
Param.h.v.=00030011
AddParam
Param.h.v.=00030012
AddParam
Param.h.v.=00030020
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00030021
Param.val=-0.50000000000000000000
AddParam
Param.h.v.=00030022
Param.val=-0.50000000000000000000
AddParam
Param.h.v.=00030023
Param.val=-0.50000000000000000000
AddParam
Param.h.v.=80030000
Param.val=10.00000000000000000000
AddParam
Param.h.v.=80030001
Param.val=10.00000000000000000000
AddParam
Param.h.v.=80030002
AddParam
Param.h.v.=80030003
Param.val=1.00000000000000000000
AddParam
Param.h.v.=80030004
AddParam
Param.h.v.=80030005
AddParam
Param.h.v.=80030006
AddParam
Request.h.v=00000001
Request.type=100
Request.group.v=00000001
Request.construction=0
AddRequest
Request.h.v=00000002
Request.type=100
Request.group.v=00000001
Request.construction=0
AddRequest
Request.h.v=00000003
Request.type=100
Request.group.v=00000001
Request.construction=0
AddRequest
Entity.h.v=00010000
Entity.type=10000
Entity.construction=0
Entity.point[0].v=00010001
Entity.normal.v=00010020
Entity.actVisible=1
AddEntity
Entity.h.v=00010001
Entity.type=2000
Entity.construction=0
Entity.actVisible=1
AddEntity
Entity.h.v=00010020
Entity.type=3000
Entity.construction=0
Entity.point[0].v=00010001
Entity.actNormal.w=1.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=00020000
Entity.type=10000
Entity.construction=0
Entity.point[0].v=00020001
Entity.normal.v=00020020
Entity.actVisible=1
AddEntity
Entity.h.v=00020001
Entity.type=2000
Entity.construction=0
Entity.actVisible=1
AddEntity
Entity.h.v=00020020
Entity.type=3000
Entity.construction=0
Entity.point[0].v=00020001
Entity.actNormal.w=0.50000000000000000000
Entity.actNormal.vx=0.50000000000000000000
Entity.actNormal.vy=0.50000000000000000000
Entity.actNormal.vz=0.50000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=00030000
Entity.type=10000
Entity.construction=0
Entity.point[0].v=00030001
Entity.normal.v=00030020
Entity.actVisible=1
AddEntity
Entity.h.v=00030001
Entity.type=2000
Entity.construction=0
Entity.actVisible=1
AddEntity
Entity.h.v=00030020
Entity.type=3000
Entity.construction=0
Entity.point[0].v=00030001
Entity.actNormal.w=0.50000000000000000000
Entity.actNormal.vx=-0.50000000000000000000
Entity.actNormal.vy=-0.50000000000000000000
Entity.actNormal.vz=-0.50000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80020000
Entity.type=10000
Entity.construction=0
Entity.point[0].v=80020002
Entity.normal.v=80020001
Entity.actVisible=0
AddEntity
Entity.h.v=80020001
Entity.type=3010
Entity.construction=0
Entity.point[0].v=80020002
Entity.actNormal.w=1.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80020002
Entity.type=2012
Entity.construction=0
Entity.actVisible=1
AddEntity
Entity.h.v=80030002
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=10.00000000000000000000
Entity.actPoint.y=10.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030003
Entity.type=3011
Entity.construction=0
Entity.point[0].v=80030002
Entity.actNormal.w=1.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030005
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=10.00000000000000000000
Entity.actPoint.y=10.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030006
Entity.type=3011
Entity.construction=0
Entity.point[0].v=80030005
Entity.actNormal.w=0.50000000000000000000
Entity.actNormal.vx=0.50000000000000000000
Entity.actNormal.vy=0.50000000000000000000
Entity.actNormal.vz=0.50000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030008
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=10.00000000000000000000
Entity.actPoint.y=10.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030009
Entity.type=3011
Entity.construction=0
Entity.point[0].v=80030008
Entity.actNormal.w=0.50000000000000000000
Entity.actNormal.vx=-0.50000000000000000000
Entity.actNormal.vy=-0.50000000000000000000
Entity.actNormal.vz=-0.50000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=8003000a
Entity.type=11000
Entity.construction=0
Entity.point[0].v=8003000b
Entity.point[1].v=8003000c
Entity.actVisible=1
AddEntity
Entity.h.v=8003000b
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=15.00000000000000000000
Entity.actPoint.y=5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=8003000c
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=15.00000000000000000000
Entity.actPoint.y=15.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=8003000d
Entity.type=11000
Entity.construction=0
Entity.point[0].v=8003000e
Entity.point[1].v=8003000f
Entity.actVisible=1
AddEntity
Entity.h.v=8003000e
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=5.00000000000000000000
Entity.actPoint.y=5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=8003000f
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=15.00000000000000000000
Entity.actPoint.y=5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030010
Entity.type=11000
Entity.construction=0
Entity.point[0].v=80030011
Entity.point[1].v=80030012
Entity.actVisible=1
AddEntity
Entity.h.v=80030011
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=5.00000000000000000000
Entity.actPoint.y=15.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030012
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=5.00000000000000000000
Entity.actPoint.y=5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030013
Entity.type=11000
Entity.construction=0
Entity.point[0].v=80030014
Entity.point[1].v=80030015
Entity.actVisible=1
AddEntity
Entity.h.v=80030014
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=15.00000000000000000000
Entity.actPoint.y=15.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030015
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=5.00000000000000000000
Entity.actPoint.y=15.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030017
Entity.type=3011
Entity.construction=0
Entity.point[0].v=80030018
Entity.actNormal.w=1.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030018
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=10.00000000000000000000
Entity.actPoint.y=10.00000000000000000000
Entity.actVisible=1
AddEntity

View File

@ -0,0 +1,465 @@
±²³SolveSpaceREVa
Group.h.v=00000001
Group.type=5000
Group.name=#references
Group.color=ff000000
Group.skipFirst=0
Group.predef.swapUV=0
Group.predef.negateU=0
Group.predef.negateV=0
Group.visible=1
Group.suppress=0
Group.relaxConstraints=0
Group.allowRedundant=0
Group.allDimsReference=0
Group.scale=1.00000000000000000000
Group.remap={
}
AddGroup
Group.h.v=00000002
Group.type=5001
Group.order=1
Group.name=sketch-in-plane
Group.activeWorkplane.v=80020000
Group.color=ff000000
Group.subtype=6000
Group.skipFirst=0
Group.predef.q.w=1.00000000000000000000
Group.predef.origin.v=00010001
Group.predef.swapUV=0
Group.predef.negateU=0
Group.predef.negateV=0
Group.visible=1
Group.suppress=0
Group.relaxConstraints=0
Group.allowRedundant=0
Group.allDimsReference=0
Group.scale=1.00000000000000000000
Group.remap={
}
AddGroup
Group.h.v=00000003
Group.type=5300
Group.order=2
Group.name=rect-v20
Group.activeWorkplane.v=00010000
Group.color=00646464
Group.skipFirst=0
Group.meshCombine=2
Group.predef.swapUV=0
Group.predef.negateU=0
Group.predef.negateV=0
Group.visible=1
Group.suppress=0
Group.relaxConstraints=0
Group.allowRedundant=0
Group.allDimsReference=0
Group.scale=1.00000000000000000000
Group.remap={
1 00010000 0
2 00010001 0
3 00010020 0
4 00020000 0
5 00020001 0
6 00020020 0
7 00030000 0
8 00030001 0
9 00030020 0
10 00040000 0
11 00040001 0
12 00040002 0
13 00050000 0
14 00050001 0
15 00050002 0
16 00060000 0
17 00060001 0
18 00060002 0
19 00070000 0
20 00070001 0
21 00070002 0
22 80020000 0
23 80020001 0
24 80020002 0
}
Group.impFile=/TESTROOT/rect_v20.slvs
Group.impFileRel=rect_v20.slvs
AddGroup
Param.h.v.=00010010
AddParam
Param.h.v.=00010011
AddParam
Param.h.v.=00010012
AddParam
Param.h.v.=00010020
Param.val=1.00000000000000000000
AddParam
Param.h.v.=00010021
AddParam
Param.h.v.=00010022
AddParam
Param.h.v.=00010023
AddParam
Param.h.v.=00020010
AddParam
Param.h.v.=00020011
AddParam
Param.h.v.=00020012
AddParam
Param.h.v.=00020020
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00020021
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00020022
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00020023
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00030010
AddParam
Param.h.v.=00030011
AddParam
Param.h.v.=00030012
AddParam
Param.h.v.=00030020
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00030021
Param.val=-0.50000000000000000000
AddParam
Param.h.v.=00030022
Param.val=-0.50000000000000000000
AddParam
Param.h.v.=00030023
Param.val=-0.50000000000000000000
AddParam
Param.h.v.=80030000
Param.val=10.00000000000000000000
AddParam
Param.h.v.=80030001
Param.val=10.00000000000000000000
AddParam
Param.h.v.=80030002
AddParam
Param.h.v.=80030003
Param.val=1.00000000000000000000
AddParam
Param.h.v.=80030004
AddParam
Param.h.v.=80030005
AddParam
Param.h.v.=80030006
AddParam
Request.h.v=00000001
Request.type=100
Request.group.v=00000001
Request.construction=0
AddRequest
Request.h.v=00000002
Request.type=100
Request.group.v=00000001
Request.construction=0
AddRequest
Request.h.v=00000003
Request.type=100
Request.group.v=00000001
Request.construction=0
AddRequest
Entity.h.v=00010000
Entity.type=10000
Entity.construction=0
Entity.point[0].v=00010001
Entity.normal.v=00010020
Entity.actVisible=1
AddEntity
Entity.h.v=00010001
Entity.type=2000
Entity.construction=0
Entity.actVisible=1
AddEntity
Entity.h.v=00010020
Entity.type=3000
Entity.construction=0
Entity.point[0].v=00010001
Entity.actNormal.w=1.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=00020000
Entity.type=10000
Entity.construction=0
Entity.point[0].v=00020001
Entity.normal.v=00020020
Entity.actVisible=1
AddEntity
Entity.h.v=00020001
Entity.type=2000
Entity.construction=0
Entity.actVisible=1
AddEntity
Entity.h.v=00020020
Entity.type=3000
Entity.construction=0
Entity.point[0].v=00020001
Entity.actNormal.w=0.50000000000000000000
Entity.actNormal.vx=0.50000000000000000000
Entity.actNormal.vy=0.50000000000000000000
Entity.actNormal.vz=0.50000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=00030000
Entity.type=10000
Entity.construction=0
Entity.point[0].v=00030001
Entity.normal.v=00030020
Entity.actVisible=1
AddEntity
Entity.h.v=00030001
Entity.type=2000
Entity.construction=0
Entity.actVisible=1
AddEntity
Entity.h.v=00030020
Entity.type=3000
Entity.construction=0
Entity.point[0].v=00030001
Entity.actNormal.w=0.50000000000000000000
Entity.actNormal.vx=-0.50000000000000000000
Entity.actNormal.vy=-0.50000000000000000000
Entity.actNormal.vz=-0.50000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80020000
Entity.type=10000
Entity.construction=0
Entity.point[0].v=80020002
Entity.normal.v=80020001
Entity.actVisible=0
AddEntity
Entity.h.v=80020001
Entity.type=3010
Entity.construction=0
Entity.point[0].v=80020002
Entity.actNormal.w=1.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80020002
Entity.type=2012
Entity.construction=0
Entity.actVisible=1
AddEntity
Entity.h.v=80030002
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=10.00000000000000000000
Entity.actPoint.y=10.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030003
Entity.type=3011
Entity.construction=0
Entity.point[0].v=80030002
Entity.actNormal.w=1.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030005
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=10.00000000000000000000
Entity.actPoint.y=10.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030006
Entity.type=3011
Entity.construction=0
Entity.point[0].v=80030005
Entity.actNormal.w=0.50000000000000000000
Entity.actNormal.vx=0.50000000000000000000
Entity.actNormal.vy=0.50000000000000000000
Entity.actNormal.vz=0.50000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030008
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=10.00000000000000000000
Entity.actPoint.y=10.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030009
Entity.type=3011
Entity.construction=0
Entity.point[0].v=80030008
Entity.actNormal.w=0.50000000000000000000
Entity.actNormal.vx=-0.50000000000000000000
Entity.actNormal.vy=-0.50000000000000000000
Entity.actNormal.vz=-0.50000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=8003000a
Entity.type=11000
Entity.construction=0
Entity.point[0].v=8003000b
Entity.point[1].v=8003000c
Entity.actVisible=1
AddEntity
Entity.h.v=8003000b
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=15.00000000000000000000
Entity.actPoint.y=5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=8003000c
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=15.00000000000000000000
Entity.actPoint.y=15.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=8003000d
Entity.type=11000
Entity.construction=0
Entity.point[0].v=8003000e
Entity.point[1].v=8003000f
Entity.actVisible=1
AddEntity
Entity.h.v=8003000e
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=5.00000000000000000000
Entity.actPoint.y=5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=8003000f
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=15.00000000000000000000
Entity.actPoint.y=5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030010
Entity.type=11000
Entity.construction=0
Entity.point[0].v=80030011
Entity.point[1].v=80030012
Entity.actVisible=1
AddEntity
Entity.h.v=80030011
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=5.00000000000000000000
Entity.actPoint.y=15.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030012
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=5.00000000000000000000
Entity.actPoint.y=5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030013
Entity.type=11000
Entity.construction=0
Entity.point[0].v=80030014
Entity.point[1].v=80030015
Entity.actVisible=1
AddEntity
Entity.h.v=80030014
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=15.00000000000000000000
Entity.actPoint.y=15.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030015
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=5.00000000000000000000
Entity.actPoint.y=15.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030017
Entity.type=3011
Entity.construction=0
Entity.point[0].v=80030018
Entity.actNormal.w=1.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80030018
Entity.type=2011
Entity.construction=0
Entity.actPoint.x=10.00000000000000000000
Entity.actPoint.y=10.00000000000000000000
Entity.actVisible=1
AddEntity

View File

@ -0,0 +1,510 @@
±²³SolveSpaceREVa
Group.h.v=00000001
Group.type=5000
Group.name=#references
Group.skipFirst=0
Group.predef.swapUV=0
Group.predef.negateU=0
Group.predef.negateV=0
Group.visible=1
Group.suppress=0
Group.relaxConstraints=0
Group.allDimsReference=0
Group.remap={
}
Group.impFile=
Group.impFileRel=
AddGroup
Group.h.v=00000002
Group.type=5001
Group.order=1
Group.name=sketch-in-plane
Group.activeWorkplane.v=80020000
Group.subtype=6000
Group.skipFirst=0
Group.predef.q.w=1.00000000000000000000
Group.predef.origin.v=00010001
Group.predef.swapUV=0
Group.predef.negateU=0
Group.predef.negateV=0
Group.visible=1
Group.suppress=0
Group.relaxConstraints=0
Group.allDimsReference=0
Group.remap={
}
Group.impFile=
Group.impFileRel=
AddGroup
Param.h.v.=00010010
AddParam
Param.h.v.=00010011
AddParam
Param.h.v.=00010012
AddParam
Param.h.v.=00010020
Param.val=1.00000000000000000000
AddParam
Param.h.v.=00010021
AddParam
Param.h.v.=00010022
AddParam
Param.h.v.=00010023
AddParam
Param.h.v.=00020010
AddParam
Param.h.v.=00020011
AddParam
Param.h.v.=00020012
AddParam
Param.h.v.=00020020
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00020021
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00020022
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00020023
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00030010
AddParam
Param.h.v.=00030011
AddParam
Param.h.v.=00030012
AddParam
Param.h.v.=00030020
Param.val=0.50000000000000000000
AddParam
Param.h.v.=00030021
Param.val=-0.50000000000000000000
AddParam
Param.h.v.=00030022
Param.val=-0.50000000000000000000
AddParam
Param.h.v.=00030023
Param.val=-0.50000000000000000000
AddParam
Param.h.v.=00040010
Param.val=5.00000000000000000000
AddParam
Param.h.v.=00040011
Param.val=-5.00000000000000000000
AddParam
Param.h.v.=00040013
Param.val=5.00000000000000000000
AddParam
Param.h.v.=00040014
Param.val=5.00000000000000000000
AddParam
Param.h.v.=00050010
Param.val=-5.00000000000000000000
AddParam
Param.h.v.=00050011
Param.val=-5.00000000000000000000
AddParam
Param.h.v.=00050013
Param.val=5.00000000000000000000
AddParam
Param.h.v.=00050014
Param.val=-5.00000000000000000000
AddParam
Param.h.v.=00060010
Param.val=-5.00000000000000000000
AddParam
Param.h.v.=00060011
Param.val=5.00000000000000000000
AddParam
Param.h.v.=00060013
Param.val=-5.00000000000000000000
AddParam
Param.h.v.=00060014
Param.val=-5.00000000000000000000
AddParam
Param.h.v.=00070010
Param.val=5.00000000000000000000
AddParam
Param.h.v.=00070011
Param.val=5.00000000000000000000
AddParam
Param.h.v.=00070013
Param.val=-5.00000000000000000000
AddParam
Param.h.v.=00070014
Param.val=5.00000000000000000000
AddParam
Request.h.v=00000001
Request.type=100
Request.group.v=00000001
Request.construction=0
AddRequest
Request.h.v=00000002
Request.type=100
Request.group.v=00000001
Request.construction=0
AddRequest
Request.h.v=00000003
Request.type=100
Request.group.v=00000001
Request.construction=0
AddRequest
Request.h.v=00000004
Request.type=200
Request.workplane.v=80020000
Request.group.v=00000002
Request.construction=0
AddRequest
Request.h.v=00000005
Request.type=200
Request.workplane.v=80020000
Request.group.v=00000002
Request.construction=0
AddRequest
Request.h.v=00000006
Request.type=200
Request.workplane.v=80020000
Request.group.v=00000002
Request.construction=0
AddRequest
Request.h.v=00000007
Request.type=200
Request.workplane.v=80020000
Request.group.v=00000002
Request.construction=0
AddRequest
Entity.h.v=00010000
Entity.type=10000
Entity.construction=0
Entity.point[0].v=00010001
Entity.normal.v=00010020
Entity.actVisible=1
AddEntity
Entity.h.v=00010001
Entity.type=2000
Entity.construction=0
Entity.actVisible=1
AddEntity
Entity.h.v=00010020
Entity.type=3000
Entity.construction=0
Entity.point[0].v=00010001
Entity.actNormal.w=1.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=00020000
Entity.type=10000
Entity.construction=0
Entity.point[0].v=00020001
Entity.normal.v=00020020
Entity.actVisible=1
AddEntity
Entity.h.v=00020001
Entity.type=2000
Entity.construction=0
Entity.actVisible=1
AddEntity
Entity.h.v=00020020
Entity.type=3000
Entity.construction=0
Entity.point[0].v=00020001
Entity.actNormal.w=0.50000000000000000000
Entity.actNormal.vx=0.50000000000000000000
Entity.actNormal.vy=0.50000000000000000000
Entity.actNormal.vz=0.50000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=00030000
Entity.type=10000
Entity.construction=0
Entity.point[0].v=00030001
Entity.normal.v=00030020
Entity.actVisible=1
AddEntity
Entity.h.v=00030001
Entity.type=2000
Entity.construction=0
Entity.actVisible=1
AddEntity
Entity.h.v=00030020
Entity.type=3000
Entity.construction=0
Entity.point[0].v=00030001
Entity.actNormal.w=0.50000000000000000000
Entity.actNormal.vx=-0.50000000000000000000
Entity.actNormal.vy=-0.50000000000000000000
Entity.actNormal.vz=-0.50000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=00040000
Entity.type=11000
Entity.construction=0
Entity.point[0].v=00040001
Entity.point[1].v=00040002
Entity.workplane.v=80020000
Entity.actVisible=1
AddEntity
Entity.h.v=00040001
Entity.type=2001
Entity.construction=0
Entity.workplane.v=80020000
Entity.actPoint.x=5.00000000000000000000
Entity.actPoint.y=-5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=00040002
Entity.type=2001
Entity.construction=0
Entity.workplane.v=80020000
Entity.actPoint.x=5.00000000000000000000
Entity.actPoint.y=5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=00050000
Entity.type=11000
Entity.construction=0
Entity.point[0].v=00050001
Entity.point[1].v=00050002
Entity.workplane.v=80020000
Entity.actVisible=1
AddEntity
Entity.h.v=00050001
Entity.type=2001
Entity.construction=0
Entity.workplane.v=80020000
Entity.actPoint.x=-5.00000000000000000000
Entity.actPoint.y=-5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=00050002
Entity.type=2001
Entity.construction=0
Entity.workplane.v=80020000
Entity.actPoint.x=5.00000000000000000000
Entity.actPoint.y=-5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=00060000
Entity.type=11000
Entity.construction=0
Entity.point[0].v=00060001
Entity.point[1].v=00060002
Entity.workplane.v=80020000
Entity.actVisible=1
AddEntity
Entity.h.v=00060001
Entity.type=2001
Entity.construction=0
Entity.workplane.v=80020000
Entity.actPoint.x=-5.00000000000000000000
Entity.actPoint.y=5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=00060002
Entity.type=2001
Entity.construction=0
Entity.workplane.v=80020000
Entity.actPoint.x=-5.00000000000000000000
Entity.actPoint.y=-5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=00070000
Entity.type=11000
Entity.construction=0
Entity.point[0].v=00070001
Entity.point[1].v=00070002
Entity.workplane.v=80020000
Entity.actVisible=1
AddEntity
Entity.h.v=00070001
Entity.type=2001
Entity.construction=0
Entity.workplane.v=80020000
Entity.actPoint.x=5.00000000000000000000
Entity.actPoint.y=5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=00070002
Entity.type=2001
Entity.construction=0
Entity.workplane.v=80020000
Entity.actPoint.x=-5.00000000000000000000
Entity.actPoint.y=5.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80020000
Entity.type=10000
Entity.construction=0
Entity.point[0].v=80020002
Entity.normal.v=80020001
Entity.actVisible=1
AddEntity
Entity.h.v=80020001
Entity.type=3010
Entity.construction=0
Entity.point[0].v=80020002
Entity.actNormal.w=1.00000000000000000000
Entity.actVisible=1
AddEntity
Entity.h.v=80020002
Entity.type=2012
Entity.construction=0
Entity.actVisible=1
AddEntity
Constraint.h.v=00000001
Constraint.type=20
Constraint.group.v=00000002
Constraint.workplane.v=80020000
Constraint.ptA.v=00040001
Constraint.ptB.v=00050002
Constraint.other=0
Constraint.other2=0
Constraint.reference=0
AddConstraint
Constraint.h.v=00000002
Constraint.type=20
Constraint.group.v=00000002
Constraint.workplane.v=80020000
Constraint.ptA.v=00050001
Constraint.ptB.v=00060002
Constraint.other=0
Constraint.other2=0
Constraint.reference=0
AddConstraint
Constraint.h.v=00000003
Constraint.type=20
Constraint.group.v=00000002
Constraint.workplane.v=80020000
Constraint.ptA.v=00060001
Constraint.ptB.v=00070002
Constraint.other=0
Constraint.other2=0
Constraint.reference=0
AddConstraint
Constraint.h.v=00000004
Constraint.type=20
Constraint.group.v=00000002
Constraint.workplane.v=80020000
Constraint.ptA.v=00070001
Constraint.ptB.v=00040002
Constraint.other=0
Constraint.other2=0
Constraint.reference=0
AddConstraint
Constraint.h.v=00000005
Constraint.type=81
Constraint.group.v=00000002
Constraint.workplane.v=80020000
Constraint.entityA.v=00040000
Constraint.other=0
Constraint.other2=0
Constraint.reference=0
AddConstraint
Constraint.h.v=00000006
Constraint.type=80
Constraint.group.v=00000002
Constraint.workplane.v=80020000
Constraint.entityA.v=00050000
Constraint.other=0
Constraint.other2=0
Constraint.reference=0
AddConstraint
Constraint.h.v=00000007
Constraint.type=81
Constraint.group.v=00000002
Constraint.workplane.v=80020000
Constraint.entityA.v=00060000
Constraint.other=0
Constraint.other2=0
Constraint.reference=0
AddConstraint
Constraint.h.v=00000008
Constraint.type=80
Constraint.group.v=00000002
Constraint.workplane.v=80020000
Constraint.entityA.v=00070000
Constraint.other=0
Constraint.other2=0
Constraint.reference=0
AddConstraint

17
test/group/link/test.cpp Normal file
View File

@ -0,0 +1,17 @@
#include "harness.h"
TEST_CASE(normal_roundtrip) {
CHECK_LOAD("normal.slvs");
CHECK_RENDER("normal.png");
CHECK_SAVE("normal.slvs");
}
TEST_CASE(normal_migrate_from_v20) {
CHECK_LOAD("normal_v20.slvs");
CHECK_SAVE("normal.slvs");
}
TEST_CASE(normal_migrate_from_v22) {
CHECK_LOAD("normal_v22.slvs");
CHECK_SAVE("normal.slvs");
}

View File

@ -116,6 +116,7 @@ static std::string PrepareSavefile(std::string data) {
if(eqPos < nextLineBegin) {
std::string key = data.substr(lineBegin, eqPos - lineBegin),
value = data.substr(eqPos + 1, nextLineBegin - eqPos - 2);
for(int i = 0; SolveSpaceUI::SAVED[i].type != 0; i++) {
if(SolveSpaceUI::SAVED[i].fmt != 'f') continue;
if(SolveSpaceUI::SAVED[i].desc != key) continue;
@ -126,6 +127,11 @@ static std::string PrepareSavefile(std::string data) {
std::copy(newValue.begin(), newValue.end(),
data.begin() + eqPos + 1);
}
if(key == "Group.impFile") {
data.erase(lineBegin, nextLineBegin - lineBegin);
nextLineBegin = lineBegin;
}
}
size_t spPos = data.find(' ', lineBegin);