File: ProjectionLineConstraint.scn

package info (click to toggle)
sofa-framework 1.0~beta4-11
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 88,820 kB
  • ctags: 27,300
  • sloc: cpp: 151,126; ansic: 2,387; xml: 581; sh: 417; makefile: 68
file content (153 lines) | stat: -rw-r--r-- 4,244 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<Node name="root"  dt="0.005" showBehaviorModels="1" showCollisionModels="0" showMappings="0" showForceFields="1">
	
	<Object type="CollisionPipeline" depth="6" verbose="0" draw="0"/>
	<Object type="BruteForceDetection" name="N2" />
	<Object type="MinProximityIntersection" name="Proximity" alarmDistance="0.5" contactDistance="0.3" />
	<Object type="CollisionResponse" name="Response" response="default" />
	<Object type="CollisionGroup" name="Group" />
	
	
	<Node name="Bilateral ProjectionOnSegment">
		
		
		<Object type="EulerImplicit" name="cg_odesolver" printLog="false"/>
		<Object type="CGLinearSolver" iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
		
		
		<Object type="MechanicalObject" position="0 5 0 1 5 0 2 5 0 3 5 0  4 5 0 5 5 0 6 5 0 7 5 0 8 5 0 9 5 0 10 5 0"/>
		
		<Object type="UniformMass" mass="1"/>
		
		<Object type="FixedConstraint" indices="0 10"/>
		
		<Object type="ProjectionLineConstraint" indices="5" line="1 9" isSegment="true" bilateral="true"/>
		
		<Object type="StiffSpringForceField"  spring="0 1 100 5 1
				  1 2 100 5 1
				  2 3 100 5 1
				  3 4 100 5 1
				  4 5 100 5 1
				  5 6 100 5 1
				  6 7 100 5 1
				  7 8 100 5 1
				  8 9 100 5 1
				  9 10 100 5 1"/>
		
		<Node name="col">
			<Object type="Sphere" radius=".5"/>
			<Object type="IdentityMapping"/>
		</Node>		
		
	</Node>
	
	
	
	<Node name="Bilateral ProjectionOnLine">
		
		
 	        <Object type="EulerImplicit" name="cg_odesolver" printLog="false"/>
		<Object type="CGLinearSolver" iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
		
		
		<Object type="MechanicalObject" position="0 0 0 1 0 0 2 0 0 3 0 0  4 0 0 5 0 0 6 0 0 7 0 0 8 0 0 9 0 0 10 0 0"/>
		
		<Object type="UniformMass" mass="1"/>
		
		<Object type="FixedConstraint" indices="0 10"/>
		
		<Object type="ProjectionLineConstraint" indices="5" line="1 9" isSegment="false" bilateral="true"/>
		
		<Object type="StiffSpringForceField"  spring="0 1 100 5 1
				  													 1 2 100 5 1
																	 2 3 100 5 1
																	 3 4 100 5 1
																	 4 5 100 5 1
																	 5 6 100 5 1
																	 6 7 100 5 1
																	 7 8 100 5 1
																	 8 9 100 5 1
																	 9 10 100 5 1"/>

		<Node name="col">
			<Object type="Sphere" radius=".5"/>
			<Object type="IdentityMapping"/>
		</Node>		
		
	</Node>
	
	
	
	
	
	<Node name="Unilateral ProjectionOnSegment">
		
		
		<Object type="EulerImplicit" name="cg_odesolver" printLog="false"/>
		<Object type="CGLinearSolver" iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
		
		
		<Object type="MechanicalObject" position="15 5 0 16 5 0 17 5 0 18 5 0  19 5 0 20 5 0 21 5 0 22 5 0 23 5 0 24 5 0 25 5 0"/>
		
		<Object type="UniformMass" mass="1"/>
		
		<Object type="FixedConstraint" indices="0 10"/>
		
		<Object type="ProjectionLineConstraint" indices="5" line="1 9" isSegment="true" bilateral="false"/>
		
		<Object type="StiffSpringForceField"  spring="0 1 100 5 1
				  1 2 100 5 1
				  2 3 100 5 1
				  3 4 100 5 1
				  4 5 100 5 1
				  5 6 100 5 1
				  6 7 100 5 1
				  7 8 100 5 1
				  8 9 100 5 1
				  9 10 100 5 1"/>
		
		<Node name="col">
			<Object type="Sphere" radius=".5"/>
			<Object type="IdentityMapping"/>
		</Node>		
		
	</Node>
	
	
	
	<Node name="Unilateral ProjectionOnLine">
		
		
		<Object type="EulerImplicit" name="cg_odesolver" printLog="false"/>
		<Object type="CGLinearSolver" iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
		
		
		<Object type="MechanicalObject" position="15 0 0 16 0 0 17 0 0 18 0 0  19 0 0 20 0 0 21 0 0 22 0 0 23 0 0 24 0 0 25 0 0"/>
		
		<Object type="UniformMass" mass="1"/>
		
		<Object type="FixedConstraint" indices="0 10"/>
		
		<Object type="ProjectionLineConstraint" indices="5" line="1 9" isSegment="false" bilateral="false"/>
		
		<Object type="StiffSpringForceField"  spring="0 1 100 5 1
				  1 2 100 5 1
				  2 3 100 5 1
				  3 4 100 5 1
				  4 5 100 5 1
				  5 6 100 5 1
				  6 7 100 5 1
				  7 8 100 5 1
				  8 9 100 5 1
				  9 10 100 5 1"/>
		
		<Node name="col">
			<Object type="Sphere" radius=".5"/>
			<Object type="IdentityMapping"/>
		</Node>		
		
	</Node>
	
	
	
	
</Node>