Lots of unkown
 1-20  …  61-80  81-100  101-120  121-140  141-160  …  361-372

Previous
Next
 From:  Cemortan_Tudor
8665.101 
O hayo !
several questions for today !
1. Are any other waiting events then pointpicker ? If so how do I write them ? ( ex: I wanna do a script that runs from 2 hotkeys, c +q, c +w or c +r)
2. I've read changelog of v4, there's a future that can store history from file to file, i thought i might be handy for storing history of fillets/chamfers or other global variables -> Notes, how do i write, get from notes, examples please
3. another script that can be handy will be to give smallest fillet possible, detecting smallest edge - there's a script for that, but connected to the selected edges list how do i get them !
4. get point position other then moi.ui.alert
  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
8665.102 In reply to 8665.101 
Hi Cemortan_Tudor, thanks for posting the curve fillet file. I have a fix for that for the next v4 beta.

> 1. Are any other waiting events then pointpicker ? If so how do I write them ? ( ex: I
> wanna do a script that runs from 2 hotkeys, c +q, c +w or c +r)

There are other waitable objects than the pointpicker, including PointStreamPicker, ObjectPicker, OrientationEditor, CommandUIContainer, and PopupWindow which is the base class for flyout menus and dialogs. You can make an event loop calling waitForEvent() on any of those.

But for making a script that runs from 2 separate keypresses in sequence probably the way I'd try that is to open a dialog box on the first keystroke. Then when a dialog box has focus it can intercept all keystrokes and handle them with its own script code including overriding any normal shortcut key handling for the keyboard event.

You do that by implementing script functions for OnKeyDownEvent( event ) and/or OnKeyUpEvent ( event ) in a <script> block inside the dialog box .htm file. There's an example and comments in ShortcutKeyDialog.htm , that's the dialog that pops up when you add a new shortcut key.


> 2. I've read changelog of v4, there's a future that can store history from file to file, i thought i
> might be handy for storing history of fillets/chamfers or other global variables -> Notes, how do
> i write, get from notes, examples please

Well the notes is supposed to be used for storing some text information that can be displayed to the user just for additional information about the file. You can access it by moi.geometryDatabase.notes . It is stored in the .3dm file.


> 3. another script that can be handy will be to give smallest fillet possible, detecting
> smallest edge - there's a script for that, but connected to the selected edges list
> how do i get them !

