Jump to content
Developer Wiki and Function Reference Links ×

contour or shell gives uneven result


Recommended Posts

hello

I worked on your script to try to find a solution

The first part of the script misses the beginning point so I took the info from your object.

Than (I don’t know if this is what you want) instead of having a distance I gave a number of cuts; in my try I could not divide 5000/150= 33,33333 so nothing was centered. it was difficult to see what was wrong.

From this I cut your script after “contour” to see how it worked. In this case the nurbs are placed correctly. I checked the nurbs directions they are all alike.

The bizarre part comes later when you shell. I drew some lines to see how the shell went and you can see some are going left and some are going right, but they stick to the given distance.

I can’t find a reason so lets hope someone understands…

Link to comment

hello frog,

Yes, the problem seems to be the 'shell' mode. The problem is not dependable on the beginning point or the delta. But it is easier to see with a thickness of f.i. 100.

I get left/right: lrrrrlrrlllrlrllrllr, it seems random but reproducable. I don't know python, so I can't look into the shell node.

Ernst

Link to comment
  • Marionette Maven

Oooooh this is very irritating.

So, this is happening because the function used in the shell node takes the normal of the NURBS object that it's going to shell.. I'm not sure why, but it appears that when a NURBS curve is converted to a NURBS surface, it doesn't reliably have the normal in the same direction.

I'll see if I can figure out a way to at least get them all to shell in the same direction.

Link to comment
  • Marionette Maven

Okay. So as a workaround, it now shells in each direction by half of the distance.

This is an inadequate final fix, I'll probably throw in an OIP control to let you decide in which direction the shelling takes place, but at least for now, it makes this uniform.

(Figure if someone's shelling a bowl shape or something of the sort, you wouldn't want to shell in both directions, but maybe offering the choice would be a positive improvement?)

Edited by MarissaF
Link to comment
  • Marionette Maven

Oh how weird.

Something is going wrong with the AddSolid command. it actually doesn't add them...

If you take that line out and replace the self.Params.shell.value with "Shell1" and run it, you'll see that it was fixed there... but when you add the resulting solids together half gets deleted...

Sorry!

I'll keep poking.

Link to comment
  • Marionette Maven

So what I did here was divide the shell thickness by two, and then shelled each contour twice - once in each direction (positive half-thickness, and negative half-thickness) This in a sense will center where the shell is created on the contour.

I converted them to a solid because when they were shells, I wasn't able to add the two halves together to create just one object, that's probably just something funny with how the Add Solid command works with shell objects.

Does all of this make sense, or should I try to explain it differently?

Link to comment
  • 1 month later...

deconstruct - reconstruct

Now I'm trying something else using the contour node: get a 3D object, deconstruct using 'contour' and reconstruct using the contours in a 'loft surface' node. (Some loss of information is to be expected. Later on I hope to use this to distort an object.)

But something strange is happening which might shed some light on the 'shell' node going the wrong way. The first countour is off. This wrong result is not dependant on the 3D-object, nor on the input in the 'contour' node (delta/point/dir)...

See the attachment

Link to comment
  • 2 weeks later...
  • Marionette Maven

This is due to the following line in the Contour Node:

ubbthreads.php?ubb=download&Number=14989&filename=ContourScript.JPG

If you uncomment this line (remove the "#", have it look how it does in the image above) then the reconstruction should be correct.

It appears that we had that in the script at one point, but someone may have commented it out in a later revision. I'm not sure when or why that was done, but this should be the fix. It's on my list to fix in the default content! :)

Hope this helps!

Marissa

Edited by MarissaF
Link to comment

Thanks Marissa, this works fine.

Thanks Alan for thinking with me, but that is not what I was after. I wanted to distort a volume and fill the surface of a volume with brush strokes, so that I could walk through a Van Gogh. That's out of my league, so I thought I could try a pointilistic picture first.

DomC's solution only works for top surfaces and I can't program in Python to see if I could improve on that, so I had to find another solution.

While I was waiting for an answer to my question, I realised that I didn't need the volume itself and I used the contours to fill the surface, making a 'pointcloud from volume', see attachment.

Next thing is: how to distort the contours to make it look more like a handdrawn thing. I think I can manage that.

I think it would be better if I didn't use spheres, but symbols (pebbles). But what I can't find out is how to query the direction of a certain point of a contour or volume. I would appreciate some help with that.

Please be carefull. There are about 10.000 spheres drawn by the wrapper, which maximises my 8Gb and sometimes crashes. The 'main distance'-node can be put on 200 for a first try.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...