protected override void OnInitialize() { Reset(); Rendering = Graphic.Create(null, null, LawsonToolGraphics.GetGraphic(p, q, circleAngle, inverseOffset)); // SelectionTypes = new[] { typeof(DesignFace), typeof(CustomObject) }; bzc }
protected override void OnDragMove(System.Drawing.Point cursorPos, Line cursorRay) { //if (profile == null) // return; //Point point; //if (!profilePlane.TryIntersectLine(cursorRay, out point)) // return; // plane is side-on p += ((double)lastCursorPos.Value.X - cursorPos.X) * cursorScale; q += ((double)lastCursorPos.Value.Y - cursorPos.Y) * cursorScale; ////circleAngle += ((double)lastCursorPos.Value.X - cursorPos.X) * cursorScale; //inverseOffset = Vector.Create( // ((double)lastCursorPos.Value.X - cursorPos.X) * cursorScale, // ((double)lastCursorPos.Value.Y - cursorPos.Y) * cursorScale, // inverseOffset.Z //); lastCursorPos = cursorPos; circleAngle = Math.PI / 4; Rendering = Graphic.Create(null, null, LawsonToolGraphics.GetGraphic(p, q, circleAngle, inverseOffset)); // Rendering = Graphic.Create(null, null, Profile.GetGraphic(p, q, circleAngle, true, inverseOffset)); //Apply(String.Format("p:{0} q:{1} circleAngle:{2} inverseOffset:{3}", p, q, circleAngle, inverseOffset.ToString())); }