MoI discussion forum
MoI discussion forum

Full Version: V5 beta May-22-2022 available now

Show messages:  1  2-21  22-41  42-61  62-81  82-101  …  142-145

From: fcwilt
31 May 2022   [#22] In reply to [#21]
Hi Michael,

Attached is a simple file with ONE group and THREE objects.

I envision selecting the GROUP and then executing a EXPORT STL command.

Each OBJECT in the GROUP would be exported as a separate STL file.

The destination folder would be determined by a option within the 3DM file itself (as opposed to a option within MOI) . This option would be specified by the user and it would be saved with the file.

The name of each file would be determined by another "file option" which would determine how the file name would be constructed from the GROUP name and the OBJECT name.

I can see having some sort of tokens representing things like the GROUP name, the OBJECT name and anything else you think would be good.

So lets say the tokens for the two above were $G for GROUP name and $O for OBJECT name.

They would be used, along with literals, to create a template used to construct the file name.

With a template of $G_$O and using the attached 3DM file the file names would become:

Group A_Sphere 1.stl
Group A_Sphere 2.stl
Group A_Sphere 3.stl

Hope that makes it clear what I am thinking of.

Frederick

Attachments:
MOI 5 GROUP TEST.3dm


From: Michael Gibson
31 May 2022   [#23] In reply to [#22]
Hi Frederick,

re:
> The destination folder would be determined by a option within the 3DM file itself (as opposed to
> a option within MOI) . This option would be specified by the user and it would be saved with the file.
>
> The name of each file would be determined by another "file option" which would determine how
> the file name would be constructed from the GROUP name and the OBJECT name.

Unfortunately there is not a mechanism in place currently to have this custom "file option" type data.

So those parts are not feasible in the current version.

- Michael
From: fcwilt
1 Jun 2022   [#24] In reply to [#23]
Hi Michael,

OK so how about, for now, using the existing app level option file?

Or even hard-coding into the script?

Frederick
From: Michael Gibson
1 Jun 2022   [#25] In reply to [#24]
Hi Frederick,

re:
> OK so how about, for now, using the existing app level option file?
>
> Or even hard-coding into the script?

Here's a version that has the directory name hard coded in the top of the script.

It will go through selected groups and generate .stl files into the directory.

There are instructions for how to install a plug-in here:
https://moi3d.com/faq#Q:_How_do_I_install_a_plug-in_script.3F

- Michael

Attachments:
WriteGroupObjectsToSTLFiles.js


From: fcwilt
1 Jun 2022   [#26] In reply to [#25]
Hi Michael,

Thanks much.

The install instructions mention two files, a .js file and a .htm file.

Do I need a .htm file?

Frederick
From: Michael Gibson
1 Jun 2022   [#27] In reply to [#26]
Hi Frederick, in this case you don't need the .htm file. The .htm file usually contains the UI for the command but since this one doesn't display any UI it doesn't have an .htm file.

- Michael
From: fcwilt
1 Jun 2022   [#28] In reply to [#27]
Hi Michael,

Actually I like that very much.

The previous script asks what type of export and, for STL files, it shows a dialog with a number of options.

This is quick and easy. I am happy as a clam at high tide.

A quick related question. Is the concept of a 3DM file having user entered meta-data, such as would be required for my export idea, or things like author, project, etc within the realm of the reasonable for V5?

Frederick
From: Michael Gibson
1 Jun 2022   [#29] In reply to [#28]
Hi Frederick,

re:
> A quick related question. Is the concept of a 3DM file having user entered
> meta-data, such as would be required for my export idea, or things like
> author, project, etc within the realm of the reasonable for V5?

Yes it should not be difficult to add those for v5.

- Michael
From: fcwilt
2 Jun 2022   [#30] In reply to [#29]
Michael

You are the best. You deserve some kind of award. Maybe a Nobel?

Frederick
From: Michael Gibson
2 Jun 2022   [#31] In reply to [#30]
Thanks Frederick! Also in case you haven't seen there is a method in v5 currently for storing general project notes inside a .3dm file. You can access it using File > Notes.

- Michael
From: fcwilt
2 Jun 2022   [#32] In reply to [#31]
Hi Michael,

So what is missing is a way for a script to access a particular piece of that meta-data?

Frederick
From: Michael Gibson
2 Jun 2022   [#33] In reply to [#32]
Hi Frederick, yeah the problem is that the notes is just one big glob of text so it's not very easy for a script to work with.

The part that I would like to add is a mechanism to put in "Document user data" that would be stored with a key name/value pairs so a script could have its own separate data channel that won't get stomped on by other scripts too easily.

- Michael
From: fcwilt
2 Jun 2022   [#34] In reply to [#33]
Hi Michael,

OK since I really need that you can work on it next.

Drat, this forum doesn't have emojis - so imagine a couple of dozen "grins" follow the sentence above.

Frederick
From: bemfarmer
3 Jun 2022   [#35]
My MoI4 background and gridline colors seem to have been altered (by MoI5 beta ???), to dark grey colors.
I do not think that I did anything to cause this. (?)

- Brian

(And MoI3 as well.)
From: Michael Gibson
3 Jun 2022   [#36] In reply to [#35]
Hi Brian, it seems to be some side effect from the new theme support in v5, I'll see if I can figure out what settings in moi.ini are getting re-used that maybe should be separate settings in v5 or something.

- Michael
From: bemfarmer
3 Jun 2022   [#37] In reply to [#36]
Thank you Michael.
In MoI4, I manually reset the View Background color to R210, G 223, B 225,
and Locked Objects color to 171, 171, 171,
which are the values used in MoI5 beta default color. Presumably the same as the old MoI 4 colors.
All is well.
I think that the MoI4 gridline colors were not altered. (?)

- Brian
From: TMeeks
4 Jun 2022   [#38] In reply to [#1]
Thanks Michael.

The new UI and Group capabilities are going to be a big help when teaching!

It just keeps getting better and better! :)

Tom Meeks
From: fcwilt
7 Jun 2022   [#39]
Hi Michael,

Currently :
- Clicking on a object in a group once selects the group
- Clicking again on the same object selects just that object

Correct?

I have a couple of ideas.

1. Allow selecting that behavior (group then object) or the reverse (object then group)

2. Allow holding down some key to control that behavior. Key up you get it one way, key down the other. Just to eliminate the need for a second click

Thanks.

Frederick
From: Michael Gibson
7 Jun 2022   [#40] In reply to [#39]
Hi Frederick,

re:
> Currently :
> - Clicking on a object in a group once selects the group
> - Clicking again on the same object selects just that object
>
> Correct?

Yes, it's similar to the "drill in" behavior that's been in place for selecting edge or face sub-objects of solids since MoI version 1.


> I have a couple of ideas.
>
> 1. Allow selecting that behavior (group then object) or the reverse (object then group)
>

I don't think I've seen any programs that function in the reverse order. Do you know of any examples?

It's kind of the most essential function of groups that it makes a set of objects stay together and that means starting with the topmost whole group being selected on the first click.


> 2. Allow holding down some key to control that behavior. Key up you get it one way, key down
> the other. Just to eliminate the need for a second click

What key would you propose for doing that? I'm not sure that there are any that are not already serving some other purpose.

- Michael
From: fcwilt
7 Jun 2022   [#41] In reply to [#40]
Hi Michael

I understand that my suggestion to reverse the order is a bit odd which is why I suggest making it an option.

Based on my use of MOI most of the time I am going to be manipulating an object, not a group.

So that means a lot of extra clicks, especial if I have 3 or 4 levels of nesting.

Would it be hard to allow both drill-down and "drill-up"?

My goal is not to make your work harder.

Forget the key idea, too many to remember already.

Thanks.

Frederick

Show messages:  1  2-21  22-41  42-61  62-81  82-101  …  142-145