[Plugin] 2D Tools

Re: [Plugin] 2D Tools v3.3

Postby TIG » Sat Oct 10, 2009 4:05 pm

mitcorb wrote:Hi, TIG:
2d hatching is still not working for me in v3.3.
Still getting the "cancelled 2d hatching" phrase in the ruby console.
I extracted the zip file and overwrote the previous version. I did not delete any files, first.
If 3.3 was supposed to correct this, it did not work for me.
Thanks,
mitcorb

I hoped it would fix it when I introduced relative paths :cry: : please paste these lines into the Ruby Console one at a time, and report what happens: use the first line [6] or second line [7] if that's your version...

folder="C:/Program Files/Google/Google SketchUp 6/Plugins/2Dtools/Hatching/"
folder="C:/Program Files/Google/Google SketchUp 7/Plugins/2Dtools/Hatching/"


then these two lines...

file1=Dir[folder+"*.jpg"].last
UI.openpanel("Choose HATCHING...",folder,file1)


If you have a different file path to the Hatching folder adjust the first line to suit - note it's a / NOT a \ in text...

Report any messages or what happens at each step - like a dialog opening ! [I hope]

We will fix this... :ugeek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools v3.4

Postby TIG » Sat Oct 10, 2009 5:51 pm

Here's v3.4 viewtopic.php?p=185760#p185760

v3.4 20091010 Adjust Tool now allows 'Lone Arc Extension' as well as Trim etc.
NOTE: This Lone Arc Extend Mode is in its first beta release and might be prone to error – please save before using and feedback any details that will improve its development...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools v3.4

Postby Arc » Sat Oct 10, 2009 6:38 pm

[quote="TIG"]Here's v3.4 viewtopic.php?p=185760#p185760

2D Text, it's not on my set z-plane.
0
User avatar
Arc 
 

Re: [Plugin] 2D Tools v3.4

Postby TIG » Sat Oct 10, 2009 9:53 pm

Arc wrote:
TIG wrote:Here's v3.4 viewtopic.php?p=185760#p185760
2D Text, it's not on my set z-plane.


2D Text was not made to be fixed onto the Z-plane because so many asked for more flexibility in placing it - 2D Text has uses beyond pure 2D drawing - like the 2D Fillet Tool. However, it does snap to the horizontal/face...

If there is enough 'reverse pressure' to get it to snap all 2D Text to the Z-plane I'll change it - it's no big deal - much of the code is in there, it's just 'disabled'... :enlight:

If you really must have it snap to the Z-plane then I can easily do you a personalized version that does so... :?:
0
Last edited by TIG on Sun Oct 11, 2009 10:06 am, edited 1 time in total.
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools v3.4

Postby Gaieus » Sat Oct 10, 2009 10:29 pm

TIG wrote:...If you really must have it snap to the Z-plane them I can easily do you a personalized version that does so... :?:

That's quite a generous offer, TIG! ;)
0
User avatar
Gaieus 
 

Re: [Plugin] 2D Tools v3.4

Postby TIG » Sun Oct 11, 2009 10:08 am

Gaieus wrote:
TIG wrote:...If you really must have it snap to the Z-plane then I can easily do you a personalized version that does so... :?:

That's quite a generous offer, TIG! ;)

Not so generous... most of the code is already in there but disabled/unused... I just need to 'free' it... :ugeek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools v3.4

Postby mitcorb » Sun Oct 11, 2009 2:55 pm

TIG:
I copy/pasted as you instructed, with no apparent reaction in the console at each step. Then I drew two overlapping 2d rectangles, applied 2d faces to each. Then I tried to activate the 2d hatching tool and got the "cancelled" statement.

EDIT: The attachment hopefully shows the console open and the inputs. If not, I will do a jpg.
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] 2D Tools v3.4

Postby TIG » Sun Oct 11, 2009 3:10 pm

No Console in the image. Please try again...
I tried your Model and it Hatches OK for me... so must be something in your setup...

When you pasted the line UI.openpanel... what happened ? Did it open a file browser ?
If it did then if you selected something and hit OK what did it then say in the Console ?
Can you try typing UI.openpanel in the Console - you should get the last file browser you had opened again...