Do you mean the largest possible fillet? There are many factors that would go into that beyond just edge length. For example fillets are wider or shorter depending on the angle that 2 surfaces are meeting at (see http://moi3d.com/forum/index.php?webtag=MOI&msg=9815.7 for an example) , it's not just edge length that determines the maximum size.


> 4. get point position other then moi.ui.alert

You mean you want to display x,y,z coordinates somewhere on the main window instead of in an alert dialog? Where do you want to show them?

- 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:  Cemortan_Tudor
8665.103 
I know that's not vanilla, that's why i'm adding comments where I'm adding script for vanilla, later on other installations will be welcome to dl this scripts/modify
I'd wish to have a hardOps hotkey helper - xD far from that

added hotkey for closing curve/polyline while drawing
'c' - close curve
- Tudor -
Attachments:

  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:  Cemortan_Tudor
8665.104 
reworked offset curves
added hotkeys
r - realtime or throught pt
d - distance
s - sharp/round
t - trim
c - cap ends
b - both sides

wanna add one more future, dont know how to do it !
if on brep first point was on surface - restrict to normal, there's restrictToObject (dont know much about it) and havent found normal* as reference scripting
- Tudor -
Attachments:

  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:  Cemortan_Tudor
8665.105 
fillet curves
if selected more than 1 fails - i've read fillet script, it fails from start
earlier I was trying to fillet curves after array - now i know why it fails, for solids it might skip(process time), but for curve I think will be welcome
====
About max distance - wanna start with curves, later will see where it will come,
Before that let's say they are 2 types of fillets - one only with corners, others curves with curvature (curves.js)
*for corners - task one can be done
found article on wikipedia, math around
https://en.wikipedia.org/wiki/Incircle_and_excircles_of_a_triangle#:~:text=In%20geometry%2C%20the%20incircle%20or,center%20called%20the%20triangle's%20incenter.

*for curvature
haven't found any curvature scripts related (forum)
don't now yet about math - but there should be one !!!!
to find ~ S shape of meeting tangency circles on a curve

EDITED: 24 Jun 2020 by CEMORTAN_TUDOR

Image Attachments:
Size: 33.1 KB, Downloaded: 74 times, Dimensions: 428x611px
  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
8665.106 In reply to 8665.104 
Hi Tudor,

re:
> wanna add one more future, dont know how to do it !
> if on brep first point was on surface - restrict to normal, there's restrictToObject
> (dont know much about it) and havent found normal* as reference scripting

To restrict a point pick on a surface normal you would need both the point on the surface and also the surface normal.

Then on the pointpicker, there's a restrictToLinePtDir( pt, dir ) function you can call.

- 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
8665.107 In reply to 8665.105 
Hi Tudor,

re:
> fillet curves
> if selected more than 1 fails - i've read fillet script, it fails from start

If you select 2 separate curves it will do a fillet between those curves, that's to support AutoCAD style fillets.

re:
> About max distance - wanna start with curves, later will see where it will come,
> Before that let's say they are 2 types of fillets - one only with corners, others
> curves with curvature (curves.js)

Sorry I'm not understanding this part.

- 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:  Cemortan_Tudor
8665.108 
expanding hotkeys
setting filters
s - Solids
f - Faces
b - Surfaces
e - Edges/Curves
v - Points
d - Annotations
- Tudor -

  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:  Cemortan_Tudor
8665.109 
O hayo !
obj wishes
subd -> from zbrush all models are very small scale, moi can't do operations at such small sizes, will be nice to have an import scale -> there's only for export, not import (default)
import obj -> is relocating the object as rescales it
- Tudor -
Image Attachments:
Size: 162.6 KB, Downloaded: 80 times, Dimensions: 1331x973px
  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:  Cemortan_Tudor
8665.110 
why is so ?
- Tudor -
Attachments:

  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
8665.111 In reply to 8665.109 
Hi Tudor,

re:
> import obj -> is relocating the object as rescales it

The ImportOBJ plug-in automatically resizes objects when it imports them, this can be disabled by passing in an additional parameter, see here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=6674.453

- 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
8665.112 In reply to 8665.110 
Hi Tudor,

re: why is so ?

The point that your mouse picks is done by an intersection between the screen ray and the construction plane. In the 3D view if you are looking at the construction plane at an steep angle it is pretty easy to have a point far off towards the horizon with only a small movement in screen space:



- Michael
Attachments:

  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:  Cemortan_Tudor
8665.113 In reply to 8665.112 
i'm trying also via move
pointpicker.restrictToPlane( moi.ui.getActiveViewport().targetFrame , true );
am I doing smt wrong ?
same result
I want a screen move*
  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
8665.114 In reply to 8665.113 
Hi Tudor, one method you can use for that is the script here which sets the construction plane to the view frame:
http://moi3d.com/forum/index.php?webtag=MOI&msg=2599.8

re:
> i'm trying also via move
> pointpicker.restrictToPlane( moi.ui.getActiveViewport().targetFrame , true );
> am I doing smt wrong ?

Can you post the full script?

- 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:  Cemortan_Tudor
8665.115 
http://moi3d.com/forum/index.php?webtag=MOI&msg=8665.92
move + a
*about history, I dont have enough time to go deep into it, I thought will be welcome some kind of history - *Notes
*smallest fillets i'll work on it more, found some scripts and posts on v4 version that might help - curve explorer and ordered curves
*point position - yes, x,y,z somewhere in moi explorer without scripting
*about normals - seems smt new to v4, like it, when offsetting u getting notification of a normal plane to extrude ~ it's the same as perpendicular to a point, normals for me sounds more familiar - was searching for that terminology

some more that i'm interested
moi htlm functions if there's a collection of them - aka moi:options; moi:text; moi:Numeric .. so on
hidden moi factories xD discovered that arrow and might be others same category (aka - dimensions arrowhead)

wishes
ctrl clone -> to pick last duplicate todo modifications - as an option ? often it comes that i have to change position/size so on
there's a script
script:var a = moi.command.lastCommandRevisionStart; var b = moi.command.lastCommandRevisionEnd; var objects = moi.geometryDatabase.getObjects(); for ( var i = 0; i < objects.length; ++i ) { var obj = objects.item(i); if ( obj.databaseRevision> a && obj.databaseRevision <= b ) obj.selected = true; }
I dont understand it - doesn't respond to ctrl clone/dublicate as well - only to scripts ?

~ buggy
alt + right click - shouldn't repeat last command -> It's supposed to be zoom

and Thanks !
- Tudor -
  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
8665.116 In reply to 8665.115 
Hi Tudor, sorry it's hard for me to follow what parts you are just describing and what parts you are asking questions about.

re:
> http://moi3d.com/forum/index.php?webtag=MOI&msg=8665.92
> move + a

It seems to be working ok over here - I push a when picking the target point and it then tracks along the view plane. Can you tell me what steps you are using where you're seeing a problem?


> moi htlm functions if there's a collection of them - aka moi:options; moi:text; moi:Numeric .. so on

There isn't any documentation for these currently, sorry. But if you have questions about a particular one I can tell you about it. For <moi:option> that's like a regular HTML <option> except it gets the inner text to display by a textid="" value that is looked up from the current language's string table.

<moi:Text> is like a <span> tag but it fills in its text by the given textid="" value looked up from the current language's string table.

<moi:NumericInput> is similar to an HTML <input> but for numeric values.

re:
> wishes
> ctrl clone -> to pick last duplicate todo modifications - as an option ? often it comes that i have to change position/size so on
> <...>
> I dont understand it - doesn't respond to ctrl clone/dublicate as well - only to scripts ?

Hmm, yes it's because object dragging doesn't run as a regular command does and so it's missing some of the setup/cleanup type things that happen with regular commands. I'll see about fixing this.


> ~ buggy
> alt + right click - shouldn't repeat last command -> It's supposed to be zoom

Any right click will repeat the last command, (or push the "Done" button if that is visible), it's only an Alt + Right drag that does a zoom, not a click without dragging.

- 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:  Cemortan_Tudor
8665.117 
O hayo !
used same script
I'll give a preview as file
It should act like viewport cplane

- Tudor -

  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
8665.118 In reply to 8665.117 
Hi Tudor, and when are you pushing the 'a' key to trigger your restrict to the view plane? Your code only handles it for the second point pick.

- 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

Message 8665.119 deleted 28 Jun 2020 by CEMORTAN_TUDOR

Previous
Next
 From:  Cemortan_Tudor
8665.120 
thanks ! I was missing ordering !
- Tudor -
  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

 

 
Show messages:  1-20  …  41-60  61-80  81-100  101-120  121-140  141-160  161-180  …  361-372