Wish. Ellipse from center, corner

Hi all!
Please help with tool for creating ellipses.
The same as the logic in command ! _Rectangle _Center
I would like to interactively control the width and height, and if necessary, enter the numbers appropriate height and width.

I wrote the following macros
! _Ellipse _Center _Pause _Corner
It helps to interactively control the width and height as well as in ! _Rectangle _Center, but I can not enter numbers appropriate height and width.

Any ideas?

Hi Leex- there are a couple of ways this could be scripted, for now- see if this is something like what you want- the bad news is there is no preview of the ellipse itself in this, which may make it useless for your needs- I’ll poke at it a little more.

To use the script, extract and save the .rvb file from the attached zip archive, then drag and drop the saved rvb over an open Rhino V4 or v5 window. This will load the script, set it up to load on startup in the future and register the alias

EllipseCenterCorner

that will run the script much like a regular command. An alias can be typed or added to a toolbar button or keyboard shortcut (F-key).

EllipseCenterCorner.zip(723 Bytes)
-Pascal

Hi Pascal
I drag and drop the saved rvb over an open Rhino v5 window.
This great help in the work!
If you do get preview of the ellipse itself in this. It will be even better!
How I can register this function to run in the future?

Thank you very much, Pascal :slight_smile:

Hi Leex-

if I did this right, if you unzip then drag and drop the rvb file onto Rhino, that EllipseCenterCorner alias should be available any time you run Rhino. Does that work?

Hi Leex- if you like, you can try a Python version that has a preview… I named the command the same as the alias in the script I first made, so if you would like to try this, remove the alias for EllipseCenterCorner from Options > Aliases. Then, close all Rhinos and double-click the attached rhi file and… we’ll see if that process works at all.

What should happen is that you should get a new command EllipseCenterCorner, not an alias this time. I’ve found that if the command does not auto-complete the first time, starting up Python once, like by running EditPythonScript, will help Rhino find the plug-in- after that the command should work.

I had to zip the rhi file to allow it to be uploaded here. Let me know if, you decide to try it, how it works and how the installation goes… I am still not getting that part to be completely smooth so far.

EllipseCenterCorner.zip(1.4 KB)

-Pascal

Hi Pascal
Thank you very much that you find the time to help!
I did just as you said.
Plugin perfectly installed. there is a new command "EllipseCenterCorner"
It’s great that there’s a preview, but there is no way to enter numeric values ​​for width and height. Thickness of lines in the preview looks a little thicker

-Leex

Hi @pascal

I have long wanted to ask.
When I create a cylinder ! Cylinder
or circle ! _Circle, when making an object with an exact dimension the end is always located on the X axis.

What I should be done to end always positioned vertically along the Z-axis or Y-axis when the horizontal position?

Your script EllipseCenterCorner.rvb works just as well.
End in the ellipse is just in the right coordinates.
Can I ask you a little bit to fix the script to create a circle and cylinder?
I really hope that you can find at this time.
With great respect to you

Hi Leex - try this macro - :

! Cylinder Pause CPlane Rotate Z 90 Pause Pause CPlane Previous

-Pascal

Pascal,
Thank you so much!! :blush:

I added to the macro a _Rebuild.
It works)
What can I add in macro to the screen does not show what happens when run a macro?
A bit annoying screen flicker.

! _Circle
Pause
CPlane
Rotate Z 90
Pause
Pause
CPlane
Previous
!sellast
-_Rebuild p=12 _enter
selnone

Hi Leex - that is annoying… SetredrawOff/SetredrawOn is how you avoid the intermediate redraws of the screen but it is not ideal in this case because (unless you are always typing in the radius and not picking) you need the redraw to be able to see what you are doing. If you always type the radius then

! _Circle
Pause
SetRedrawOff
CPlane
Rotate Z 90
Pause
Pause
CPlane
Previous
SelLast
-_Rebuild p=12 _enter
SelNone
SetredrawOn

-Pascal

Hi Pascal!
Of course you’re right, I need to see the starting point for the radius or diameter.

However, unfortunately, nothing has changed.
I see what’s happening on the screen

Hi Leex - yeah, there is a flash - I see it now, it is more obvious when Gumball is enabled.

-Pascal

Here is a python script that will create circles on the active CPlane with the start point oriented in the CPlane +Y direction. Radius/diameter input option (remembered) but no rebuild option in this particular version.

–Mitch

CircleStartY.py (2.0 KB)

Hi Mitch!
Thanks for script.
Is it possible make a circle to manually “by eye” to set a free diameter?
So that can I see the circle when doing free target

Nope, not with that script - I didn’t want to get into programming dynamic previews for this kind of “edge case”. However, not really necessary. Just turn ortho on and use the regular Circle tool, pull the point up in the +Y direction. The circle start point will be at the “top”.

–Mitch