silhouette points of planar curve
 1-12  13-32  33-34

Previous
Next
 From:  Michael Gibson
11213.13 In reply to 11213.12 
Hi Brian,

re:
> In my two brief attempts, the Moi Silhouette command attempt in the plane of the curve, did not work.

The Silhouette command only works on surfaces or solids, not on curves.


> I wondered if it uses some different algorithm than the Moi Project command.

Silhouette is pretty different than Project, Silhouette steps along a surface tracing out a curve where surface normals are changing from pointing towards the eye point to pointing away from the eye point.

So for example a surface like this:



Silhouette will generate this:




> Would a more conventional use of the Moi Silhouette command ever produce squashed curves?

No I don't think it would generate squashed curves.


> The Moi Silhouette command seems to be an orthographic projection ?

You tell it which viewport you want to use and it uses whatever projection that view is using. Which will be orthographic if it's the Top/Front/Right view or if it's the 3D view it depends on if Options > View > 3D view projection = "Perspective" or "Parallel".

- 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
11213.14 In reply to 11213.4 
hi Peer, so I guess that a ray fire / intersect method isn't going to be quite right for open curves.

Because like this:



So maybe what you need is to project each candidate point, the tangent points and the end points, onto a line that is orthogonal to the projection direction and take the minimum and maximum distances along that line:



- 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:  pressure (PEER)
11213.15 In reply to 11213.14 
Hi Michael,

Thank you for continuing to think about this. Not sure I get the part about minimum distances, but finding the pair of points with the maximum distance in the projection makes sense.

- Peer
  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
11213.16 
Just a quick note, very limited testing:

If the closed curve is extruded, the Moi Silhouette command in Right view yields the two extreme points, (on short lines), plus others, for parallel case.

In 3D view, several different point, (on short lines) are available. (I guess due to camera or some other point) For point case? Need to Identify "camera" focus point? And move it to projection point?
ViewRaysThroughPoints2 script finds a "focal" point.
I do not know how to change camera eye point. There is a camera script.

(Maybe a waste of time:-) Maybe Moi Silhouette command contains useful code that could be modified?

- Brian

EDITED: 22 Sep 2023 by BEMFARMER

  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:  MO (MO_TE)
11213.17 
Hi Peer
I hope I understand you right.
I've made this node to find highest and lowest points on a curve (according to the z axis), using its bounding box.
It works on curves drawn in front viewport,
But I guess you can modify its algorithm to use inside a script.


  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
11213.18 In reply to 11213.15 
Hi Peer,

re:
> Not sure I get the part about minimum distances

Just that usually when a point is projected onto a line you'll produce the signed distance for the position on the line. If you get that then you want the minimum and maximum of those.

- 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)
11213.19 
Maybe related to your subject...
A little trick for finding the Apex of something!
(the outermost point of something)

Draw a small vertical line around the supposed point!

Then draw a Point coming from the middle of this vertical using the "Help Lines": Perp / Perp

---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  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:  Barry-H
11213.20 In reply to 11213.17 
Hi Mo,
don't have the PTS2pts node can you post it please.
Cheers
Barry
  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:  MO (MO_TE)
11213.21 In reply to 11213.20 
Hi Barry
It converts point objects to point array.

Edit: Looks like the "PTS2pts" node is deprecated.
Use this node instead: "objects/ObjtoArray"

EDITED: 24 Sep 2023 by MO_TE

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:  Barry-H
11213.22 In reply to 11213.21 
Hi Mo,
getting error message using "objects/ObjtoArray" and "PTS2pts" ?
Not sure if the attached nod gives the answer.
Draw curve in top view.
By rotating the curve this will give the directional view asked for.
Cheers
Barry

Updated nod file to show silhouette and end points plus option to select a point view direction.
Note the point view focus is on origin but could be on curve bounding box centre if required.

EDITED: 25 Sep 2023 by BARRY-H

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:  BurrMan
11213.23 In reply to 11213.14 
Hi Michael,
It seems like BoundingBix should work for this.

I was wonderimg about it’s calc being too loose and creating peer’s “inaccuracies”

Could there be a tick for “high accuracy” that could be enabled for particular sets when needed? So like bumping the tolerances for BoundingBox calc from .001 to .0001

So not bogging down the normal ops, but when needed, one is willing to have it be slower.
  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
11213.24 In reply to 11213.23 
Hi Burr, in scripting there is actually already a loose bounding box vs accurate one.

But using bounding box for this involves another calculation for intersecting as well.

If I put in a method that gathers up all tangent spots on the curve I think it should give better accuracy.

- 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
11213.25 In reply to 11213.24 
Roger...
  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:  MO (MO_TE)
11213.26 In reply to 11213.22 
Hi Barry
Both nodes are working the same way.
So, I thought it's better to not add "PTS2pts" node to the library.

I think "Peer" wants a line that represents the curve's silhouette.
  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:  Barry-H
11213.27 In reply to 11213.26 
Hi Mo,
this is error message I'm getting any ideas ?
Also have updated my nod file in previous post to include silhouette , end points plus option to use a point as view direction.
Cheers
Barry


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:  MO (MO_TE)
11213.28 In reply to 11213.27 
Your node is working fine here.
The error says an input is empty. ( pointarray input )

check if you are getting this error with "James" NE folder.
https://moi3d.com/forum/lmessages.php?webtag=MOI&msg=9358.1
  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:  pressure (PEER)
11213.29 In reply to 11213.17 
Hi MO,

Thanks for taking a crack at it!

I don't use the node system, so I'm not able to test your .nod and when I open it in a text editor I can't make heads or tails of it. Looks like it's all references to javascript contained in some other files.

In any case, like I said in my first message I tried out a bounding box approach using the BoundingBox command and had problems with accuracy. My assumption is that BoundingBox uses a high accuracy (rather than quick) bounding box method under the hood.

Just now I checked my assumption by coding up my own bounding box command using objectlist.getHighAccuracyBoundingBox() and see the same kind of accuracy problems as from the native BoundingBox command.

Specifically, I found that for a smooth curve if I intersect the bounding box with the curve I don't just get 1 point at each intersection, but 2 slightly separated points. I don't think this is limited by the accuracy of intersection since doing the same kind of thing with tangent lines drawn using tangent snaps gives a single point object from Construct > Curve > Isect.

In your node were you able to somehow overcome the accuracy issue?

I guess I could get closer by interpolating the pairs of intersection points, but since the bounding box method does nothing to solve the point projection (as opposed to parallel) case, and since Michael has kindly offered to add a method to cover both cases, I'll probably wait for that.

- Peer
  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:  Barry-H
11213.30 In reply to 11213.28 
Hi Mo,
think I've found my issue its the BoundingBox-infos .
Yours shows an object output but the one within my nodeditor does not have this.
Hope this makes sense.
Cheers
Barry
  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:  MO (MO_TE)
11213.31 In reply to 11213.30 
Hi Barry
So sorry for the trouble.
Yes. It must be an old modification that I did on "BoundingBox-infos" node and forgot to register.
This is the fixed .nod file. Check if this one works.

  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:  MO (MO_TE)
11213.32 In reply to 11213.29 
Hi Peer
Yes, Michael's solution should be easier and faster. :)

I'm not sure if I understood the accuracy problem.
I think those "very close" points you mentioned are in a same height.
Curve below has 4 intersection points on highest location. all with the same "z" value. (values from nodeeditors's info panel)



Another test with moi's dimension tool:
I've made the blue line like this:
curve >> project >> use CPlane as target >> create a straight line on projected line
red line : nodeeditor


  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-12  13-32  33-34