Most confusing... :?

EDIT: The Console appeared on the second image...
You don't seem to have typed the last of the lines I asked you to -
UI.openpanel("Choose HATCHING...",folder,file1)

Please DO NOT try to run the 2D Hatching Tool ! I'm trying to check your setup BEFORE we start looking at other things... Firstly we need to check that the UI.openpanel is working OK...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools v3.4

Postby mitcorb » Sun Oct 11, 2009 3:21 pm

TIG:
No file browser opened. I will try again.
(I am not fluent with image capturing and posting, so I had to try again. The process is so opaque, that is, you gotta trust that the results will be favorable.)

EDIT: see attachment.
I typed the statement into the line input box. I thought there was a required space before the parentheses. That is why I got the warning.
But in each case I got the word "nil".

EDIT2: for your info, I verified that the hatching file has all of the jpg content.
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] 2D Tools v3.4

Postby JClements » Sun Oct 11, 2009 3:53 pm

My preference would be to have the text sensitive to the current Z-plane.

Perhaps you could allow its present behavior through Alt-clicking the toolbar icon? ... Or the user could use your other text script.

============================

Tried the updated extend tool. When I tried it on an arc and when I could get it to work, the arc was extended through and beyond a target edge. Using with line segments, it couldn't detect the line to extend when trying to select it. Many times I'd get an hour glass and have to shut down SU 7.1.

================================

A combination of the line, tab input, and radius tools makes producing pipe and elbow centerlines easy.
I suppose Pipe-Along-Pipe could be implimented into the toolbar and apply it to a centerline using a method similar to that used for your 2D Line Style tool :roll:
easy centerlines.png
0
John
Illustrator
Beaverton, Oregon
User avatar
JClements 
Premium Member
Premium Member
 

Re: [Plugin] 2D Tools v3.4

Postby TIG » Sun Oct 11, 2009 5:38 pm

mitcorb wrote:TIG:
No file browser opened. I will try again.
(I am not fluent with image capturing and posting, so I had to try again. The process is so opaque, that is, you gotta trust that the results will be favorable.)

EDIT: see attachment.
I typed the statement into the line input box. I thought there was a required space before the parentheses. That is why I got the warning.
But in each case I got the word "nil".

EDIT2: for your info, I verified that the hatching file has all of the jpg content.


No <space> before the ( ). BUT it's failing anyway.
What happens if you copy/paste just the text UI.openpanel into the Console - still no open_panel ?

Seems your Sketchup isn't opening a file_open_dialog like it should ??? :?
0
TIG
User avatar
TIG 
Global Moderator
 

Something very Strange

Postby JClements » Mon Oct 12, 2009 2:53 am

I am not sure if the file is corrupted or if there is a bug in Ruby. It was made by cutting and pasting geometry from antoher file which had a half dozen imported DWG files.

