diff --git a/Assets/Scripts/InteractionEngine/WorldCursor.cs b/Assets/Scripts/InteractionEngine/WorldCursor.cs index dd1feec0431c1816abd5719a867709848dcbdcbb..a2b59271488966346fad2489bcbefcedc210930a 100644 --- a/Assets/Scripts/InteractionEngine/WorldCursor.cs +++ b/Assets/Scripts/InteractionEngine/WorldCursor.cs @@ -166,10 +166,13 @@ void Update() else if (multipleHits[i].collider.gameObject.layer == LayerMask.NameToLayer("Ring")) { #region Ring + Debug.Log("PRINT"); var id = multipleHits[i].transform.GetComponent<FactObject>().URI; CircleFact circleFact = StageStatic.stage.factState[id] as CircleFact; PointFact middlePoint = StageStatic.stage.factState[circleFact.Pid1] as PointFact; var normal = circleFact.normal; + + // generate circle int pointCount = multipleHits[i].transform.GetComponentInParent<TorusGenerator>().ringSegmentCount; @@ -182,7 +185,7 @@ void Update() circle[j] = new Vector3(circleFact.radius * Mathf.Sin(angle), 0, circleFact.radius * Mathf.Cos(angle)) + middlePoint.Point; // rotate snappoint according to circle normal - circle[j] = Quaternion.LookRotation(new Vector3(-normal.z, 0, normal.x), normal) * circle[j]; + circle[j] = Quaternion.LookRotation(new Vector3(-normal.z, 0, normal.x), normal) * circle[j]; } // get closest cornerPoint diff --git a/Assets/Scripts/JSONManager.cs b/Assets/Scripts/JSONManager.cs index 007d3d609cb0dca132057d266c9ebf8cc80bbe48..7bc712241e72019ab60075f36cf855e468db7c32 100644 --- a/Assets/Scripts/JSONManager.cs +++ b/Assets/Scripts/JSONManager.cs @@ -25,29 +25,29 @@ public class MMTURICollection public string RealLit = "http://mathhub.info/MitM/Foundation?RealLiterals?real_lit"; public string ParallelLine = "http://mathhub.info/MitM/core/geometry?Geometry/Common?parallelLine"; - // public string RectangleFact = "http://mathhub.info/FrameIT/frameworld?FrameITRectangles?rectangle_type"; - // public string RectangleFactmk = "http://mathhub.info/FrameIT/frameworld?FrameITRectangles?mk_rectangle"; + // public string RectangleFact = "http://mathhub.info/FrameIT/frameworld?FrameITRectangles?rectangleType"; + // public string RectangleFactmk = "http://mathhub.info/FrameIT/frameworld?FrameITRectangles?mkRectangle"; - public string CircleType3d = "http://mathhub.info/FrameIT/frameworld?FrameITTheories?circle_type_3d"; - public string MkCircle3d = "http://mathhub.info/FrameIT/frameworld?FrameITTheories?circle_basic_definition_3d"; - public string TriangleMiddlePoint = "http://mathhub.info/FrameIT/frameworld?FrameITTriangles?triangle_mid_point_wrapper"; - public string RadiusCircleMetric = "http://mathhub.info/FrameIT/frameworld?FrameITTheories?circle_radius"; + public string CircleType3d = "http://mathhub.info/FrameIT/frameworld?FrameITCircle?circleType3D"; + public string MkCircle3d = "http://mathhub.info/FrameIT/frameworld?FrameITCircle?circle3D"; + public string TriangleMiddlePoint = "http://mathhub.info/FrameIT/frameworld?FrameITTriangles?triangleMidPointWrapper"; + public string RadiusCircleMetric = "http://mathhub.info/FrameIT/frameworld?FrameITCircle?circleRadius"; - public string AreaCircle = "http://mathhub.info/FrameIT/frameworld?FrameITTheories?area_circle"; - public string VolumeCone = "http://mathhub.info/FrameIT/frameworld?FrameITTheories?volume_cone"; - public string ConeOfCircleApex = "http://mathhub.info/FrameIT/frameworld?FrameITTheories?circle_cone_of"; + public string AreaCircle = "http://mathhub.info/FrameIT/frameworld?FrameITCircle?areaCircle"; + public string VolumeCone = "http://mathhub.info/FrameIT/frameworld?FrameITCone?volumeCone"; + 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 OnCircle = "http://mathhub.info/FrameIT/frameworld?FrameITTheories?point_on_circle"; - public string AnglePlaneLine = "http://mathhub.info/FrameIT/frameworld?FrameITTheories?angle_circle_line"; - public string OrthoCircleLine = "http://mathhub.info/FrameIT/frameworld?FrameITTheories?orthogonal_circle_line"; + 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"; - public string TruncatedVolumeCone = "http://mathhub.info/FrameIT/frameworld?FrameITTheories?truncated_cone_volume"; - public string ParallelCircles = "http://mathhub.info/FrameIT/frameworld?FrameITTheories?parallelCircles"; - public string RightAngle = "http://mathhub.info/FrameIT/frameworld?FrameITBasics?right_angle"; + public string TruncatedVolumeCone = "http://mathhub.info/FrameIT/frameworld?FrameITCone?truncatedConeVolume"; + public string ParallelCircles = "http://mathhub.info/FrameIT/frameworld?FrameITCone?parallelCircles"; + public string RightAngle = "http://mathhub.info/FrameIT/frameworld?FrameITBasics?rightAngle"; diff --git a/Assets/Scripts/MeshGenerator/TorusGenerator.cs b/Assets/Scripts/MeshGenerator/TorusGenerator.cs index 996574c010e12f6eeb44b4f816ba4d7325904845..fb22ec3bacd463a9c538c817a5e9f9428ed27f3f 100644 --- a/Assets/Scripts/MeshGenerator/TorusGenerator.cs +++ b/Assets/Scripts/MeshGenerator/TorusGenerator.cs @@ -30,7 +30,7 @@ protected override void GenerateShape() try { MeshCollider meshCol = GetComponentInChildren<MeshCollider>(); - meshCol.sharedMesh = torusMesh.mesh; + meshCol.sharedMesh = torusMesh.sharedMesh; } catch (Exception e) { } } diff --git a/ProjectSettings/Packages/com.unity.probuilder/Settings.json b/ProjectSettings/Packages/com.unity.probuilder/Settings.json index fedc56b8be2608760a85084b045e5105fcd2e0fa..6ced6d9f425ade6f53db5a77d8bd26e5c55256a5 100644 --- a/ProjectSettings/Packages/com.unity.probuilder/Settings.json +++ b/ProjectSettings/Packages/com.unity.probuilder/Settings.json @@ -32,11 +32,6 @@ "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "key": "lightmapping.autoUnwrapLightmapUV", "value": "{\"m_Value\":true}" - }, - { - "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", - "key": "editor.autoRecalculateCollisions", - "value": "{\"m_Value\":false}" } ] }