[Plugin] Polar line - 20110525
-
Salut Matt
Je pensais aux autres systèmes de coordonnées ( cylindrique, polaire )
Un maillage polaire au sens cartographique par exemple...Merci de ton attention
Translation:
I thought to polar grid like the one found on maps.
MALAISE -
[Plugin] Polar line
-
wow, can't believe i missed one of Matt's plugins!
-
Matt
Simple but powerful.
Thanks, I'm digging a big hole in anticipation of throwing out all my cad software.
-
Matt:
1st. Thanks!
2nd. Seems to have a problem. I typed in " 100**'** " and it drew a line 8'4".
Perhaps the %(#FF0040)[****'****] character is the problem?
Regards, John
-
@jclements said:
Perhaps the ' character is the problem?
Hi ! I think This plugin doesn't support Feet / Inch units... I will have a look !
-
sorry, but it does not work for me on mac.
i click on the icon, it asks me to specify the first point, which i do. then a dialogue box appears for me to enter the length and the angle. i do do that and click OK. nothing happens!
what else should i do? any ideas?
-
Hum... Another Pac problem!! Damned. I don't know what's the problem, and I've no mac... Can you copy here the error in the ruby console please ?
Thank you...
Matt. -
here you have it.
-
I don't understand the problem... Again !! Grmbl.
Can you try line below in the ruby console, please ?Math.cos(45.degrees)
And these lines
a = Geom;;Point3d.new(12.5,12.5,25.2) a[0] a[1] a[2]
On each line, can you give me the results, please ?
Thank you again for your patience, Edson! -
is this what you wanted?
-
Edson: you wrote 0 = Geom:: and 1 = Geom:: . That's not what he wanted. Just type exactly what he listed.
First:
a = Geom;;Point3d.new(12.5,12.5,25.2)
Then
a[0]
and so on.
-
is this it?
-
Yes, like that.
-
Thank you Edson and Thomthom !
I really really don't understand...Can someone help me for this bug, please ?
-
I can have a look on my own Mac when I get home.
Looks very weird. Does PC SU and MacSU use the same Ruby version?Have you tried placing () around lg * Math.cos(ang) . (just a wild guess)
-
Hey, I notice you use $lg and then lg. Is it suppose to be two different things?
-
@unknownuser said:
Does PC SU and MacSU use the same Ruby version?
I don't know, but I often have problems...@unknownuser said:
I can have a look on my own Mac when I get home.
Thank you !@unknownuser said:
Hey, I notice you use $lg and then lg. Is it suppose to be two different things?
I will look in the code... Thank you! -
Got it nailed!
It's all down to line 69:
case Sketchup.active_model.options[0][2]
On my mac it returned nil
Your case switch doesn't account for that value so lg is passed on as a string.
case Sketchup.active_model.options[0][2] when 0;lg = result[0].to_f when 1;lg = result[0].to_f.feet when 2;lg = result[0].to_f.mm when 3;lg = result[0].to_f.cm when 4;lg = result[0].to_f.m end
My fix was to add a default handler for the switch.
case Sketchup.active_model.options[0][2] when 0;lg = result[0].to_f when 1;lg = result[0].to_f.feet when 2;lg = result[0].to_f.mm when 3;lg = result[0].to_f.cm when 4;lg = result[0].to_f.m else ;lg = result[0].to_f end
Not sure why line 69 return nil though, didn't look into that.
-
Ok cool !! Thank you for your bug research Thomthom !
I am pretty sure it works if you try this code belowSketchup.active_model.options["UnitsOptions"]["LengthUnit"]
can you try it please ?
For "pl" variable, no problem. "$pl" is used to reuse last number entered in the polarline window...
Advertisement