Any elevation readings taken for geometry below z=0 are wrong (using either the 2d Set Z-Plane tool or Robin Hill's, Height.rb). What should be -26' shows as -25', what should be -9.5' shows as -9.0'

Stranger still, is that Robin's script adds in two dashes for a negative value. It has never done that before.
If I create a new file with new geometry then both Robin's script and 2d Set Z-Plane tool work correctly.

Any guess as to what is going on?
0
John
Illustrator
Beaverton, Oregon
User avatar
JClements 
Premium Member
Premium Member
 

Re: [Plugin] 2D Tools v3.4

Postby TIG » Mon Oct 12, 2009 10:00 am

I think the bug is in Sketchup and the use of 'Engineering' units [always feet].
If you change to 'Decimal' units [feet] it works fine.
Any other units format also works properly too...
It's as if with Engineering Feet it does a 'round' to an integer and does a double negative to boot !
There's nothing wrong with the SKP file itself - indeed it's the same in any new SKP that's set to have Engineering Feet as its units and -ve Z values taken from the point are reported wrongly as a length/length.to_s.
The Tools are blameless too...

Bug report for v7.1 ? :cry:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools v3.4

Postby watkins » Mon Oct 12, 2009 12:05 pm

It would be nice to see a few examples of how people are using 2D Tools in their own work.

Regards,
Bob
0

watkins 
 

Re: [Plugin] 2D Tools v3.4

Postby mitcorb » Mon Oct 12, 2009 12:34 pm

TIG:
UI.openpanel called up the folder My Documents after typing into the console.
When I cancelled the call, the nil showed on the second line of the following insert. Then I typed in the other arguments- carefully- and you can see what returned.
(This is Sketchup 6free, last update, XPHomeSP3)
--------
UI.openpanel
nil
folder="C:/Program Files/Google/Google Sketchup 6/Plugins/2Dtools/Hatching/"
C:/Program Files/Google/Google Sketchup 6/Plugins/2Dtools/Hatching/
file1=Dir[folder+"*.jpg"].last
C:/Program Files/Google/Google Sketchup 6/Plugins/2Dtools/Hatching/PATT__SOLID.jpg
UI.openpanel(Choose HATCHING...",folder,file1)
(eval):149: warning: parenthesize argument(s) for future version
Error: #<SyntaxError: (eval):149: compile error
(eval):149: unterminated string meets end of file
(eval):149: syntax error
UI.openpanel(Choose HATCHING...",folder,file1)
^>
(eval):149
---------
Thanks,
mitcorb

EDIT: I see I left out a " before Choose HATCHING. When I inserted each argument with corrected punctuation, I got "nil" at the end.
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] 2D Tools v3.4

Postby TIG » Mon Oct 12, 2009 2:14 pm

mitcorb
Another slant... Copy/Paste these 3 lines of red text into the Ruby Console and see what happens...
folder="C:\\Program Files\\Google\\Google Sketchup 6\\Plugins\\2Dtools\\Hatching\\"
file1="*.jpg"
UI.openpanel("Choose HATCHING...",folder,file1)

If nothing works then change them to these 3 and try again:
folder="C:/Program Files/Google/Google Sketchup 6/Plugins/2Dtools/Hatching/"
file1="*.jpg"
UI.openpanel("Choose HATCHING...",folder,file1)

I think it's something to do with SUp v Ruby syntax changed in the updates of Versions... We will sort this :ugeek:
0
Last edited by TIG on Mon Oct 12, 2009 7:46 pm, edited 1 time in total.
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools v3.4

Postby DIEGO-RODRIGUEZ » Mon Oct 12, 2009 2:34 pm

Hello TIG.
I tried 2dtool and found the following errors.
The lines do not extend to circles and arcs
The arches, extend one end. the other end is not extended.
The line of destiny, color cyan, turns off in areas where it is intersected by another line


0

DIEGO-RODRIGUEZ 
Banned
 

Re: [Plugin] 2D Tools v3.4

Postby JClements » Mon Oct 12, 2009 2:43 pm

Hi TIG:

Thank you for looking at the file. I did further test and similar things happened with 7.0 and 6.0.
I opened previous revision levels (backups) of the file and when I changed the units to Engineering, the error popped up. I thinking it could be a rounding error, but not so sure now.

I will send the file to SU folks.
0
John
Illustrator
Beaverton, Oregon
User avatar
JClements 
Premium Member
Premium Member
 

Re: [Plugin] 2D Tools v3.4

Postby mitcorb » Mon Oct 12, 2009 7:25 pm

TIG:
Here are the results on the double slash input:
(eval):149
folder="C:\\Program Files\\Google\\Google Sketchup 6\\Plugins\\2Dtools\\Hatching\\"
C:\Program Files\Google\Google Sketchup 6\Plugins\2Dtools\Hatching\
UI.openpanel("Choose HATCHING...",folder,file1)
Error: #<NameError: (eval):149: undefined local variable or method `file1' for main:Object>
(eval):149
---I had to insert a " in front of the word Choose, because I got a syntax error comment, and noticed that you may have copy/pasted my mistake in your new instructions.---

Second results: since first did not work:
folder="C:/Program Files/Google/Google Sketchup 6/Plugins/2Dtools/Hatching/"
C:/Program Files/Google/Google Sketchup 6/Plugins/2Dtools/Hatching/
UI.openpanel("Choose HATCHING...",folder,file1)
Error: #<NameError: (eval):149: undefined local variable or method `file1' for main:Object>
(eval):149
---Again corrected for the missing "---

Lemme know,
mitcorb
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] 2D Tools v3.4

Postby TIG » Mon Oct 12, 2009 7:48 pm

We have both messed up... I copied the text from yours - hence the missing "...
You failed to set file1= - you only pasted line 1 and 3 - you missed line 2 !

Please try again with the " and all three lines.
One defines the folder, two the file and three is the UI.openpanel command...
0
Last edited by TIG on Mon Oct 12, 2009 7:51 pm, edited 1 time in total.
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools v3.4

Postby TIG » Mon Oct 12, 2009 7:51 pm

JClements wrote:Hi TIG:

Thank you for looking at the file. I did further test and similar things happened with 7.0 and 6.0.
I opened previous revision levels (backups) of the file and when I changed the units to Engineering, the error popped up. I thinking it could be a rounding error, but not so sure now.

I will send the file to SU folks.


It's not the file as it happens with all models with -ve Z in Engineering Units... Seems as far back as v6 ! It's not the tools, as you can reproduce the effect by trying to get set the -ve Z to_s in the Console and you'll get a rounded -- version !!!
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools v3.4

Postby mitcorb » Mon Oct 12, 2009 9:26 pm

OK, TIG:
I am at a different machine right now.
I will retry in about 3-4 hours at the one with the problem.

Interesting! I loaded 2dtools at my office on SU6pro. Still cannot get hatching to proceed. Is there something I might be doing wrong? Or is there possibly some other plugin or extension interrupting this one?

Oh well, let's get the issue resolved at the first location.

mitcorb
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] 2D Tools v3.4

