MoI discussion forum
MoI discussion forum

Full Version: Lots of unkown

Show messages:  1-15  …  136-155  156-175  176-195  196-215  216-235  236-255  256-275  …  356-372

From: Cemortan_Tudor
10 Aug 2020   [#196]
add point
D -> delete corners

Attachments:
AddPoint.js


From: Cemortan_Tudor
10 Aug 2020   [#197]
http://moi3d.com/forum/index.php?webtag=MOI&msg=8665.136
Shortcuts for manipulation:
Fillet; Inset; Shell ; Offset(Brep)

Numpad+ -> value + value/2
Shift+Numpad+ -> value + value/10
Numpad- -> value - value /3
Shift+Numpad- -> value + value/10
Numpad* -> value*2
Numpad/ -> value/2

//added
small adjustments
Ctrl+Shift+Numpad+ -> value +value/100
Ctrl+Shift+Numpad- -> value - value/100
r - reset distance to 0 -> to start new one

Attachments:
GetDistance.js


From: Cemortan_Tudor
12 Aug 2020   [#198]
Hi Michael
for offset - through point, I wanna store value for next op - have the same as previous - how shall I do it ? (temporary global save*)
From: Cemortan_Tudor
12 Aug 2020   [#199]
magic of offset ~ weird behavior

Attachments:
buggy_offset.3dm


From: Cemortan_Tudor
12 Aug 2020   [#200]
I've tested in other software to see if it's rly a problem !
Rhino Fails - buggy
DesignSpark Mechanical - buggy
Illustrator - it doest care about continuity
Fusion 360 - it maxed the continuity- when it breaks, will round corners

Image Attachments:
23123.jpg 


From: Michael Gibson
12 Aug 2020   [#201] In reply to [#198]
Hi Tudor,

re:
> for offset - through point, I wanna store value for next op - have the same as previous - how
> shall I do it ? (temporary global save*)

There's moi.command.setOption() and moi.command.getOption() that can be used for that.

The setOption works like: moi.command.setOption( 'string_id', val );

getOption goes like this:
var val = moi.command.getOption( 'string_id' );

One thing to watch out for is that getOption() will throw an exception if there isn't anything saved with that string id before, so you need to use it in a try/catch block like this:

var Val = 5;
try {
Val = moi.command.getOption( 'string_id' );
}
catch(e) {}

- Michael
From: Michael Gibson
12 Aug 2020   [#202] In reply to [#199]
Hi Tudor,

re:
> magic of offset ~ weird behavior

Offset has been tuned up quite a bit already for the next beta and it shouldn't make the weird excessive extensions anymore.

It will try to make a G2 continuous extension but it looks at how much the extension bends and once it is beyond a limit it switches to G1 line extensions:



- Michael
From: Cemortan_Tudor
12 Aug 2020   [#203]
thanks !
From: Cemortan_Tudor
13 Aug 2020   [#204]
rectangle round corner if forgot check button - applies instead of cancel entire op

Attachments:
GetRectRoundCorner.js


From: Cemortan_Tudor
13 Aug 2020   [#205]
for offset - here's a solution

if (pointpicker.event == 'finished') {
moi.command.setOption('OffsetCurveDistance', factory.getInput(1));
break;
}

if I'll need i can swap from thought point, to distance by hotkey or manual .. it will remember last input
offset factory input 1 = distance
but
moi.ui.alert(factory.getInput(1)) returns moi.object. Is a way to return value? or search for another way ?
From: Michael Gibson
13 Aug 2020   [#206] In reply to [#205]
Hi Tudor,

re:
> moi.ui.alert(factory.getInput(1)) returns moi.object. Is a way to return value? or search for another way ?

factory.getInput(index) returns a geometry factory input object which has a getValue() function on it.

- Michael
From: Cemortan_Tudor
13 Aug 2020   [#207]
sry but I have and error ..
it's making smt & I can't define where's the error

Image Attachments:
NewCanvas1.jpg 


From: Michael Gibson
13 Aug 2020   [#208] In reply to [#207]
Hi Tudor, if the input has never been initialized with any value, it will throw an "operation failed" exception.

So you would need something like:

var gotvalue = false;
var value;

try {
value = input.getValue();
gotvalue = true;
} catch(e){}

- Michael
From: Cemortan_Tudor
13 Aug 2020   [#209]
nope
factory.getInput(1) - returns object
factory.getInput(1).getValue() - always undefined

my assumption is that
1. cuz it wasnt any init from js (factory.setValue(1)...) it cant read the values from factory
2. factory.getInput(1) - has a different object format
3. curveOffsetDistance internal is returning undefined after execution -> while dragging offset - the value is always 0

I give up

Image Attachments:
Screenshot_14.png 


From: Michael Gibson
13 Aug 2020   [#210] In reply to [#209]
Hi Tudor, if you can post a complete script file that I can run over here I can take a look.

- Michael
From: Cemortan_Tudor
14 Aug 2020   [#211]
vanilla offset with hotkeys modifications
d -> swap from thought point to distance -> idea is to keep through point to distance value, so on next offset will remember last action -> since distance has already a build-in setOption

Attachments:
Offset.js


From: Michael Gibson
14 Aug 2020   [#212] In reply to [#211]
Hi Tudor, for offset the input index 1 is for a distance value, it is only filled in if you are using offset in its "offset by specific distance" mode, not in through point mode.

So for example if you type in 3 and push enter that input will get initialized to 3 and then your messages would show "3" and "true" when you pick a point for which side to offset on.

There was at one point a "curveOffsetDistance" additional property on the offset factory that would give back the current distance used for "through point" mode, but it's not working currently. I'll take a look and see if I can get that working.

- Michael
From: Cemortan_Tudor
14 Aug 2020   [#213]
Isocurve
v - swap between u/v
b - both

Attachments:
Isocurve.js


From: Cemortan_Tudor
15 Aug 2020   [#214]
Hi Michael
another future that i'd like to see -> u might not accept it
ctrl dragging(dublicate) - assign snap during dragging -> shift is straight, alt -> removes snaps, what about 'space' - readjust snapping point (readjust anchor position)
From: Michael Gibson
15 Aug 2020   [#215] In reply to [#214]
Hi Tudor, sorry no I don't think that would be very easy to add. If you want a specific anchor position, use the Transform > Move command instead of object dragging.

- Michael

Show messages:  1-15  …  136-155  156-175  176-195  196-215  216-235  236-255  256-275  …  356-372