diff --git a/Assets/Scripts/InteractionEngine/FactHandling/Fact.cs b/Assets/Scripts/InteractionEngine/FactHandling/Fact.cs index ba3376a0ccd6905b41c8ec6eb71aa7342f14806d..41e889902c1108a008484f736a7da668e899c699 100644 --- a/Assets/Scripts/InteractionEngine/FactHandling/Fact.cs +++ b/Assets/Scripts/InteractionEngine/FactHandling/Fact.cs @@ -619,7 +619,6 @@ public PointFact(float a, float b, float c, string uri, FactOrganizer organizer) String uri = fact.@ref.uri; OMA df = (OMA)((Scroll.ScrollSymbolFact)fact).df; - Debug.Log("Point decomposed :"+ParsingDictionary.MMTermToString(df)); if (df == null) @@ -632,7 +631,6 @@ public PointFact(float a, float b, float c, string uri, FactOrganizer organizer) string parse_id = ParsingDictionary.MMTermToString(df); - Debug.Log("point added: " + parse_id); if(!ParsingDictionary.parseTermsToId.ContainsKey(parse_id)) ParsingDictionary.parseTermsToId[parse_id] = uri; @@ -848,7 +846,6 @@ private void init(string pid1, string pid2) MMTSymbolDeclaration mmtDecl = new MMTSymbolDeclaration(this.Label, tp, df); AddFactResponse.sendAdd(mmtDecl, out this._URI); string parse_id = ParsingDictionary.MMTermToString(df); - Debug.Log("point added: " + parse_id); ParsingDictionary.parseTermsToId[parse_id] = this._URI; @@ -860,17 +857,7 @@ private void init(string pid1, string pid2) string uri = fact.@ref.uri; - // temporary fix to the problem, that actually calculating stuff leads to losing the IDS - /** if (fact.kind == "veq") { - Debug.Log("RayFact veq activated"); - string pointAUri = ((OMS)((OMA)((Scroll.ScrollValueFact)fact).lhs).arguments[0]).uri; - string pointBUri = ((OMS)((OMA)((Scroll.ScrollValueFact)fact).lhs).arguments[1]).uri; - if (StageStatic.stage.factState.ContainsKey(pointAUri) - && StageStatic.stage.factState.ContainsKey(pointBUri)) - return new RayFact(pointAUri, pointBUri, uri, StageStatic.stage.factState); - - return null; - }*/ + if ((OMA)((Scroll.ScrollSymbolFact)fact).df == null) return null; @@ -1737,9 +1724,8 @@ public CircleFact(string Pid1, string Pid2, float radius, Vector3 normal, string // 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; @@ -1752,7 +1738,7 @@ public CircleFact(string Pid1, string Pid2, float radius, Vector3 normal, string // IN case of a normale plane if (planeApplicant.Equals(MMTURIs.pointNormalPlane)) { - Debug.Log("planeApplicant" + planeApplicant); + OMA pointAOMA = (OMA)planeOMA.arguments[0]; @@ -1761,14 +1747,14 @@ public CircleFact(string Pid1, string Pid2, float radius, Vector3 normal, string OMA n = (OMA)planeOMA.arguments[1]; normal = new Vector3(((OMF)n.arguments[0]).f, ((OMF)n.arguments[1]).f, ((OMF)n.arguments[2]).f); - Debug.Log("Norm " + normal.ToString()); + } // 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]); @@ -1783,9 +1769,10 @@ public CircleFact(string Pid1, string Pid2, float radius, Vector3 normal, string normal = Vector3.Cross(v, w).normalized; - Debug.Log("Para "+normal.ToString()); + } + // incase of smth else. Shouldn't hapepen unless there is an error else { Debug.Log("planeApplicant" + planeApplicant); Debug.Log("?? " + MMTURIs.pointNormalPlane); @@ -4008,13 +3995,12 @@ protected override bool EquivalentWrapped(UnEqualCirclesFact f1, UnEqualCirclesF /// TEST FACT -/// +/// use this if you need to test certain implementations of facts. -//TODO big work in progress Circle Wrapper /// TODO Work in Progress /// <summary> -/// A Circle that is made out of a middle point, a plane and a radius +/// just for testing purposes /// </summary> public class TestFact : FactWrappedCRTP<TestFact> { diff --git a/Assets/Scripts/InventoryStuff/ScrollDetails.cs b/Assets/Scripts/InventoryStuff/ScrollDetails.cs index b31178477cc6e8956d5feb9d80eafa60b6c296a7..509827e933c32da8aad1c65eb026765868607cb1 100644 --- a/Assets/Scripts/InventoryStuff/ScrollDetails.cs +++ b/Assets/Scripts/InventoryStuff/ScrollDetails.cs @@ -84,7 +84,6 @@ IEnumerator magicButton() } else { - Debug.Log("currentMMTAnswer"); Debug.Log(currentMmtAnswer); Scroll.ScrollApplicationInfo pushout = JsonConvert.DeserializeObject<Scroll.ScrollApplicationInfo>(currentMmtAnswer); readPushout(pushout.acquiredFacts); @@ -118,21 +117,17 @@ IEnumerator newAssignment() IEnumerator sendView(string endpoint) { string body = prepareScrollAssignments(); - Debug.Log("Send View "+body); - Debug.Log("Endpoint" + endpoint); System.DateTime startTime = System.DateTime.UtcNow; UnityWebRequest www = UnityWebRequest.Put(ServerAdress + endpoint, body); www.method = UnityWebRequest.kHttpVerbPOST; www.SetRequestHeader("Content-Type", "application/json"); var async = www.SendWebRequest(); - Debug.Log("Starting now"); while (!async.isDone) { //Non blocking wait for one frame, for letting the game do other things yield return null; } System.DateTime twoTime = System.DateTime.UtcNow; - Debug.Log("ALIVE"); if (www.result == UnityWebRequest.Result.ConnectionError || www.result == UnityWebRequest.Result.ProtocolError) @@ -150,10 +145,9 @@ IEnumerator sendView(string endpoint) string diffInSeconds = (endTime -startTime).TotalMilliseconds.ToString(); string diff = (twoTime - startTime).TotalMilliseconds.ToString(); - Debug.Log("TIME NEEDED: part1 " + diff +"||| time needed part2 : "+diffInSeconds); - Debug.Log("lenght of the answer: "+currentMmtAnswer.Length); + // Debug.Log("TIME NEEDED: part1 " + diff +"||| time needed part2 : "+diffInSeconds); + // Debug.Log("lenght of the answer: "+currentMmtAnswer.Length); - Debug.Log("THIS IS THE GIGANTIC ANSWER"+currentMmtAnswer); } private string prepareScrollAssignments() @@ -186,9 +180,9 @@ private void readPushout(List<Scroll.ScrollFact> pushoutFacts) for (int i = 0; i < pushoutFacts.Count; i++, samestep = true) { //TODO Delete - Debug.Log(pushoutFacts.Count); - Debug.Log("StartUri " +pushoutFacts[i].getType()+ " over"); - Debug.Log("Applicant" + pushoutFacts[i].getApplicant() + " over"); + //Debug.Log(pushoutFacts.Count); + //Debug.Log("StartUri " +pushoutFacts[i].getType()+ " over"); + //Debug.Log("Applicant" + pushoutFacts[i].getApplicant() + " over"); Fact newFact = ParsingDictionary.parseFactDictionary[pushoutFacts[i].getType()].Invoke(pushoutFacts[i]); if (newFact != null) @@ -249,7 +243,7 @@ public List<string> processRenderedScroll(Scroll rendered, List<string> hintUris //If ScrollFact is assigned -> No Hint if (obj.transform.GetChild(0).GetComponent<DropHandling>().currentFact == null) { - Debug.Log(" print out " + rendered.requiredFacts[i].getType()); + // Debug.Log(" print out " + rendered.requiredFacts[i].getType()); Fact currentFact = ParsingDictionary.parseFactDictionary[rendered.requiredFacts[i].getType()].Invoke(rendered.requiredFacts[i]); //If currentFact could be parsed: this fact maybe not yet exists in the global fact-list but there must be a fact // of the same type and the same dependent facts in the fact-list, otherwise currentFact could not have been parsed