Postby honoluludesktop » Mon Oct 12, 2009 10:32 pm

Hi TIG, On my system, I am still having problems with flashing shadows under SU's pull down menus while 2DFreehand is the active selection. SU hangs if I try to close SU while this command is active, but if I change the selection, I am able to exit SU. The problem persist even I removed every other plugin, except SU.rb, and 2D#.rb.

I do not have this problem at home, so its not the ruby that is at fault. Any ideas, anyone, as to where on my system I can look for a solution? I have tried disabling WinXP's menu shadow, and unchecking SU's OpenGL preferences with no effect.
0
User avatar
honoluludesktop 
In Remembrance
 

Re: [Plugin] 2D Tools v3.4

Postby mitcorb » Tue Oct 13, 2009 2:23 am

Ok, TIG:
I am at the machine on which I first had the problem.

The double backslash method pulled up the HATCHING folder this time, with contents. But see the results:
-----
folder="C:\\Program Files\\Google\\Google Sketchup 6\\Plugins\\2Dtools\\Hatching\\"
C:\Program Files\Google\Google Sketchup 6\Plugins\2Dtools\Hatching\
file1="*.jpg"
*.jpg
UI.openpanel("Choose HATCHING...",folder,file1)
nil
-----I did not change anything in the console display.

I will now run the second set with the forward slashes just to be thorough:
----
folder="C:/Program Files/Google/Google Sketchup 6/Plugins/2Dtools/Hatching/"
C:/Program Files/Google/Google Sketchup 6/Plugins/2Dtools/Hatching/
file1="*.jpg"
*.jpg
UI.openpanel("Choose HATCHING...",folder,file1)
nil
---- and running it in this form did NOT call up the HATCHING folder, or anything else.
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] 2D Tools v3.4

Postby TIG » Tue Oct 13, 2009 9:25 am

