Offset Inset > save preset

Next
 From:  TOM (SIRTOM)
9936.1 
Hi,

Recently I have being exploring the potential of the Offset Inset
Command and were amazed how easy and effortlessley it can
be used to create an amazing variety of shapes

My question : Is there any way of saving a preset of the parameters
used for this Command ?
  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
9936.2 In reply to 9936.1 
Hi Tom, yes you can set up a shortcut key that passes in parameters to the Inset command. Each parameter corresponds to one of the controls in the UI.

The parameters available are:

thickness=2
direction=Inwards / Outwards
expand=true / false
useseparateheight=true / false
height=4
grooved=true / false
groovewidth=0.2

You specify these parameters in the "Command" part of the shortcut key, with a space separating them.

Here are some examples, you put in the whole line in the "Command" part of the shortcut key:

Inset thickness=2 direction=Outwards expand=false grooved=false useseparateheight=true height=4

Inset thickness=2 direction=Inwards expand=false grooved=false useseparateheight=false

The way you can see what parameters a command can take is by looking at the .htm file for the command, the controls in there have an id="" value, and those id values are what you can specify as a command line parameter. For example in Inset.htm there is a <moi:DistanceInput id="thickness"> element that makes the thickness input field. So if you give a command line parameter of thickness=2 that will set that input field to 2. That's a part of the UI control initialization mechanism that should work with any command.

- 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)
9936.3 In reply to 9936.2 
I suppose that is valuable for the other functions?
but how to find the other functions' "Syntax" ?
  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
9936.4 In reply to 9936.3 
Hi Pilou,

re:
> I suppose that is valuable for the other functions?
> but how to find the other functions' "Syntax" ?

Yes it can work with any command. To find out what parameters are available you can look in the .htm file for the command, the id="" value of the control is what you use.

So for example in the Extrude.htm file the Distance field is this: <moi:DistanceInput id="distanceinput"

So that means that the Extrude command can take a parameter named distanceinput with a number, like distanceinput=3.

If you set up a keyboard shortcut (or type Tab and type it in and push Enter) of: Extrude distanceinput=3 it will be the same as if you ran the Extrude command and then set the "Distance:" field to 3.

To trigger a button you put in just the id value by itself, like: Extrude tapered , that will be the same as if you ran the Extrude command and pushed the "Tapered" button.

Input fields take a number like field=3.2 , checkboxes take a true/false value, dropdown combo boxes take one of the values of the <option> elements inside them.

- Michael

EDITED: 8 Sep 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:  Frenchy Pilou (PILOU)
9936.5 In reply to 9936.4 
Very cool! Excellent!
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel 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:  Phiro
9936.6 
Wow !

A very usefull information I haven't seen before.

Thanks a lot !
  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)
9936.7 
>>For Inset Function The parameters available are:

thickness=2
direction=Inwards / Outwards
expand=true / false
useseparateheight=true / false
height=4
grooved=true / false
groovewidth=0.2


PS I don't see the "expand" true / false inside the Inset Menu? (Beta 4.0)

and Must I write the "ShortCuts" in English ? (I suppose yes but for be sure :)

EDITED: 9 Sep 2020 by PILOU

  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
9936.8 In reply to 9936.7 
Hi Pilou,

re:
> PS I don't see the "expand" true / false inside the Inset Menu? (Beta 4.0)

It will appear when Direction = Outwards is set.

Regular Inset (Direction = Inwards):



With Direction = Outwards:



With Direction = Outwards and Expand = true - makes a kind of "hat" on top:




Starting with this:



Here are 3 rounds of Direction = Outwards with Expand = true, then 3 with Direction = Outwards with Expand = false, selecting the top face each time:




With multiple face selected, makes a kind of "cladding":







> and Must I write the "ShortCuts" in English ? (I suppose yes but for be sure :)

Yes.

- 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
9936.9 In reply to 9936.7 
Can be a kind of "ziggurat-ifier" :



















- 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
9936.10 In reply to 9936.9 









  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:  Ken (OKURO)
9936.11 In reply to 9936.9 
Simply fantastic, still breathless !
Congrats to this extraordinary development !!!

Best wishes
Ken
  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)
9936.12 In reply to 9936.8 
@ Michael

Damned ! You right! I did't retry the function for verify!
(Inward is more frequent ;)

I have used it many times but don't remember that! :)
(here Inward again)








EDITED: 9 Sep 2020 by PILOU

  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:  TOM (SIRTOM)
9936.13 
Fantastic indeed. Michael, you wrote that this "control inizialization mechanism should work
with any command".
As it works very simply with a command like "Insert thickness=2" I tried it also with the Extrude
command by assigning "Extrude distance=2" to a shortcut key, but in this case it did not work
could you explain, please ?
  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
9936.14 In reply to 9936.13 
Hi Tom,

re:
> As it works very simply with a command like "Insert thickness=2" I tried it also with the Extrude
> command by assigning "Extrude distance=2" to a shortcut key, but in this case it did not work
> could you explain, please ?

The name that you need to use for the initialization is the control's id="" value in the .htm file which is not always exactly the same as the text label that is displayed in the UI.

So for Extrude if you open up Extrude.htm the input field for the distance looks like this:

<moi:DistanceInput id="distanceinput" ...

So that means you have to use "Extrude distanceinput=2" for it to work, not "Extrude distance=2".

I think in the future I'll introduce some additional alias values for this type of initialization, that way it could support other labels without breaking any scripts. The id value is also used in scripts that access the UI so it would introduce bugs if it was changed.

- 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
 From:  TOM (SIRTOM)
9936.15 In reply to 9936.14 
Ok now I understood how to do it the right way - thanks 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
 

Reply to All Reply to All