MoI discussion forum
MoI discussion forum

Full Version: Midpoint of a curve?

Show messages: All  1-7  8-13

From: bemfarmer
6 Jan 2018   [#8]
Here is a very simple little script to find the Midpoint of a curve or an edge, closed or open.

I needed a simple function to get the midpoint of a curve segment, so writing this script helped to clarify the coding.

This code of this script has a very high percentage, modified and adapted, from LineWeb and BlendCap scripts.

The script could be made much more elaborate, to pick multiple curves and/or edges, and find Midpoints of them.

- Brian

Attachments:
_CurveMidpoint.zip


From: mkdm
6 Jan 2018   [#9] In reply to [#8]
Hello Brian (and everyone...and happy new year!)

Thanks a lot for this very useful script!

I've tested it also on a 3D curve and on a merged edge and it works fine (also with V4).
(With "merged edge" I mean an edge that I first trimmed and the merged with "merge" command)

Ciao!
From: bemfarmer
7 Jan 2018   [#10] In reply to [#9]
Marco, thank you, and thank you for the testing.

A brief, extremely simple self reminder, about MoI in general:
Hidden edges or curves cannot be selected until they are unhidden, using Hide or Styles of Types, or some other script. :-)

It seems that objects saved by MoI and reloaded may have a few previously hidden edges unhidden.
It seems that objects saved by Max's ObjLibrary , and reloaded with customUI, have ALL previously hidden edges unhidden. (?)

- Brian

I assigned Shortcut key "M" to _CurveMidpoint.
From: bemfarmer
7 Jan 2018   [#11]
It might be nice to redo the script to conform to the behavior of "_MarkCurveStart" script.
And call it "_MarkCurveMidpoint.

- B
From: bemfarmer
7 Jan 2018   [#12] In reply to [#11]
Here is the script _MarkCurveMidpoint, which works like _MarkCurveStart.
Now I have shortcut key Alt+M to get curve or edge start points,
and shortcut key M to get the midpoints.

The script is essentially the same as _CurveMidpoint, with a for loop...

- Brian

Attachments:
_MarkCurveMidpoint.zip


From: Michael Gibson
7 Jan 2018   [#13] In reply to [#10]
Hi Brian,

> It seems that objects saved by MoI and reloaded may have a few previously hidden edges unhidden.

Yeah I happened to run into this recently as well - it's a bug where the last edge of a brep doesn't get its stored hidden property loaded. It's fixed for the next beta.

- Michael

Show messages: All  1-7  8-13