MoI discussion forum
MoI discussion forum

Full Version: V5 Wish List

Show messages:  1-4  …  385-404  405-424  425-444  445-464  465-484  485-504  505-524  525-529

From: Michael Gibson
25 Nov 2022   [#445] In reply to [#444]
Hi blackboard,

re:
> maybe u can add to moi opportunity to drag points of solids like in rhinoceros?

It usually doesn't work very well to try and do this with solids made up of trimmed NURBS surfaces. There are lots of problems with this feature area in Rhino where it generates messy results in many cases.

If you want to model by dragging around surface points it's better to do sub-d modeling for that rather than CAD modeling.

- Michael
From: Larry Fahnoe (FAHNOE)
6 Dec 2022   [#446]
Forgive me Master for I know not what I ask… ;-}

An MoI object dumper usable in a script. Maybe akin to perl’s Data::Dumper, something that returns a string describing the MoI object passed? Perhaps a simplified description along the lines of the Type information provided by clicking on the UI’s Details...? Recursive object dumping would be nice but probably too much to hope for. Thinking specifically about descriptions of MoI's objects, not a generalized javascript object dump.

moi.ui.alert( moi.dump( obj));

When I’m writing and debugging a script, a common challenge is figuring out what I’ve just done to abuse MoI’s object model & why my attempts to get an object's property or method to work are blowing up--typically because I've used an object incorrectly. When things go awry I start by looking at what I've just added, and then assuming it isn't a syntax error, I begin adding moi.ui.alert() messages and wrapping suspect blocks in try {} catch( e) { moi.ui.alert( 'error: ' + e) }. Having the ability to dump object information would be another very useful assist I think.

--Larry
From: Michael Gibson
6 Dec 2022   [#447] In reply to [#446]
Hi Larry, re: object dump method - if you could give a more complete spec of exactly what output you would want that would help.

- Michael
From: Larry Fahnoe (FAHNOE)
7 Dec 2022   [#448] In reply to [#447]
> Hi Larry, re: object dump method - if you could give a more complete spec of exactly what output you would want that would help.

Hi Michael,

Not knowing what’s inside "the box" makes it challenging to provide a more complete spec, hence my explanation of how I’d make use of whatever info could reasonably be provided. So, guessing at the box’s contents, perhaps something along the lines of:

code:
object type: MoI object class/subclass name, e.g. ObjectList or curve
    object properties:
        name: value (perhaps RO, or RW)
        […]
    object methods: (this is maybe too much to suggest)
        name: brief parameter description
        […]


I’m thinking that this sort of information would be used in the context of moi.ui.alert() or moi.log() and would be intended to help someone writing a script diagnose issues while debugging. I think this helps to address a class of mistakes that arise from a misunderstanding of the object model. Perhaps there are other attributes that might make sense in this context.

As an example of where a dump tool might help: I kept getting “calculation failed” from my attempts to use the offset factory and after a bunch of flailing about the lightbulb finally came on: I was passing in a drawing object as input 0 when offset expects an ObjectList. I had been convinced (and thus focused on) that I was not passing input 2 (the offset point) properly instead of realizing that I’d provided the wrong object type. Having (and using!) a dump tool would have exposed my mistake.

Perhaps such an effort is a step toward some future enhanced scripting environment; my intention is to suggest work that ideally benefits your future aims while providing value for users who are trying to write and debug their scripts. Maybe V5 provides some beneficial low hanging fruit, but V6 expands upon it as you see fit; the output of the dump would grow and change as MoI evolves.

--Larry
From: Michael Gibson
7 Dec 2022   [#449] In reply to [#448]
Hi Larry, I've updated a couple of scripting things for the next v5 beta to help with that.

The first thing is that all MoI script objects implement a .toString() function that will return the specific object name rather than a generic "MoiObj" name which used to be returned for every object previously.

So for example this:

var obj = moi.geometryDatabase.createObjectList();
var text = obj.toString();

will now generate [object ObjectList] instead of [object MoiObj].


Then the other thing is that property enumeration using the "for...in" syntax will now work on MoI script objects which wasn't implemented previously. Methods will also show up in the enumeration as properties that have a value of '[object Function]'.


So that should enable making a dump function like you're asking about, something like:

code:
function dump( obj )
{
    var text = obj.toString();

    for ( propname in obj )
        text += '\n' + propname + '=' + obj[propname].toString();

    return text;
}


- Michael
From: Larry Fahnoe (FAHNOE)
8 Dec 2022   [#450] In reply to [#449]
> Hi Larry, I've updated a couple of scripting things for the next v5 beta to help with that.

Wow, thanks Santa!! :-)

> will now generate [object ObjectList] instead of [object MoiObj]

That will be quite nice as it is a bit frustrating to see [object MoiObj] when what I really wanted to see was *which* MoI object it was.

> Then the other thing is that property enumeration using the "for...in" syntax will now work on MoI script
> objects which wasn't implemented previously. Methods will also show up in the enumeration as
> properties that have a value of '[object Function]'.

I think this along with your example dump() will go a long way towards helping script developers have some better insight into the objects
being used. Maybe someday the methods could be fleshed out with their parameters which then makes them somewhat self-documenting.

I'd vote to see dump() show up as dump.js in MoI so that other scripts could simply #include and use it, along with mentions in the release
notes or command reference of course. :-)

Many thanks for such a quick solution!!

--Larry
From: pressure (PEER)
8 Dec 2022   [#451] In reply to [#450]
Thanks Michael and Larry! Sounds like some handy new functionality.
From: Matadem
8 Dec 2022   [#452]
Good day.
This probably was requested at some time....

Ussually I work in Moi3d and then import in Vectric.

The request would be distort and or the ability to group items and then distort.

Hope this can make it in future version.

Thank you!

Image Attachments:
Node distort.jpg 


From: Michael Gibson
8 Dec 2022   [#453] In reply to [#452]
Hi Matadem,

re:
> The request would be distort and or the ability to group items and then distort.
>
> Hope this can make it in future version.

You can do that in the current version using the Transform > Deform > Flow command.

Set up one plane underneath your curves, copy the plane and edit its points to distort it and then use Transform > Deform > Flow to map from the base plane to the distorted one. Note - make sure you edit the points on the distorted one, don't form a trimmed surface using Construct > Planar because that has a non-distorted plane as its underlying surface:





- Michael

Image Attachments:
flow_distort1.jpg  flow_distort2.jpg 


From: Matadem
9 Dec 2022   [#454]
Thank you for the reply.

Maybe I should have used the word warp.
I just found out yesterday that new affinity designer v2 have warp and dxf import not export.
This is wat I refer to https://www.youtube.com/watch?v=xGZqXYd1czw

If something like this could make it into Moi3d ...warp your designs, your 3d model or warp your design than extrude it would be great.(cnc cutters, vinyl cutters and laser cutters :D ).

Thank you!

Message 10114.455 was deleted


From: Michael Gibson
9 Dec 2022   [#456] In reply to [#454]
Hi Matadem,

re:
> If something like this could make it into Moi3d ...warp your designs, your 3d model or warp your
> design than extrude it would be great.(cnc cutters, vinyl cutters and laser cutters :D ).

Yes, there is a "Flow" function already in Moi under Transform > Deform > Flow that can be used for doing similar things now:
https://moi3d.com/4.0/docs/moi_command_reference8.htm#flow

To use it you set up 2 surfaces, one is a rectangle surface under your base objects and the second one is a deformed target surface.

Here's an example in MoI:






- Michael

Image Attachments:
flow_warp1.jpg  flow_warp2.jpg  flow_warp3.jpg 


From: Psygorn (DRILLBIT)
11 Dec 2022   [#457]
Hello Michael,

Is it possible to have the following ability (or do we have it currently) :

To be able to have control points of a curve duplicated by holding Ctrl/Command key. (If I want to elaborate on it better I would say please take a look at the attached image. in the image you can see a circle with half of its control points selected I would like to be able to duplicate those selected control points and adjust the shape of the curve by moving selected control points to the right side getting the second curve u see below the circle) (I imagine this could be helpful because it works even faster in some cases) (and it is just a thought)


From: Frenchy Pilou (PILOU)
11 Dec 2022   [#458] In reply to [#457]
Maybe Flow function can do that again... ?
From: bemfarmer
11 Dec 2022   [#459] In reply to [#457]
Extrude with Set Path looks promising, with a semicircle as initial curve.
A few additional steps would be needed...
Maybe a short script could be done...

- Brian
From: Michael Gibson
11 Dec 2022   [#460] In reply to [#457]
Hi Psygorn,

re:
> To be able to have control points of a curve duplicated by holding Ctrl/Command key.

Currently if you hold down the Ctrl key when you drag on an object it will drag a copy of the object, including if you drag control points.

- Michael
From: Psygorn (DRILLBIT)
11 Dec 2022   [#461] In reply to [#460]
Hi Michael,

Yes I just thought out loud ( just thought this could open a fast way to manipulate curve shapes for example turning a circle into a pill shape ) Just a thought!

and maybe my explanation was not good I meant I just want control points to be copied. Currently when we Ctrl+drag the control points the curve is also copied with them.

It was just a thought dear Michael. I apologize if it sounds absurd! sorry.
From: Psygorn (DRILLBIT)
11 Dec 2022   [#462] In reply to [#459]
Hi bemfarmer,

I meant I wish I could only duplicate control points when holding Ctrl+drag on them. and I thought maybe with this ability (being able to copy only control points then we could be able to manipulate curves shapes with more speed.
For example imagine u could create pillshape just by selecting half of the control points of a circle and drag them to another side. It was just a thought!
From: Michael Gibson
11 Dec 2022   [#463] In reply to [#461]
Hi Psygorn,

re:
> and maybe my explanation was not good I meant I just want control points to be copied. Currently
> when we Ctrl+drag the control points the curve is also copied with them.
>
> It was just a thought dear Michael. I apologize if it sounds absurd! sorry.

Hmmm, well looking more closely at your example it looks like only 2 of the points out of the ones you selected are copied:




Then there are 4 completely new points inserted that do not correspond to any previous point, so those are not really "copies":




I'm sorry but it would be pretty strange to have a dedicated keyboard shortcut that would copy only some of the current selected points, not all of them, and then additionally insert new points that work just for this one very specific case of making a pill shape.

In the future I do want to add some symmetry editing tools, maybe those would help with this particular case as well.

- Michael

Image Attachments:
psygorn_control_points1.jpg  psygorn_control_points2.jpg 


From: Psygorn (DRILLBIT)
11 Dec 2022   [#464] In reply to [#463]
Ah ok, Tanx :)

Edit: Dear Michael, I did the following to make pill shape -> Trimmed a Circle put a distance between the produced semi circles and then connected them with two lines and joined them I guess that is why there are more points. However, while I was doing it I thought if we could just select half of the control points and then drag them to another side while holding down control and ending up with the pill shape we could have a faster work fellow. I thought this Idea is aligned with the philosophy behind MOI3D which is "Speed". But now I think I need to apologize maybe my idea is not a good one! sorry! and thank you for your time. :-)

Show messages:  1-4  …  385-404  405-424  425-444  445-464  465-484  485-504  505-524  525-529