Construction line script  1-20  21-40  41-45

Next
 From:  Paul (AIRGLASS)
1029.1 
Hi all,
Here's a script to use some of Michael's construction line changes in the latest patch (Sept4,patch2) .
Install the files in moi/commands, hook up a hotkey.
Fire up the script, drag out your construction lines, when done click on a viewport to keep the lines and exit the script. There's also a couple of buttons on the gui to delete the last drawn line and all lines.

Paul
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
1029.2 In reply to 1029.1 
Works like a charm! :)
Keeping the Helpers lines commands after commands is a task!

Ps
Is not possible to mask Helpers Lines temporalily?
---
Pilou
Is beautiful that please without concept!
My Gallery
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1029.3 In reply to 1029.2 
Hi Pilou,

> Is not possible to mask Helpers Lines temporalily?

Not currently. However, I will make one small change that will make it possible for the next patch.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
1029.4 In reply to 1029.3 
So near the perfection :)
---
Pilou
Is beautiful that please without concept!
My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Paul (AIRGLASS)
1029.5 In reply to 1029.2 
Hi, Pilou,
I don't see a way currently to hide the lines, there's seems to be a .hidden property for them, but it doesn't affect the visible display of the lines.
For the delete commands, the script has to be rerun or maybe setup like this in the Options dialogue to delete with no gui :

K ConstructionLine

delete last line:
Alt+K script:var gd = moi.geometryDatabase; var clines = gd.getObjects().getConstructionLines(); if ( clines.length > 0 ) gd.removeObject( clines.item(clines.length-1) );

delete all lines:
Ctrl+K script:var gd = moi.geometryDatabase; gd.removeObjects(gd.getObjects().getConstructionLines() );

Hope that helps --

Paul

PS --- I see Michael beat me to it. Disregard mine :)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1029.6 In reply to 1029.5 
> but it doesn't affect the visible display of the lines.

Yup, this is the part that I have tuned up for the next patch, it will now pay attention to the hidden property on a construction line.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Paul (AIRGLASS)
1029.7 In reply to 1029.6 
Just some stuff I noticed... when I was messing around with this I noticed that after the lines are built and the script exited, the lines can be deleted one by one by doing a mousedown, drag, mouseup, and the line is apparently deleted.
I don't know if that's a bug or not, but if it is, it's maybe a "good" bug.
Also, setting the .hidden property at the end of the script, disables that drag deleting behavior, apparently because the lines are marked hidden, but still on screen, the snapping function still works, which could prevent an inadvertent line deletion.

Paul
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
1029.8 
And possibility to save the Helpers lines in a file?
---
Pilou
Is beautiful that please without concept!
My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1029.9 In reply to 1029.7 
Hi Paul,

> I don't know if that's a bug or not, but if it is, it's maybe a "good" bug.

I see - what's happening here is when you click down on a construction line it is getting selected (even though the appearance does not change), and then it is trying to drag it like a regular object. However, clines don't support some of the other infrastructure for getting transformed yet, so that's why they get deleted. But this is easy to tweak, I've tuned this up so that the line will actually drag in this situation (and you can also apply any of the transform commands on them).

You can still remove it by clicking it and then using Delete.

But these are some of the reasons why there isn't an "official" persistent construction line yet - you probably don't want them to get selected like regular objects, but there isn't currently any way to lock an object to prevent it from being selected and still remain snappable.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1029.10 In reply to 1029.8 
Hi Pilou,

> And possibility to save the Helpers lines in a file?

This one will have to wait for V2...

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Paul (AIRGLASS)
1029.11 In reply to 1029.9 
Hi Michael,
I see, interesting. Thanks for the explanation. Sounds good to me!

Paul
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
1029.12 
An other Helper lines like circles, arc, rectangle...? ;)
---
Pilou
Is beautiful that please without concept!
My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1029.13 In reply to 1029.12 
Hi Pilou,

> An other Helper lines like circles, arc, rectangle...? ;)

I haven't been planning on it, that would tend to add quite a lot of extra commands.

