Scan-and-Solve for Rhino

Simulate Early, Simulate Often... In Rhino

Hi,

are the results for the two attached files consistent  (in the zip-files )? The two bodies are not very different, but the displacement is very different.  Is this possible ?

Best regards

isk

Views: 287

Attachments:

Reply to This

Replies to This Discussion

Hello isk,

The restraints you've applied are different between the two models.

P1 has a restraint condition applied over the entire external surface -the same surface to which the force is applied:

P2 has a restraint condition applied to the end face to form a cantilever:

 Does this help describe what you are seeing?

~Michael

Thank  you  ! I was not aware of the changed restraint condition. 

The situation is the following: The task is to generate a cantilever beam with

minimal volume, a given displacement limit and an even stress distribution.

 The cantilever is  a revolution surface of curve. The curve is described a set

of points, which  are transformed to a curve by Rhino.AddCurve(Point, 3). 

To calculate the displacement and the stress, the constraint is placed 

on the face at height z=0. The face is determined by using the 

SScript.GetNearestFace(GUID, Array(x_base,y_base,0))  function.

In both cases (p1,p2) the same procedure was applied.  

Making  the selection of the constraint using the GUI it work

fine.  Also using Rhino.AddCurve(Point, 1) does not cause problems.

I included a script demonstrating the problem. The red objects  have the

problem described above. The green one no. If you change line 118

to 

curve(1) = Rhino.AddCurve(Point, 1)

the error will not occur.

Since Rhino was crashing at the _ClearUndo statement, I am now 

using Rhino V5 64bit.

Any idea how to proceed in order to get the constraint on the bottom face ?

PS: In http://www.intact-solutions.com/snsscript_documents/utilities.htm

the function GetNearestFace appears twice. Perhaps is the second appearance

GetNearestEdge ?

Thank you and regards

isk

Attachments:

Hello isk,

It appears you may have an error in your script in the following location:

P = Array(base_point(1), base_point(2), 0)
FSu = SnSP.GetNearestFace(GUID, P)

In this code you are creating the point P using the 1st and 2nd entries in the base_point array.  I suspect you want something like this:

P = Array(base_point(0), base_point(1), 0)
FSu = SnSP.GetNearestFace(GUID, P)

After I made this change to the script, I got 3 green cantilevers, and no red ones.  I don't know if that is the correct behavior as I did not dig into the CreateCantilever subroutine.

As a debugging measure, try using Rhino.AddSphere to plot the locations of the query points being passed to GetNearestFace.  Doing that, the mismatch between the query points and the created geometry becomes obvious.

You are correct about the documentation.  There is a typographical error and the second appearance should be GetNearestEdge.  Thank you for pointing this out.  I'll see that it is fixed in the next release.

~Michael

Thank you !  It works now. 

RSS

FOLLOW SCAN&SOLVE

© 2023   Created by Michael Freytag.   Powered by

Badges  |  Report an Issue  |  Terms of Service