MoI discussion forum
MoI discussion forum

Full Version: Lots of unkown

Show messages:  1-10  …  91-110  111-130  131-150  151-170  171-190  191-210  211-230  …  371-372

From: Michael Gibson
4 Jul 2020   [#151] In reply to [#147]
Hi Tudor,

re:
> this also can be applied to filters ( which I have to have opened browser to view which one is
> active - aka edg/faces/solids/so on)

It would be a good idea to have an additional indicator for a filter being active up here somewhere, I've added that to my list of things to look into after v4 is finished.



- Michael

Image Attachments:
filter_on_notification_could_go_here.jpg 


From: Cemortan_Tudor
4 Jul 2020   [#152]
1. About isolate - it's not my idea !
It comes from softimage - it has several layers of hidden properties
1. render - can overrides lower layers
2. groups - individual only manual changed - overrides lower layers
3. layers ~ similar to objects name in moi
2. individuals ~ moi - selected object hide
1. isolate - lowest level (can tunnel from isolate to isolate until 1 object will remain - nothing else then exit)

2. Ini - thanks

3. Cplane - my idea is to combine hotkeys under groups, later expand them (c only for cplane, hotkeys after part of cplane grouping - aka reset)
~ on rest of scripts there's a waitable object where it can be placed, here i can't setup under a group
From: Michael Gibson
4 Jul 2020   [#153] In reply to [#152]
Hi Tudor,

> 1. About isolate - it's not my idea !
> It comes from softimage - it has several layers of hidden properties
> 1. render - can overrides lower layers
> 2. groups - individual only manual changed - overrides lower layers
> 3. layers ~ similar to objects name in moi
> 2. individuals ~ moi - selected object hide
> 1. isolate - lowest level (can tunnel from isolate to isolate until 1 object will remain - nothing else then exit)

Sounds very complicated.


> 3. Cplane - my idea is to combine hotkeys under groups, later expand them (c only
> for cplane, hotkeys after part of cplane grouping - aka reset)
> ~ on rest of scripts there's a waitable object where it can be placed,
> here i can't setup under a group

Yes, the cplane's event loop happens to be implemented with C++ code inside moi_lib.dll instead of in
script code so there isn't any way you can alter that one. You would have to set up your own
script for it instead.

- Michael
From: Cemortan_Tudor
5 Jul 2020   [#154]
now i'm more confused
expanding http://moi3d.com/forum/index.php?webtag=MOI&msg=8818.15 curve explorer
there where only numbers, i've change them to annotation text
1. after saving with annotations, reloading annotations will change positions !
2. crv - evaluateCurvature - understand it's trying to evaluate several connected control pts ?!?!?!
3. tg - evaluateTangent - shoudn't be perpedicular ?
4. evaluateDerivatives - what are those ? (1,2,3 - too far away, pointed direction)




with this script, arrows point different direction (I guess It's correct one, arrows are tangent*)
http://moi3d.com/forum/index.php?webtag=MOI&msg=9781.13

Attachments:
_curveExplorer_test.js

Image Attachments:
Screenshot_19.png  Screenshot_20.png 


From: Michael Gibson
5 Jul 2020   [#155] In reply to [#154]
Hi Tudor,

re:
> 1. after saving with annotations, reloading annotations will change positions !

There is a bug with the anchor point switching around when you save/reload annotation text block objects, it's fixed for the next beta.


> 2. crv - evaluateCurvature - understand it's trying to evaluate several connected control pts ?!?!?!

I'm not sure what you're asking here.


> 3. tg - evaluateTangent - shoudn't be perpedicular ?

No, a curve tangent is not perpendicular to a curve, it's the direction the curve is traveling in at that point, like this:



> 4. evaluateDerivatives - what are those ? (1,2,3 - too far away, pointed direction)

That would take a long time to explain, you could try some online descriptions like:
https://demonstrations.wolfram.com/TheDerivativeVectorsOfABSpline/

Or check out:
"NURB Curves: A Guide for the Uninitiated" by Philip J. Schneider
https://vintageapple.org/develop/pdf/develop-25_9603_March_1996.pdf

These values are vectors that represent directions, it maybe sounds like you're interpreting them as point location values instead of vector directions?

- Michael

Image Attachments:
tudor_tangent.jpg 


From: Cemortan_Tudor
7 Jul 2020   [#156]
restrictToLinePtDir
Restrict the user to only selecting points along the line defined by startPt and the vector dir. If projectAll is true, the user can select any point along the infinite line that goes through startPt in the direction specified by dir. If projectAll is false, the user can only select points along the line segment between startPt and startPt + dir.
false parameter is not working
From: Michael Gibson
7 Jul 2020   [#157] In reply to [#156]
Hi Tudor,

re:
> restrictToLinePtDir - false parameter is not working

It's working ok for me over here.

Parameter "project all" true, test script:

script: var pp = moi.ui.createPointPicker();
pp.restrictToLinePtDir( moi.vectorMath.createPoint(0,0,0), moi.vectorMath.createPoint(1,1,0), true );
while ( 1 ) { if ( !pp.waitForEvent() ) break; }

result - point tracks along given line instead of tracking along viewport's cplane grid, and object snaps are also projected onto the line:





Parameter "project all" false, test script:

script: var pp = moi.ui.createPointPicker();
pp.restrictToLinePtDir( moi.vectorMath.createPoint(0,0,0), moi.vectorMath.createPoint(1,1,0), false );
while ( 1 ) { if ( !pp.waitForEvent() ) break; }

result - point tracks along given line instead of the viewport's grid, but object snaps are not projected onto the line:




- Michael

Image Attachments:
tudor_project_line1.jpg  tudor_project_line2.jpg 


From: Cemortan_Tudor
8 Jul 2020   [#158]
Thanks ! next time I'll ask if it's working xD
I thought it will work in different way

_extendTangency 1.1
* added htlm
add functions + hotkeys
b - bothsides
a - join
f - flip sides (here I've needed ~ restrict line direction - not Togo opposite tangency direction)
---
script is not ended, but it has a good chunk of it, will return when i'll know more about html and moi basefunctions

Attachments:
_extendTangecy.htm
_extendTangecy.js


From: Cemortan_Tudor
8 Jul 2020   [#159]
how can i get difference between parallel frames ?
From: Michael Gibson
8 Jul 2020   [#160] In reply to [#159]
Hi Tudor,

> how can i get difference between parallel frames ?

Do you mean the difference in the origin points between 2 coordinate frames?

That would be like this:

var dx = FrameB.origin.x - FrameA.origin.x;
var dy = FrameB.origin.y - FrameA.origin.y;
var dz = FrameB.origin.z - FrameA.origin.z;

- Michael
From: Cemortan_Tudor
9 Jul 2020   [#161]
between parallels - similar to distance of projection of 1 pt from 1 frame to another
From: Michael Gibson
9 Jul 2020   [#162] In reply to [#161]
Hi Tudor, sorry it's not clear to me what you're trying to do.

If it's something like transforming the coordinates of a point in global x,y,z coordinates into coordinates relative to a frame, that would be like this:

var local_x = frame.distancex( pt );
var local_y = frame.distancey( pt );
var local_z = frame.distancez( pt );

The .distancex, .distancey, and .distancez functions on a coordinate frame return the distance of a point in world coordinates along the x, y, or z axis direction planes of the frame.

If that's not it then I need a clearer description of what you're trying to do, it's hard to figure out what you're asking about if you don't provide some more details.

- Michael
From: Cemortan_Tudor
9 Jul 2020   [#163]
bool operations of standalone curves that have different frames but are parallel to each other (ex circle at 0 0 0 and another at 1 1 1) -> to apply a move to second group(for difference will be subtract objectgroup) & do the bool
From: Cemortan_Tudor
9 Jul 2020   [#164]
rect3pts with center

Attachments:
RectCenter3pt.htm
RectCenter3pt.js


From: Michael Gibson
9 Jul 2020   [#165] In reply to [#163]
Hi Tudor,

> bool operations of standalone curves that have different frames but are parallel to each other
> (ex circle at 0 0 0 and another at 1 1 1) -> to apply a move to second group(for difference
> will be subtract objectgroup) & do the bool

Is this something that you're trying to script? Can you show an example of the input objects and the result you are trying to make?

- Michael
From: Cemortan_Tudor
9 Jul 2020   [#166]
scene browser - objects are named
there is a solution - to create laaaaarge plane - and second group of objects to drop a point on this plane(project), and apply a move
mb is another solution

Attachments:
bool_scene.3dm


From: Cemortan_Tudor
9 Jul 2020   [#167]
another script that i'm trying to work on is trim a segment or cut a segment from a curve
the problem that i'm conflicting is that i have todo a separate object - commit and later choose from sepFactory
I dont know what objects are created after commiting, or how can I set a variable to them ! sepFactory.commit().lenght = 0
what's happening after a commit ?
From: Michael Gibson
9 Jul 2020   [#168] In reply to [#166]
Hi Tudor,

> scene browser - objects are named
> there is a solution - to create laaaaarge plane - and second group of objects to drop a point on this
> plane(project), and apply a move mb is another solution

Ok, if you have a solution what do you need? Is there a question you have about this?

- Michael
From: Michael Gibson
9 Jul 2020   [#169] In reply to [#167]
Hi Tudor,

re:
> what's happening after a commit ?

A .commit() is expected to be the last thing that is called on a factory, it is a signal to MoI that the work being done for the factory with updating different inputs is all finished.

If you want to get the objects that will be generated, you can instead call .update() and then .getCreatedObjects(). Or it is also possible to call .calculate() which will generate the result and return it as an object list without adding it in to the geometry database like usually happens in regular commands with .update()/.commit()/.cancel() .

- Michael
From: Frenchy Pilou (PILOU)
9 Jul 2020   [#170]
All these Scripts (?) are they on a same place ? (Sites...)

Show messages:  1-10  …  91-110  111-130  131-150  151-170  171-190  191-210  211-230  …  371-372