how it look like:
Thanks again!
import rhinoscriptsyntax as rs
#flag 1 = intersecting, or one inside another#flag 0 = not intersecting, or just touching each other
def checkintersection(obj,brep,tol): test = rs.IsObjectInBox(obj, rs.BoundingBox(brep), test_mode=True) insec=rs.IntersectBreps(obj,brep,tol) if test == True and not insec: flag = 1 elif insec: insec=rs.IntersectBreps(obj,brep,tol) #if one object is inside the other flag1 = minDistanceTwoBreps(obj1, obj2, tol) flag2 = minDistanceTwoBreps(obj2, obj1, tol) rs.DeleteObjects(insec) if flag1 == 0 and flag2== 0 : flag = 0 else: flag = 1 return flag
def minDistanceTwoBreps(obj1, obj2, tol): if (tol is None) or tol < 0.0: tol = rs.UnitAbsoluteTolerance() pt1 = rs.SurfaceVolumeCentroid(obj1)[0] pt2 = rs.BrepClosestPoint(obj2, pt1)[0] dist = 100 precision = 3 # the larger the number - the more precise the distance i = 0 while (dist > tol) and (i < precision): pt1 = rs.BrepClosestPoint(obj1, pt2)[0] pt2 = rs.BrepClosestPoint(obj2, pt1)[0] dist = rs.Distance(pt1,pt2) i += 1 if dist <= tol: flag = 0 else: flag = 1 return flag
obj1 = rs.GetObject("select object 1")obj2 = rs.GetObject("select object 2")tol = rs.UnitAbsoluteTolerance()
flag = checkintersection(obj1, obj2, tol)
print flag…
Dogs) i.e. the Holly Grail in Engineering/Design ... although rather easy is 100% impossible without code (especially when you need to manage "solution variations" (alternatives) and recall them any time) ... but I have a strong feeling that you wouldn't be able to handle this: expert only territory. Make a test: get a flat 2d grid of points (a Tree with a single dimension) and attempt to modify Z in points that you choose on a per point basis.
"Impossible" eh?
3. Without Mesh Machine areas like this:
would buy you a ticket to hell (one way).
All in all: doing this properly (The interactive part whilst checking valid typologies PLUS this, this and that) IS NOT a task for a novice by any means. I would strongly suggest ... er ... hmm ... the Soap Opera approach (but this also requires code if a non rectangular grid is used as a "mesh template").…
ls (I'm sure I'm not the first!).
I'm trying to work through Example 2 on the following page;
http://wiki.mcneel.com/labs/panelingtoolsandgrasshopper
Most things perfectly, i.e. the intersecting planes through the curve, the slider bar to control the number of points on each circle on the intersecting planes, but the problem I'm having with this is the VB module - the only way I can bake the points into Rhinoceros is using the Bake tool on the Grasshopper tool bar after I've selected the Divide Curve module. Even then, I can't use the points for paneling tools - as I understand it, this is because each point does not have the right name which paneling tools accepts (i.e. G(0)(0), G(0)(1), G(0)(2) for a planar point grid or G0(0)(1), G0(0)(2) etc as described on http://wiki.mcneel.com/_media/labs/panelingtoolsmanual.pdf page 5 for a point grid on a surface). I tried renaming a few points to match the suggested point names (manually), and this was accepted in Paneling tools, but I'm looking for a way to automate the process (I don't think re-naming over 100 points manually is a suitable solution!).
Ultimately, I'd like to be able to create points on a surface within Grasshopper, then baking them into Rhino so I can use Paneling tools.
I'm really hoping that someone could point me in the right direction; am I missing something with how to operate the VB module, or would it be best to make a workflow that could rename the point grid array...would this involve lists, trees etc?
Any help would be much appreciated.
Abs
…
ntrol points in Rhino.
Also, I forgot to mention in part 1 that when doing the directional subdivision, depending on how you drew your input mesh, there is a chance that it gets divided in the wrong direction, and you end up with something like this:
Which is not what we want.
The simple way to fix this is with the MeshTurn component, which rotates the direction of each face by one side:
Now we can use physical relaxation to smooth our mesh. In this example I show a simple tensile relaxation, so it will be negatively curved, but the same principles can be applied to all sorts of surfaces by using different combinations of forces.
The definition for the relaxation is attached below.
There are 3 main groups of forces used:
Planarization
For the mesh to be able to unroll properly into flat strips, we want each of the thin rectangles to be flat.
Springs
I already showed how the WarpWeft splitting can be used to assign different strengths to control the shape of a mesh here. Now because of the uneven subdivision we have very different numbers of edges in each direction, so the strengths have to account for this. Depending on the level of subdivision used and the shape you want to achieve, you may need to set the Weft stiffness to be 10 to 100 times that of the Warp.
Edge Smoothing
Because our subdivided mesh has square ends, we might not want to simply anchor the boundary, so I've shown how we can force them to become more circular, while still staying in place. Each boundary curve gets pulled onto its best fit plane, while also applying bending to round it out, and springs to keep it from shrinking.
(This part could also be achieved in other ways, such as pulling the boundary vertices to a curve)
When we run this relaxation, the shape should smooth out to something like this:
Play with the tensions and boundaries until you are happy with the result, wait for it to stop moving, then stop the timer. (Remember it is very important to always stop the timer once the relaxation has finished, before continuing working with the output, as otherwise Grasshopper becomes very slow, because Kangaroo is constantly resolving, even if no movement is visible).
If you want to try other shapes than tensile surfaces, you could also use forces such as bending, laplacian smoothing, or pulling to some target surface to control the form.
Next - Part 3 splitting and unrolling
…
ingle surface. But as seen on left surfaces in attached zip screenshot "A" and proj. "6b-RnGH_Simpdatainter-TTTWriteXL_J gh.3dm", i spent more time attempting correction of the patched polysurf many errors, artifacts and lack of original surface topology, all regardless of uv count or "flexibility". Fortunately, as seen on upper right surf of screenshot A & proj., a Quad polygon Mesh patches to an accurate surface and texture (even with backside "spike" artifacts) so long as patch Spans and Flexibility are sufficient. Also, Grasshoppers patch reproduces surf's far more accurate than Rhinos (possibly due to Rhinos patch, 100 unit uv count limitation? or my ill use).Would like to send the polysurface for you as well Dave(Hello &feel free to chime in), but even zipped the .3dm is 25 mb over GH3D site 5mg limit, so i had to remove it.- is there another way, perhaps Pm, email etc. i could send this to you both?,A)WRITEXL:As seen in screenshot "2.jpg", my WriteXL output is not in the same "Set1-5" format as yours, so perhaps won't be read properly by your Simpledatainterpolation def.1) how to fill each XL cell with single x,y,z coordinate or corresponding row name and column group numbers?, ..same as your XL format. Once answered i can finally blend my surfaces in your Awesome! def.,....i've used: Right-click panel > Stream Contents to.txt format, then on Excel sheet, click empty cell Data tab > Get External Data > From Text. This imports x coordinates into a column, then y and z coord's one at a time. But please show any method to import all coord's simultaneously if possible?, and possibly how to use .xyz export format?,2) how to trim off excess Patch surface?, ..Patch > Trim is set to True but surface remains untrimmed,.B)INTERPOLATION:Screenshot 1 previews baked, Mesh deconstructed points,screenshot 3&4 shows results of Interpolation when mesh points are Set in Point component AND Set as one file path in ReadXL using "6b-RnGH_Simpdatainter-TTTWriteXL_J gh.xlsx", which contains the same "Streamed" X,Y,Z mesh points.It interpolates INcorrectly: moving vertically with the top left corner as high point, and does not change shape as your interpolated points\surface does.3) how to correct my mesh points interpolation to same as yours?,.4) how to alter your def. so it interpolates between 2 excel .xlsx containing surface xyz points?,Really impressed and appreciate your example instruction and powerful def's,hope to talk soon and learn more.Big fan, Jeff…
Karamba.
I am using your plug-in for normal forces evaluation in the transvere wires and spreaders of a sailboat. Mast is solved in another way, so I am not taking forces from Karamba in that case.
Basing on the forces value an adequate wire size (diameter) is choosen. Then masses of wires are being calculated. Loads (forces) on longitudinal wires are calculated without Karamba. The problem is when choosing transverse wires’ mass minimization as a criteria, the Octopus doesn’t get any results - is changing the sliders (genes) too fast for Karamba to calculate the forces (so Octopus gets only nulls):
When minimization of a e.g. longitudinal wires’ mass (calculated without Karamba) is taken as a criteria Octopus works fine.
Which suggests that the problem is in interaction of two plug-ins.
Any ideas how to avoid that problem?
Thanks,
M.
Below some screenshots of definition part with Karamba:
1675×807 200 K
image.png1680×789 398 KB
Despite the ‘orange warning’ the values are correct (double checked with other software).However I don't know why does it say that there is a part that can move freely without deformation,as the model looks like this:
image.png1239×343 55.5 KB
…
merely automates finding clear intersections between pairs of objects and then splits the objects along those intersection *curves*, deletes the trims, then joins the remains, and cycles on. But within the confusing Rhino Settings tolerance value, wherever surfaces actually just sort of come closely together, there *is* *no* clear intersection curve. So it bugs out and stops working EVERY time you try more than a dozen or two spheres.
Some software can do this by switching to volumetric pixels (voxels). $9K-$30K Geomagic Freeform is an example of this. It also fails sometimes, often due to memory issues, as you can imagine since it needs to fill all inner space of each sphere definition with 3D pixels.
Materialize Magics for $16K can often handle such Booleans well. It will take a seeming lifetime to figure out such often pirate software kludges though.
One thing you can try though is to simply drape a mesh or NURBS plane onto the top of your spheres.
There's a well known *reason* your Booleans are failing. Nobody here has yet even hinted at it:
The main reason is that Rhino/Grasshopper developers don't care about the human element. The math exists to make this work very fast, every time. It just has to join things *right*, incorporating human knowledge of kissing surfaces, instead of acting stupidly, like some pocket calculator. But that would involve hacks that make 99% of complex Booleans work instead of 10%, and we can't have that since it will be SLOWER for the other 1% that just happen to have no nearly kissing or really kissing surfaces.
You could also use the new Cocoon plugin to do a surface *around* your structures, with a given radius of extension beyond the spheres, then offset that surface back the same radius. That is 100% robust, but won't offer quite as sharp of intersections, more rounded, like most everybody wants anyway.
You can *test* Boolean failures, by running a Grasshopper intersection command, to see the intersection curves, and zoom in to see how badly many of them are, all knotted, or twisted, or even with gaps, often with gaps.
It's a math problem nobody at McNeel wants to solve, sorry.
Just write a check for $25K and spend six months taking notes, like I did, and you can merge your simple spheres finally.…
Added by Nik Willmore at 6:33pm on October 20, 2015
or of the rectangle
Here is a sketch.
I found also into rhinoscript help some script however I don't see how to manage to create such a component for a use into grasshopper.
Could you possibly help me ?
Thank you.
Marc
GetRectangle
Pauses for user input of a rectangle.
Syntax
Rhino.GetRectangle ([intMode [, arrPoint [, strPrompt1 [, strPrompt2 [, strPrompt3]]]]])
Parameters
intMode
Optional. Number. The rectangle selection mode. If not specified, all modes (0) are available. The rectangle selection modes are as follows:
Value
Description
0
All modes.
1
Corner. A rectangle is created by picking two corner points.
2
3-Point. A rectangle is created by picking three points
3
Vertical. A vertical rectangle is created by picking three points.
4
Center. A rectangle is created by picking a center point and a corner point.
arrPoint
Optional. Array. A 3-D base point.
strPrompt1
Optional. String. The first prompt or message.
strPrompt2
Optional. String. The second prompt or message.
strPrompt3
Optional. String. The third prompt or message. The third prompt used only with 3Point and Vertical modes.
Returns
Array
An array of four 3-D points that define the corners of the rectangle if successful. Points are returned in counter-clockwise order. See the image below for details.
Null
If not successful, or on error.
Example
Dim arrRect
arrRect = Rhino.GetRectangle
If IsArray(arrRect) Then
Rhino.AddTextDot "0", arrRect(0)
Rhino.AddTextDot "1", arrRect(1)
Rhino.AddTextDot "2", arrRect(2)
Rhino.AddTextDot "3", arrRect(3)…
he concept, moving on to decision making and continuing with digital and generative design tools TO GET THE BEST SOLUTION for each problem.
WHY? The world is complex and ever-changing and we need to be able to handle the volume of information we receive and, of course, to find and choose the best solution. Therefore, we direct our ATTENTION TO THE CAUSE, and not only on the effects/solutions.
We will learn from NATURE, the only “company” that has not gone bankrupt in over 4000M years, and it’s GENERATIVE SOLUTIONS.
> OBJECTIVES <
The participants will work in multidisciplinary groups (ex. architect + designer + business manager + constructor + communication specialist etc.) applying knowledge management tools, different approaches and nature-based optimization methods.
Listed objectives:
1. Improving the generative way of TURNING AN IDEA INTO A PROJECT through problem-solving thinking
2. Discovering nature’s ways of shaping evolutionary solutions
3. Getting out from our comfort zone and working together with other professionals in groups in order to achieve better solutions: Multidisciplinary Design Optimization
4. Learning to use technology to manage information in the decision making process
& surviving the whole week
> ATTENDANCE & COSTS <
> Early bird – until 17th March 2013
Lecture – 15 euro (includes presentations, food& drinks)
Workshop – 100 euro (includes lecture, food& drinks)
> Late bird – until 6th April 2013
Lecture – 25 euro (includes presentations, food& drinks)
Workshop – 120 euro (includes lecture, food& drinks)
…
y be impossible to assemble otherwise :) Volume of each part for just a 1m dome is about 90x90x20mm. You'd probably lose your job if you tried printing them in the office, but thanks for the thought!
Mr Stasiuk... firstly, a huge thank you for your help... I'd been trying this for months and months but your help was the light at the end of the tunnel! The reason my meshes wouldn't boolean was thay they were not closed or manifold. I didn't have the PullVertices component you used to get the cylindrical holes to fit to a size so I tried not joining the cylinders, smoothing the rest and keeping naked edges fixed so I could join them together after smoothing. I think this left me with a non-manifold mesh with holes in. Also, under closer inspection, my panel meshes had holes in them! Eventually I created the same PullVertices effect by working out the distance and direction of the mesh vertices inside the cylinders, from the cylinders and moved the vertices... I really didn't understand how the data structure moved only the points I wanted, where I wanted them but it worked and thank you again for giving me the logic to re-create. Once all my meshes were in order then Rhino handled the booleans (my laptop would not handle trying to do all these ops inside GH so I finish them manually in Rhino - Adding the pane slots, adding the M6 bolt and nut cavities and splitting the component using the panel plane intersections).
Mateusz, they have different pricing structures... a handling fee, cost per cm3, lower price per additional print, price for total bounding box volume, etc etc... its like comparing mobile phone tarifs! Some really want to help you find the best way though, so I'll find a way!
I'll add some rendered dome assembly photos tonight and hopefully one day some photos of a real build!
Thanks again to everyone that offered help and advice!…
Added by martyn hogg at 5:05pm on January 23, 2014