Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UFrameIT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FrameIT
UFrameIT
Commits
bc5f9f43
Commit
bc5f9f43
authored
3 years ago
by
Marcel Dreier
Browse files
Options
Downloads
Patches
Plain Diff
misc things
parent
3a63ea1f
No related branches found
No related tags found
1 merge request
!1
feat: added visualisation for CircleFact; added Torus- and ConeGenerator
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Assets/Scripts/InteractionEngine/FactHandling/Fact.cs
+60
-12
60 additions, 12 deletions
Assets/Scripts/InteractionEngine/FactHandling/Fact.cs
Assets/Scripts/JSONManager.cs
+2
-2
2 additions, 2 deletions
Assets/Scripts/JSONManager.cs
with
62 additions
and
14 deletions
Assets/Scripts/InteractionEngine/FactHandling/Fact.cs
+
60
−
12
View file @
bc5f9f43
...
...
@@ -1714,7 +1714,10 @@ public CircleFact(string Pid1, string Pid2, float radius, Vector3 normal, string
public
new
static
CircleFact
parseFact
(
Scroll
.
ScrollFact
fact
)
{
string
uri
=
fact
.
@ref
.
uri
;
string
M_uri
=
""
;
string
A_uri
=
""
;
float
radius
=
0.0f
;
Vector3
normal
=
Vector3
.
zero
;
OMA
df
=
(
OMA
)((
Scroll
.
ScrollSymbolFact
)
fact
).
df
;
if
(
df
==
null
)
...
...
@@ -1723,22 +1726,66 @@ public CircleFact(string Pid1, string Pid2, float radius, Vector3 normal, string
Scroll
.
ScrollSymbolFact
casted_fact
=
(
Scroll
.
ScrollSymbolFact
)
fact
;
// get the mid point uri
string
parse_id_M
=
ParsingDictionary
.
MMTermToString
(((
OMA
)
casted_fact
.
df
).
arguments
[
1
]);
Debug
.
Log
(
"parse_id_M "
+
parse_id_M
);
M_uri
=
ParsingDictionary
.
parseTermsToId
[
parse_id_M
];
Debug
.
Log
(
"M URI "
+
M_uri
);
// get the radius
radius
=
((
OMF
)((
OMA
)
casted_fact
.
df
).
arguments
[
2
]).
f
;
OMA
planeOMA
=
(
OMA
)((
OMA
)
casted_fact
.
df
).
arguments
[
0
];
string
planeApplicant
=
((
OMS
)
planeOMA
.
applicant
).
uri
;
// Getting the plane
// IN case of a normale plane
if
(
planeApplicant
.
Equals
(
MMTURIs
.
pointNormalPlane
))
{
Debug
.
Log
(
"planeApplicant"
+
planeApplicant
);
OMA
pointAOMA
=
(
OMA
)
planeOMA
.
arguments
[
0
];
string
parse_id_A
=
ParsingDictionary
.
MMTermToString
(
planeOMA
.
arguments
[
0
]);
A_uri
=
ParsingDictionary
.
parseTermsToId
[
parse_id_A
];
OMA
n
=
(
OMA
)
planeOMA
.
arguments
[
1
];
Vector3
normal
=
new
Vector3
(((
OMF
)
n
.
arguments
[
0
]).
f
,
((
OMF
)
n
.
arguments
[
1
]).
f
,
((
OMF
)
n
.
arguments
[
2
]).
f
);
normal
=
new
Vector3
(((
OMF
)
n
.
arguments
[
0
]).
f
,
((
OMF
)
n
.
arguments
[
1
]).
f
,
((
OMF
)
n
.
arguments
[
2
]).
f
);
Debug
.
Log
(
"Norm "
+
normal
.
ToString
());
// get the mid point uri
string
parse_id_M
=
ParsingDictionary
.
MMTermToString
(((
OMA
)
casted_fact
.
df
).
arguments
[
1
]);
string
M_uri
=
ParsingDictionary
.
parseTermsToId
[
parse_id_M
];
}
// In case of parametrized plane
else
if
(
planeApplicant
.
Equals
(
MMTURIs
.
ParametrizedPlane
))
{
Debug
.
Log
(
"planeApplicant"
+
planeApplicant
);
OMA
pointAOMA
=
(
OMA
)
planeOMA
.
arguments
[
0
];
string
parse_id_A
=
ParsingDictionary
.
MMTermToString
(
planeOMA
.
arguments
[
0
]);
string
A_uri
=
ParsingDictionary
.
parseTermsToId
[
parse_id_A
];
A_uri
=
ParsingDictionary
.
parseTermsToId
[
parse_id_A
];
OMA
vOMA
=
(
OMA
)
planeOMA
.
arguments
[
1
];
OMA
wOMA
=
(
OMA
)
planeOMA
.
arguments
[
2
];
Vector3
v
=
new
Vector3
(((
OMF
)
vOMA
.
arguments
[
0
]).
f
,
((
OMF
)
vOMA
.
arguments
[
1
]).
f
,
((
OMF
)
vOMA
.
arguments
[
2
]).
f
);
Vector3
w
=
new
Vector3
(((
OMF
)
wOMA
.
arguments
[
0
]).
f
,
((
OMF
)
wOMA
.
arguments
[
1
]).
f
,
((
OMF
)
wOMA
.
arguments
[
2
]).
f
);
normal
=
Vector3
.
Cross
(
v
,
w
).
normalized
;
Debug
.
Log
(
"Para "
+
normal
.
ToString
());
}
else
{
Debug
.
Log
(
"planeApplicant"
+
planeApplicant
);
Debug
.
Log
(
"?? "
+
MMTURIs
.
pointNormalPlane
);
return
null
;
}
// get the radius
float
radius
=
((
OMF
)((
OMA
)
casted_fact
.
df
).
arguments
[
2
]).
f
;
if
(
StageStatic
.
stage
.
factState
.
ContainsKey
(
M_uri
)
...
...
@@ -1770,6 +1817,7 @@ private MMTDeclaration generateCircleFactDeclaration( string p1URI, string p2URI
PointFact
p1
=
_Facts
[
p1URI
]
as
PointFact
;
PointFact
p2
=
_Facts
[
p2URI
]
as
PointFact
;
List
<
MMTTerm
>
normalArgs
=
new
List
<
MMTTerm
>
{
new
OMF
(
normal
.
x
),
...
...
This diff is collapsed.
Click to expand it.
Assets/Scripts/JSONManager.cs
+
2
−
2
View file @
bc5f9f43
...
...
@@ -38,8 +38,8 @@ public class MMTURICollection
public
string
ConeOfCircleApex
=
"http://mathhub.info/FrameIT/frameworld?FrameITCone?circleConeOf"
;
public
string
ParametrizedPlane
=
"http://mathhub.info/MitM/core/geometry?
Geometry/
Planes?ParametrizedPlane"
;
public
string
pointNormalPlane
=
"http://mathhub.info/MitM/core/geometry?
Geometry/
Planes?pointNormalPlane"
;
public
string
ParametrizedPlane
=
"http://mathhub.info/MitM/core/geometry?Planes?ParametrizedPlane"
;
public
string
pointNormalPlane
=
"http://mathhub.info/MitM/core/geometry?Planes?pointNormalPlane"
;
public
string
OnCircle
=
"http://mathhub.info/FrameIT/frameworld?FrameITCircle?pointOnCircle"
;
public
string
AnglePlaneLine
=
"http://mathhub.info/FrameIT/frameworld?FrameITCircle?angleCircleLine"
;
public
string
OrthoCircleLine
=
"http://mathhub.info/FrameIT/frameworld?FrameITCircle?orthogonalCircleLine"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment