Finding Length of Curves? 1-20  21-31

 From: OSTexo 23 Oct 2012  (1 of 31)
 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.

 From: bemfarmer 23 Oct 2012  (2 of 31)
 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.

 From: Michael Gibson 23 Oct 2012  (3 of 31)
 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

 From: BurrMan 23 Oct 2012  (4 of 31)
 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]

 From: coi (MARCO) 23 Oct 2012  (5 of 31)
 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

 From: Michael Gibson 23 Oct 2012  (6 of 31)
 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

 From: Frenchy Pilou (PILOU) 23 Oct 2012  (7 of 31)
 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

 From: OSTexo 24 Oct 2012  (8 of 31)
 Hello, Thank you for all of the suggestions, it was exactly what I needed.

 From: TpwUK 25 Oct 2012  (9 of 31)
 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

 From: Michael Gibson 25 Oct 2012  (10 of 31)
 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", "
" ); } _crvdistlabel.innerText = len.toFixed(4);', 250 ); } catch(e) {} ``` Also you should trigger it only after you have started to draw the curve. - Michael

 From: TpwUK 25 Oct 2012  (11 of 31)
 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

 From: Michael Gibson 25 Oct 2012  (12 of 31)
 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
those can actually get parsed by your web browser unless they're escaped, like in my message above I put the code into a 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 < and for every > symbol, instead in the HTML write > Those special escape codes < and > (short for "less than" and "greater than") are escape codes that will not make the browser try to make actual HTML tags. - Michael

 From: Frenchy Pilou (PILOU) 25 Oct 2012  (13 of 31)
 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: 26 Oct 2012 by PILOU

 From: Frenchy Pilou (PILOU) 26 Oct 2012  (14 of 31)
 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 ">"

 From: Michael Gibson 26 Oct 2012  (15 of 31)
 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 < 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: &lt; instead of < 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 will do. - Michael

 From: Frenchy Pilou (PILOU) 26 Oct 2012  (16 of 31)
 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", "
" ); } _crvdistlabel.innerText = len.toFixed(4);', 250 ); } catch(e) {}`

 From: Frenchy Pilou (PILOU) 26 Oct 2012  (17 of 31)
 I have a tag for put pure HTML but seems it don't take all !

 From: Michael Gibson 26 Oct 2012  (18 of 31)
 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
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:`
` 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