A construction line is kind of a special case since it extends infinitely in either direction unlike a regular line. So it offers something extra than just a regular line.

A "construction circle" wouldn't really offer anything similarly extra to a regular circle.

In version 2 I would like to make it possible to lock objects to prevent them from being selected, but remain snappable. At that time you would be able to draw a circle, set it to have a dashed line style, and then lock it and that would end up being the same thing as a construction circle.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Paul (AIRGLASS)
1029.14 
And on the silly side of things.....
If someone's got the AutoRotate2 script installed, here's a time waster :
activate the construction line script
draw a few lines in each viewport
click a viewport to keep the lines and exit
maximize the 3d viewport
turn on the autorotate2 script

and it's

MoI -- "It's a screensaver too!"

Paul
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Schbeurd
1029.15 In reply to 1029.13 
@ Paul,

Another excellent script here ! It's really cool to have permanent construction lines ! ;-)

@ Michael,

>>> In version 2 I would like to make it possible to lock objects to prevent them from being selected, but remain snappable. At that time you would be able to draw a circle, set it to have a dashed line style, and then lock it and that would end up being the same thing as a construction circle.

Yeah ! Good idea. It's similar to a feature in Illustrator. I'd really like to see your "feature list" for V.2... ;-))
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Dymaxion
1029.16 
So, it's been quite a while and I'm assuming the code has bit-rotted a bit, but I'm trying to use the ConstructionLine.js script from this thread, and when I try to launch it, I get a JScript error, "Object expected Line 6: Column 1". I'm fairly certain it's set up correctly, and I can't figure out which line it's talking about. Ideas?

/Ella
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1029.17 In reply to 1029.16 
Hi Ella - which version of MoI are you trying it on?

I just tried it over here with the latest v2 beta (Apr-12-2009 release) and it seems to work fine for me.

You mentioned the "ConstructionLine.js" script - do you mean you only have that one file? There should be 2 files included in the .zip, a .js file and an .htm file.

You'll need to copy both of those files (not just the .js file) to your \commands sub-folder, then set up a shortcut key that says: ConstructionLine as the command.

Let me know if you've done all that and still have problems.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Dymaxion
1029.18 In reply to 1029.17 
Current beta. I was trying to link to the command as "ConstructionLines.js"

Here's a slightly cleaned up version of the code script, with instructions for adding it to a conveniently empty slot in the "Edit" tab.

It'd be nice to have a "Done" button for the script, instead of the "click on the viewport" bit, which is a bit too easy to trigger accidentally. I know this is kind of abusing a line factory to make things work; is it possible to create that behavior?


EDIT (7/11/2015): The attached instructions are for v2 - for MoI v3 the way icons are set up on buttons is slightly different and so for setting up the button in v3 put in this instead:
code:
<td><moi:CommandButton icon="icons/CLIcon.png" command="ConstructionLine">CLine</moi:CommandButton></td>

EDITED: 11 Jul 2015 by MICHAEL GIBSON

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1029.19 In reply to 1029.18 
Hi Ella,

> It'd be nice to have a "Done" button for the script, instead
> of the "click on the viewport" bit, which is a bit too easy to
> trigger accidentally.

Give the version attached here a try - I added a Done button to this version. This one won't exit if you just click with a left-click, you end it by clicking the Done button or using one of the shortcuts for Done (right-click in a viewport or the Enter key).

The line factory part wasn't actually doing anything here, I think it was some left-over remnant from this having started out originally as a modification of the line command or something like that.

The actual meat of creating the construction lines was happening inside the GetPoint() call, which is set up to wait until a point is picked and then return. In this version I replaced that call to a manual event loop so it can respond to getting the "done" event.

Let me know if this one doesn't do what you wanted.

- Michael
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Satoribomb
1029.20 In reply to 1029.19 
Ah thank you Michael! The script and instructions worked flawlessly for me (an HTML challenged soul). THis will help enormously with my current projects. Will this CLine script function/feature become a permanent part of MoI going forward or will it remain an end-user add-on?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
Show messages:  1-20  21-40  41-45