Finding Length of Curves?  1-20  21-31

Next
 From:  OSTexo
5496.1 
Hello,

I vaguely remember reading that there is a script to determine how long a curve is, or how long a curve is between two points. Is this embedded in MoI v3 beta or do I have to download it somewhere? Thanks.
  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:  bemfarmer
5496.2 In reply to 5496.1 
http://moi3d.com/forum/index.php?webtag=MOI&msg=5136.1

It is called UnwrapCurve, and works very well.
Very useful for Flow setup.
I used the U key for the shorcut key.
  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
5496.3 In reply to 5496.1 
There's also a script here which will put the length of the curve into the clipboard as text that you can then paste in somewhere:
http://kyticka.webzdarma.cz/3d/moi/#CurveLength

- 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:  BurrMan
5496.4 In reply to 5496.1 
There is one that will copy the value to the clipboard:

http://kyticka.webzdarma.cz/3d/moi/#CurveLength

And there is one that will provide a readout while drawing:

http://kyticka.webzdarma.cz/3d/moi/#CurveLengthBeingDrawn

I think if you need a value between "2 points", you'll have to break the curve at the 2 points.

[EDIT] Foiled again by you and your wabbit! [EDIT]
  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:  coi (MARCO)
5496.5 In reply to 5496.2 
hi there!

there is a script called curvelength at petrs repository.

http://kyticka.webzdarma.cz/3d/moi/#CurveLength

script:/* Calculate length of selected curves and copy to the clipboard as text */ var crvs = moi.geometryDatabase.getSelectedObjects().getCurves(); var len = 0.0; for ( var i = 0; i < crvs.length; ++i ) len += crvs.item(i).getLength(); moi.copyTextToClipboard( len );

funny/frightening thing is, that the unwrap plugin isn't there(@petrs). maybe michael could put those things on a wiki page as some of them a rather hidden in the (forum)system. I#m visiting the forum on regular basis, but sometimes things just slip through.

-marco

EDITED: 23 Oct 2012 by MARCO

  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
5496.6 In reply to 5496.5 
Hi marco, yeah at some point I do want to collect that stuff on a wiki page or better yet on some kind of browser mechanism built into MoI that would also help with installing them. Like a lot of things it's difficult for me to find the time to do some of those things.

The curve unwrap one isn't on Petr's page since it's fairly recent and I don't think Petr has been over here on the forum a whole lot recently.

Still, most plug-ins are collected there on his page currently.

But if you are interested in some particular plug-in and can't find it on Petr's page, just post a question here asking about it and I can point you towards it.

- 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:  Frenchy Pilou (PILOU)
5496.7 
it was also on my page ;)
in French but if you open the tabs and Pop up you can see the name of the Scripts in English
http://moiscript.weebly.com/curvelengthbeingdrawn.html
  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:  OSTexo
5496.8 
Hello,

Thank you for all of the suggestions, it was exactly what I needed.
  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:  TpwUK
5496.9 
I am getting syntax error with the CurveLengthBeingDrawn script in v3 Beta, anybody else have this working and can offer any help. I set it in shortcuts as Ctrl+L

Martin
  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
5496.10 In reply to 5496.9 
Hi Martin,

> I am getting syntax error with the CurveLengthBeingDrawn script in v3 Beta, anybody else have this working
> and can offer any help. I set it in shortcuts as Ctrl+L

It seems to be working ok for me in the Sep-1 v3 beta.

Are you possibly using an older version of the script? The one I'm testing with is this one here:

code:
script: /* Show length of current curve being drawn */ try { moi.ui.commandUI.setInterval( 'var crvs = moi.geometryDatabase.getObjects().getCurves(); var len = 0.0; if ( crvs.length > 0 ) { len = crvs.item(crvs.length-1).getLength(); } if ( !window["_crvdistlabel"] ) { document.body.insertAdjacentHTML( "beforeEnd", "<div id=_crvdistlabel></div>" ); } _crvdistlabel.innerText = len.toFixed(4);', 250 ); } catch(e) {}


Also you should trigger it only after you have started to draw the curve.

- 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:  TpwUK
5496.11 In reply to 5496.10 
Thanks Michael that one works, the other one was the one from post 5496.7 by Frenchy Pilou (PILOU)

Martin
  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
5496.12 In reply to 5496.11 
Yeah it looks like Pilou's one got messed up on his web page.

Because the actual script has some HTML tags in it like <div> </div> those can actually get parsed by your web browser unless they're escaped, like in my message above I put the code into a <code> </code> block so that it would display as plain text and not get interpreted as HTML tags in the forum message.

Pilou - one way to fix it on your web page is for the web page for every < symbol, instead in the HTML write &lt; and for every > symbol, instead in the HTML write &gt;

Those special escape codes &lt; and &gt; (short for "less than" and "greater than") are escape codes that will not make the browser try to make actual HTML tags.

- 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:  Frenchy Pilou (PILOU)
5496.13 
Ok I will see that!

And there is not something like "Code" or similar for avoid that ?

Because if I must all change in my numerous pages...or just the ones with "HTML" inside ?

EDITED: 25 Oct 2012 by PILOU

  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:  Frenchy Pilou (PILOU)
5496.14 
this one is good for you ?
http://moiscript.weebly.com/curvelengthbeingdrawn.html
or i must put a space at the left of the transformed "<" and ">"
  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
5496.15 In reply to 5496.13 
Hi Pilou,

> Because if I must all change in my numerous pages...or just the ones with "HTML" inside ?

Probably only ones with HTML inside of the actual script itself.


> this one is good for you ?
> http://moiscript.weebly.com/curvelengthbeingdrawn.html

Hmm, actually still not right on your web page there because you only want to have &lt; in your page's base HTML code which will then display in the browser as <

But it seems that whatever you're using for posting has already escaped any ampersands, if you do a "view source" of your page you'll see your HTML code ends up as: &amp;lt; instead of &lt;

Maybe whatever system you're using for editing your web site has some way to tell it to use only the plain text of what you put, like in the forum here putting stuff inside of <code> </code> will do.

- 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:  Frenchy Pilou (PILOU)
5496.16 In reply to 5496.15 
This one ?
http://moiscript.weebly.com/curvelengthbeingdrawn.html

Seems some part are disapear! I have that at start (code inclued)
code:
script: /* Montre la longueur d'une courbe pendant son dessin */ try { moi.ui.commandUI.setInterval( 'var crvs = moi.geometryDatabase.getObjects().getCurves(); var len = 0.0; if ( crvs.length > 0 ) { len = crvs.item(crvs.length-1).getLength(); } if ( !window["_crvdistlabel"] ) { document.body.insertAdjacentHTML( "beforeEnd", "<div id=_crvdistlabel></div>" ); } _crvdistlabel.innerText = len.toFixed(4);', 250 ); } catch(e) {}
  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:  Frenchy Pilou (PILOU)
5496.17 
I have a tag for put pure HTML but seems it don't take all !
  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
5496.18 In reply to 5496.16 
Hi Pilou, nope sorry still not right... Now there's no escaping of less-than or greater-than at all, which is ok for the part of the script where there's a space around it like: "crvs.length > 0 " but the part of the script that has the <div> </div> in the script does not display because the browser sees it as an HTML formatting tag instead of displaying it as plain text.

So that ends up making this part of the script to not be displayed in the web browser:

code:
 <div id=_crvdistlabel></div>  



What is it that you're using to edit your web site, are you using a certain kind of editing tool to do it or are you directly editing your HTML files ?

- 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:  Frenchy Pilou (PILOU)
5496.19 In reply to 5496.18 
I have a tag for put pure HTML but seems it don't take all ! :)

I will try with another Brower...
  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
5496.20 In reply to 5496.17 
Hi Pilou,

> I have a tag for put pure HTML but seems it don't take all !

Well <code> </code> is not standard HTML, it's something that is specific to just this forum software which controls how the forum software will handle using what you typed whether as HTML control codes or "escaping" it so that it shows as text directly.

If you're using some kind of blogging/CMS type system for your web site it's possible they have some particular way of doing a similar thing.

- 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
 

Reply to All Reply to All

 

 
Show messages:  1-20  21-31