mitcorb wrote:Ok, TIG:
I am at the machine on which I first had the problem.
The double backslash method pulled up the HATCHING folder this time, with contents. But see the results:
-----
folder="C:\\Program Files\\Google\\Google Sketchup 6\\Plugins\\2Dtools\\Hatching\\"
C:\Program Files\Google\Google Sketchup 6\Plugins\2Dtools\Hatching\
file1="*.jpg"
*.jpg
UI.openpanel("Choose HATCHING...",folder,file1)
nil
-----I did not change anything in the console display.
I will now run the second set with the forward slashes just to be thorough:
----
folder="C:/Program Files/Google/Google Sketchup 6/Plugins/2Dtools/Hatching/"
C:/Program Files/Google/Google Sketchup 6/Plugins/2Dtools/Hatching/
file1="*.jpg"
*.jpg
UI.openpanel("Choose HATCHING...",folder,file1)
nil
---- and running it in this form did NOT call up the HATCHING folder, or anything else.

We will find what's up...
Do I understand that the \\ method worked ? If not then please try these 3 lines [they have the end \\ or / removed from the folder path...]
folder="C:\\Program Files\\Google\\Google Sketchup 6\\Plugins\\2Dtools\\Hatching"
file1="*.jpg"
UI.openpanel("Choose HATCHING...",folder,file1)

and this alternative...
folder="C:/Program Files\/Google/Google Sketchup 6/Plugins/2Dtools/Hatching"
file1="*.jpg"
UI.openpanel("Choose HATCHING...",folder,file1)


We will prevail !

When you get the folder open what do you get if you select afile and then press OK, then do it another time and press Cancel...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools v3.4

Postby mitcorb » Tue Oct 13, 2009 1:04 pm

Hi, TIG:
Here are the contents of the console using the double backslash input, and selection of ANGLE PATTERN. The Hatching folder comes up with the patterns displayed in list form rather than thumbnail form, in this case.

----
folder="C:\\Program Files\\Google\\Google Sketchup 6\\Plugins\\2Dtools\\Hatching\\"
C:\Program Files\Google\Google Sketchup 6\Plugins\2Dtools\Hatching\
file1="*.jpg"
*.jpg
UI.openpanel("Choose HATCHING...",folder,file1)
C:\Program Files\Google\Google SketchUp 6\Plugins\2DTools\Hatching\PATT_ANGLE.jpg

----HERE IS THE SAME CALL UP, EXCEPT CANCEL THE SELECTION:

folder="C:\\Program Files\\Google\\Google Sketchup 6\\Plugins\\2Dtools\\Hatching\\"
C:\Program Files\Google\Google Sketchup 6\Plugins\2Dtools\Hatching\
file1="*.jpg"
*.jpg
UI.openpanel("Choose HATCHING...",folder,file1)
nil
When I cancelled, the window closed, no other activity, and the "nil" was displayed.
Since this was successful, do you still want me to run the second suggestion and the alternative?
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] 2D Tools v3.4

Postby TIG » Tue Oct 13, 2009 3:45 pm

mitcord - I have the answer ! [I thnk :enlight: ]

Watch for an update very soon... We will give you hatching... :D
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools v3.4

Postby mitcorb » Tue Oct 13, 2009 4:04 pm

Ok, TIG:
Say, what do you do--take power naps?
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] 2D Tools v3.5

Postby TIG » Wed Oct 14, 2009 12:51 pm

Here's v3.5 viewtopic.php?p=185760#p1857605

Hatching Tool made v6/XP friendly.
Adjust to Arcs changed to individual Segments.
2D Text now has a Snap setting for Z-plane or All-Faces.

Feedback please...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools v3.5

Postby mitcorb » Wed Oct 14, 2009 2:32 pm

TIG:

SUCCESS!!!!!!!
Made a 2d rectangle on default 0 zplane, gave it a 2d face, selected hatching tool, folder popped up, selected angle patt and it was applied. Incidentally, I did this procedure with the Ruby Console open, and there was no data on any of the actions.

Comments: the angle pattern does not display boldly, you must zoom in. Have not tried any other patterns. I assume they are scalable.

Buncha Questions:
What is so special about the double backslash method?
Why did your original code work for so many other users and not for my case, and maybe others?
Is this something that all plugin authors should be considering, or is it unique to SU6?, or XP?
Does this fix also address the linestyle question?

Thank you very much for all that you do!
mitcorb
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: davchh, fredo6, Lady_mimi, petrit04 and 139 guests

Visit our sponsors: