Script or something like it to make a slot
 1-5  6-25  26-31

Previous
Next
 From:  Michael Gibson
9876.6 In reply to 9876.5 
Hi Frederick, where should the curve be positioned? Do you want to specify only radius and length and have it created at 0,0,0 ?

- 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:  fcwilt
9876.7 In reply to 9876.6 
Hi,

Well I'm feeling more than a little foolish now.

I just found out that when using the "Rounded Corners" option on Rectangles the Radius value I seek can be obtained from the current Height value just by moving the mouse pointer a bit to the inside of the rectangle.

Here you have already provided the solution and I never once happened to move the mouse pointer as needed.


I've said it before and I will say it again, MOI is brilliant.

Sorry for wasting your time.

Frederick

EDITED: 10 Jul 2020 by FCWILT

  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
9876.8 In reply to 9876.7 
Hi Frederick, no problem I'm glad you have a method to do it!

I had an idea that maybe drawing a center line as the definition for the slot might be useful.

Here's a script that does it that way:



To give a specific length, set a distance constraint using the "d" field in the bottom command bar.

- Michael

EDIT: updated command to have radius/diameter toggle and to use diameter as default if set in moi.ini .

EDITED: 13 Jul 2020 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:  Cemortan_Tudor
9876.9 
what's setHitTest
- Tudor -
  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
9876.10 In reply to 9876.9 
Hi Tudor,

re:
> what's setHitTest

It turns hit testing on or off - hit testing is when an object is targeted for click selection or snapping. In some cases when a script is dynamically creating an object on every mouse move, that object can leave behind things like intersection snaps. Hit testing can be turned off in such cases so the object will be ignored for generating snap points.

- 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:  fcwilt
9876.11 In reply to 9876.8 
Hi,

Well that is even better than I envisioned as you have provided for putting the slot on an angle.

And you were able to provide this feature with the two zipped files? How cool is that!

I placed the files in the "command" folder of MOI and was able to invoke the command via the XYZ entry field (or whatever it is called).

Slick.

I know I can add a shortcut key to invoke it but, just out of curiosity, is there a way to add new commands like this to the side pane?

Thanks very much.

Frederick
  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:  nameless
9876.12 
"rectangle round corners ?"

Haha, after all these years it's the first time I notice that option. I was filleting corners like there is no tomorrow!
  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
9876.13 In reply to 9876.11 
Hi Frederick,

re:
> I know I can add a shortcut key to invoke it but, just out of curiosity, is there a way
> to add new commands like this to the side pane?

It is possible by editing the HTML files that make the side pane. Where exactly do you want to add it?

- 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:  Cemortan_Tudor
9876.14 
I think maximize viewport option *)) without any panel or sides ones
- Tudor -
  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
9876.15 In reply to 9876.14 
Hi Tudor,

re:
> I think maximize viewport option *)) without any panel or sides ones

Try this:
http://kyticka.webzdarma.cz/3d/moi/#MaximizeViewport

- 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:  Cemortan_Tudor
9876.16 
by side panel I understand as object browser panel or commandUi panel
- Tudor -
  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:  fcwilt
9876.17 In reply to 9876.13 
Hi,

Well it would seem to belong there with the Circle command Yes? No?

Frederick
  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
9876.18 In reply to 9876.16 
Hi Tudor,

re:
> by side panel I understand as object browser panel or commandUi panel

If you set up the script mentioned above (http://kyticka.webzdarma.cz/3d/moi/#MaximizeViewport)
on a shortcut key, then it would be possible to maximize and unmaximize viewports without using
any other UI.

If you mean you want some way to hide all the regular UI panels, try this one:
http://kyticka.webzdarma.cz/3d/moi/#FullScreen

If neither of those is correct I will need more details about what you're trying to do.

- 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
9876.19 In reply to 9876.17 
Hi Frederick, so the little clusters of related commands like the circles is called a "command set".

There are 2 files that make up a command set, one is a .htm file for the UI and the other is an .xml file that lists the commands in it.

For the circles these are the files Circles.htm and Circles.xml which you can find in the commands folder inside MoI's install folder.

Edit the Circles.xml file by adding in an entry for "slot", like this:

<commandset>
   <command>circle</command>
   <command>circlediameter</command>
   <command>circle3pt</command>
   <command>circletangent</command>
   <command>slot</command>
</commandset>

Edit the Circles.htm file by by putting in a command button like this:

<html>
   <body class="CommandSetBody">
      <moi:CommandButton icon="moi://ui/icons/CircleCenterIcon.png" command="circle"><moi:Text textid="CircleCenter"></moi:CommandButton>
      <moi:SmallSpacer />
      <moi:CommandButton icon="moi://ui/icons/CircleDiameterIcon.png" command="circlediameter"><moi:Text textid="CircleDiameter"></moi:CommandButton>
      <moi:SmallSpacer />
      <moi:CommandButton icon="moi://ui/icons/Circle3ptIcon.png" command="circle3pt"><moi:Text textid="Circle3pt"></moi:CommandButton>
      <moi:SmallSpacer />
      <moi:CommandButton icon="moi://ui/icons/CircleTangentIcon.png" command="circletangent"><moi:Text textid="CircleTangent"></moi:CommandButton>

      <moi:SmallSpacer />
      <moi:CommandButton icon="moi://ui/icons/SlotIcon.png" command="slot">Slot</moi:CommandButton>

   </body>
</html>

Then the last thing is to create a bitmap image for button, that should be a 64x64 pixel sized PNG file named SlotIcon.png which goes in the /ui/icons directory.


With that set up you should then have a 5th entry for "Slot" added into the Draw curve > Circles command set.

You will need to repeat this process with installs for new versions.

- Michael

EDITED: 11 Jul 2020 by MICHAEL GIBSON

  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:  fcwilt
9876.20 In reply to 9876.19 
Hi Michael,

I truly appreciate your help and guidance.

You've created an amazing program and your willingness to help add to it's functionality is even more amazing.

Frederick
  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:  nameless
9876.21 In reply to 9876.20 
This forum needs a way to "like" or "love" or "approve" a post, or thank the user for posting in some way :)

The Slot command is amazing Michael, it definitely deserves an icon!

EDITED: 14 Jul 2020 by NAMELESS

  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:  Mik (MIKULAS)
9876.22 In reply to 9876.20 
Hi Michael,

slot script is very useful. Would it be possible to have an option diameter instead of radius as an input? It is not necessary, but helpful for users, who have set "diameter" as a default in moi.ini file:)

Thank you.
Mik
  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
9876.23 In reply to 9876.22 
Hi Mik, I've updated the script in the post above to have a radius/diameter toggle and to use diameter by default if you've set the option in moi.ini .

Please let me know if it isn't working as expected.

- 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:  Mik (MIKULAS)
9876.24 In reply to 9876.23 
It is absolutely perfect :-)
Thank you very much.
Mik
  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:  nameless
9876.25 
:3
Image Attachments:
Size: 16.2 KB, Downloaded: 62 times, Dimensions: 255x249px
  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-5  6-25  26-31