public static AngleFact parseFact(Scroll.ScrollFact fact) { string uri = [email protected]; string pointAUri, pointBUri, pointCUri; //If angle is not a 90Degree-Angle if (fact.GetType().Equals(typeof(Scroll.ScrollValueFact))) { pointAUri = ((OMS)((OMA)((Scroll.ScrollValueFact)fact).lhs).arguments[0]).uri; pointBUri = ((OMS)((OMA)((Scroll.ScrollValueFact)fact).lhs).arguments[1]).uri; pointCUri = ((OMS)((OMA)((Scroll.ScrollValueFact)fact).lhs).arguments[2]).uri; } //If angle is a 90Degree-Angle else { pointAUri = ((OMS)((OMA)((OMA)((OMA)((Scroll.ScrollSymbolFact)fact).tp).arguments[0]).arguments[1]).arguments[0]).uri; pointBUri = ((OMS)((OMA)((OMA)((OMA)((Scroll.ScrollSymbolFact)fact).tp).arguments[0]).arguments[1]).arguments[1]).uri; pointCUri = ((OMS)((OMA)((OMA)((OMA)((Scroll.ScrollSymbolFact)fact).tp).arguments[0]).arguments[1]).arguments[2]).uri; } if (StageStatic.stage.factState.ContainsKey(pointAUri) && StageStatic.stage.factState.ContainsKey(pointBUri) && StageStatic.stage.factState.ContainsKey(pointCUri)) { return(new AngleFact(pointAUri, pointBUri, pointCUri, uri, StageStatic.stage.factState)); } else //If dependent facts do not exist return null { return(null); } }
public static PointFact parseFact(Scroll.ScrollFact fact) { String uri = [email protected]; OMA df = (OMA)((Scroll.ScrollSymbolFact)fact).df; if (df != null) { float a = (float)((OMF)df.arguments[0]).f; float b = (float)((OMF)df.arguments[1]).f; float c = (float)((OMF)df.arguments[2]).f; return(new PointFact(a, b, c, uri, StageStatic.stage.factState)); } else { return(null); } }
public static OnLineFact parseFact(Scroll.ScrollFact fact) { string uri = [email protected]; string lineUri = ((OMS)((OMA)((OMA)((Scroll.ScrollSymbolFact)fact).tp).arguments[0]).arguments[0]).uri; string pointUri = ((OMS)((OMA)((OMA)((Scroll.ScrollSymbolFact)fact).tp).arguments[0]).arguments[1]).uri; if (StageStatic.stage.factState.ContainsKey(pointUri) && StageStatic.stage.factState.ContainsKey(lineUri)) { return(new OnLineFact(pointUri, lineUri, uri, StageStatic.stage.factState)); } //If dependent facts do not exist return null else { return(null); } }
public static LineFact parseFact(Scroll.ScrollFact fact) { string uri = [email protected]; 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 LineFact(pointAUri, pointBUri, uri, StageStatic.stage.factState)); } //If dependent facts do not exist return null else { return(null); } }
public static RayFact parseFact(Scroll.ScrollFact fact) { string uri = [email protected]; if ((OMA)((Scroll.ScrollSymbolFact)fact).df != null) { string pointAUri = ((OMS)((OMA)((Scroll.ScrollSymbolFact)fact).df).arguments[0]).uri; string pointBUri = ((OMS)((OMA)((Scroll.ScrollSymbolFact)fact).df).arguments[1]).uri; if (StageStatic.stage.factState.ContainsKey(pointAUri) && StageStatic.stage.factState.ContainsKey(pointBUri)) { return(new RayFact(pointAUri, pointBUri, uri, StageStatic.stage.factState)); } //If dependent facts do not exist return null } return(null); }