ror when it comes to points on edges of the surface.I guess it is because normal vectors at a few of points are invalid. After all, because of these invalid points, an error message comes out which is saying " Runtime error (PythonException) : Unable to add polyline to document " and it results in no output. Please give me some help if you know how to handle this problem. I post a code below.Thanks in advance.
---------------------------------------------------------------------------------------------
import Rhinoimport rhinoscriptsyntax as rsimport mathimport ghpythonlib.components as gh
output_crvs = []
for pt1 in input_pt :output_pts = []newPt = pt1output_pts.append(newPt)
while len(output_pts) <= 100: newPt = outputpoint(base_srf, newPt, distance_factor) output_pts.append(newPt)
output_crv = rs.AddPolyline(output_pts)output_crvs.append(output_crv)A = output_crvs
def outputpoint(base_srf, input_pt, distance_factor):centre_point = rs.AddPoint(0,0,0)height_point = rs.AddPoint(0,0,10)
zaxis = rs.VectorAdd(centre_point, height_point)
cp_pt = rs.SurfaceClosestPoint(base_srf, input_pt)normal_vector = rs.SurfaceNormal(base_srf, cp_pt)drain_vector = rs.VectorCrossProduct(normal_vector, zaxis)
dvector2 = rs.VectorUnitize(drain_vector)dvector3 = rs.VectorRotate(dvector2, 90, normal_vector)
mpt = gh.DeconstructVector(distance_factor*dvector3)moved_pt = rs.PointAdd(input_pt, mpt)moved_uv = rs.SurfaceClosestPoint(base_srf, moved_pt)output_pt = rs.EvaluateSurface(base_srf, moved_uv[0], moved_uv[1])
return output_pt…
g from a list of 12 items I would find all the combinations taking just 4 at time.
I'd use a Stream gate that takes the indexes of the items and pass them to a list item in order to select just the items of the combination. Doing so I can choose a single combination of index at time to pass to the list item.
In this moment all the data come out from the first gate, all the others are empty.
If I pass these index to the list item it gives me an error (probably because of the data structure).
*long version*
I start from a list of 12 segments, all of them with the starting point in common and the ending point distributed regularly in the space. It's a quite simple starting point.
What I'm trying to achieve is to find all the possible spatial configurations made of 2, 3, 4 segments. I started with 2 segments so I've 12^2=144 possible configurations but just 4 different configurations that can intuitivelly be recognized (60°, 90°, 120°, 180°).
Doing the same with 3 segments generates 12^3=1728 configurations and I don't know how many different ones. With 4 segments I've got 12^4=20736 possible configurations.
As you can imagine many configurations are identical but just with a different orientation so at the end I'll have to parse geometrically the output to delete duplicates (I'll address this later on).
Please could you help me to figure out how to mix these segments in different configurations?
Thank you in advance.…
per bake commands to bake the connected geometry with the corresponding materials.
mxDiff is a simple diffuse material. Only reflectance color for 0° and 90° are exposed.
mxEmit is a basic emitter material. You can set light color, power and efficiacy of the emitter.
mxBasic is the most complex material for now. You can set all the properties of a single layer material including. Use this for transparent materials.
mList is your way if you don't want to create your own materials. This component returns a list of all the materials on the Maxwell scene manager. Make sure this is evaluated after you add your own materials if you want to see them in the list.…
y case. Here's the thing. There is this subject at my university where we are assigned a famous building and we need to recreate it in Rhino. We're given bonus points if we manage to code some interesting part of it in Grasshopper. So far so good, I'm doing pretty well with Rhino and by far I am happy with the results I've achieved with modelling the given building. Harbin Opera House by MAD is the building I'm trying to model. There is one particular surface:I've built this surface in Rhino and now I'm trying to map pyramids on it. Not only have the pyramids to be different in height, but their height has to be dependent on the curvature of the surface. I'm getting some results but it seems to be exactly the opposite of what I need. I want to have higher/spikier pyramids where my curvature analysis shows red/blue and lower/slopier pyramids where the analysis shows green colour.At the moment I'm not really sure how the code I have works, but it seems that the height of the pyramids is dependent on a distance from a point in space to the projection of the cap-point of a pyramid.Here're my Rhino and Grasshopper files:surface1.3dm
surface1.ghI'd be grateful if someone of you guys could handle my problem. I've got one more issue with this surface, but once I get a solution to the first 1 will let know what the second one is.Thanks in advance and keep well!…
d the fact that one pipe goes out and one goes in, that the surface normal direction is opposite for the two surfaces? Based on an earlier thread, you should know why by now. The two curves have opposite directions (again!); see the white arrows using Rhino 'Analyze | Direction'?
As before, you can fix that by flipping one curve to match the other. HOWEVER, you connected your curves directly to the 'Divide' components instead of using 'Crv' geometry params - bad form. And as before, you "fixed it" by reversing the list of starting points ('S' input to 'BiArc'). Better like this - 'Crv' params are internalized, no need for Rhino file:
Well, well! That didn't fix the opposite surface normals after all! Trust me, though, using geometry params and being conscious about matching curve directions is "best practice". But I haven't lofted 'BiArc' curves for awhile, it's late and I want to move on. OH! I just noticed that you reversed the 'Z' direction for one half of the 'BiArc' - that explains it:
Moving on... You've basically got it, though I would do it differently - same result, like this:
I haven't really explained surface normal vectors - can you figure it out from here? One more little wrinkle (Normal_2017Mar17b.gh):
…
Added by Joseph Oster at 12:03am on March 18, 2017
up structural systems in the parametric environment of Grasshopper. Participants will be guided through the basics of analysing and interpreting structural models, to optimisation processes and how to integrate Karamba3d into C# scripts.
This workshop is aimed towards beginner to intermediate users of Karamba however advanced users are also encouraged to apply. It is open to both professional and academic users.
Course Fee:
Professional EUR 750 (+VAT)
Educational EUR 375 (+VAT)
Course Outline
Introduction & Presentation of project examples
Optimization of cross sections of line based and surface based elements
Geometric Optimization
Topological Optimization
Structural Performance Informed Form Finding
Understanding analysis algorithms embedded in Karamba and visualising results
Complex Workflow processes in Rhino3d, Grasshopper3d and Karamba3d
Places are limited to a maximum of 10 participants with limited educational places. A minimum of 4 places are required for the workshop to take place.
The workshop will be cancelled should this quota not be filled by May 31st.
The workshop will be taught in English. Basic Rhino and Grasshopper knowledge is recommended. No knowledge of Karamba is needed.
Participants should bring their own laptops with either Rhino5/Rhino6 and Grasshopper3d installed. A 90 day trial version of Rhino can be downloaded from Rhino3d.
Karamba ½ year licenses for non-commercial use will be provided to all participants.
…
up structural systems in the parametric environment of Grasshopper. Participants will be guided through the basics of analysing and interpreting structural models, to optimisation processes and how to integrate Karamba3d into C# scripts.
This workshop is aimed towards beginner to intermediate users of Karamba however advanced users are also encouraged to apply. It is open to both professional and academic users.
Course Fee:
Professional EUR 750 (+VAT)
Student EUR 375 (+VAT)
Course Outline
Introduction & Presentation of project examples
Optimization of cross sections of line based and surface based elements
Geometric Optimization
Topological Optimization
Structural Performance Informed Form Finding
Understanding analysis algorithms embedded in Karamba and visualising results
Complex Workflow processes in Rhino3d, Grasshopper3d and Karamba3d
Places are limited to a maximum of 10 participants with limited educational places. A minimum of 4 places are required for the workshop to take place.
The workshop will be cancelled should this quota not be filled by October 15th.
The workshop will be taught in English. Basic Rhino and Grasshopper knowledge is recommended. No knowledge of Karamba is needed.
Participants should bring their own laptops with either Rhino5/Rhino6 and Grasshopper3d installed. A 90 day trial version of Rhino can be downloaded from Rhino3d.
Karamba ½ year licenses for non-commercial use will be provided to all participants.
…
ive 'correct' normal.
Non-normalized cross products is effectively weighting face normals by area, and is fast and simple, so we put that one as the default.
In some cases normalizing the cross-products improves the result, but not always.
Another option is to weight by angles, though this is computationally slightly more expensive, so might not be ideal for real-time updates on large meshes.
As an example, here is a mesh with a 90° corner, and uneven meshing on the 2 sides.
The arrows show:
0- Area weighted (non-normalized cross products)
1- Angle weighted
2- Normalized cross-products
Here the angle-weighted normal is the one at 45°, which is intuitively the 'best' one in this case.
These 3 seem to be the most commonly used, but there are many other possible definitions of normals - such as inverse-area weighted, mean curvature, etc...
I think really what would be best would be to put a few of these into Plankton, and include an optional argument in GetNormal for selecting which one you need for a particular application.
Pull requests welcome if you feel inspired to add this!
http://meshlabstuff.blogspot.co.uk/2009/04/on-computation-of-vertex-normals.html
http://steve.hollasch.net/cgindex/geometry/surfnorm.html…
us allows Grasshopper authors to stream geometry to the web in real time. It works like a chatroom for parametric geometry, and allows for on-the-fly 3D model mashups in the web browser. Multiple [Grasshopper] authors can stream geometry into a shared 3D environment on the web – a Platypus Session – and multiple viewers can join that session on 3dplatyp.us to interact with the 3D model. Platypus can be used to present parametric 3D models to a remote audience, to quickly collaborate with other Grasshopper users, or both!
You can down load the Grasshopper plugin at food4rhino, and visit 3dplatyp.us to view your geometry on the web. This first round of Alpha testing will run for two weeks, until April 24 2014, after which the Grasshopper components will not solve.
We are very interested in hearing feedback from the community while the project is still in the prototyping stages of development. Please use the comments on this discussion to ask questions, suggest ideas, report bugs, etc. We are planning on rolling out another public alpha release or two this Spring, depending on how this first one goes, in advance of our Technology Symposium and Hackathon in New York.
Check out our getting started video below, and enjoy!
…