like to use a single VRay material as a template for creating multiple identical materials with different colors within the GH environment (instead of creating manually in the document).
I have gotten as far as creating the materials. Now I need to add them to the document material table so that they can be used with Giulio's rendering component (which looks for either Rhino.Display.DisplayMaterial or a String that references a document object). I'm not going to learn C# to modify his script, so I am catering to its demands.
Private Sub RunScript(ByVal M As Object, ByVal C As Color, ByRef Mat As Object)
Dim mTemp As Rhino.DocObjects.Material mTemp = CType(M, Rhino.DocObjects.Material) If mTemp.Name.Length > 0 Then mTemp.DiffuseColor = C Dim nTemp As String = mTemp.Name & "_" & C.R & "_" & C.G & "_" & C.B mTemp.Name = nTemp End If
Rhino.DocObjects.Tables.MaterialTable.Add(mTemp) Mat = mTemp
End Sub
The code throws the error: Reference to a non-shared member requires an object reference. (line 96)
Do I understand that the material has to be assigned to a particular object in order to enter the Material Table? Can I assign it to a Layer instead? Any ideas? A better way to do this?
Thanks,
Marc
…
cannot be cast to [B]CustomClassXY. Type A originates from 'CustomLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'LoadNeither' in a byte array. Type B originates from 'CustomLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'LoadFrom' at location 'C:\Users\T\AppData\Roaming\Grasshopper\Libraries\CustomLib.gha'. (line: 96)This is how I do the casting:List<CustomLib.SomeClass.CustomClassXY> AllINPUTs = new List<CustomLib.SomeClass.CustomClassXY>();
for (int i = 0 ; i < INPUT.Count; i++)// { AllINPUTs.Add((CustomLib.SomeClass.CustomClassXY) INPUT[i]); }
The GHA is compiled with two namespaces, one for the component one for the library.
Thanks a lot in advance,
Tim…
/stackoverflow.com/questions/7735036/naudio-frequency-band-in...
http://stackoverflow.com/questions/17222492/how-to-change-frequency...;
I am no expert in this field; I would have to do research just like you. Maybe someone else on this forum has already done more work in this area, let's see. Or it might be you, the first one :)
This does not look like something completely at reach for someone with not much programming experience, but maybe with some guidance it could be doable.
--
>>Do you know other libraries that I can use with it?Sorry I would have to search for other libraries just like you.
EDIT: This link has a simple sine wave written from scratch. It might be a good start to mix with the code above and a playground to understand theory.
Giulio--Giulio Piacentinofor Robert McNeel & Associatesgiulio@mcneel.com…
ntage...
This is a standard mesh to nurbs conversion result: http://www.tsplines.com/j/subdtonurbs/MeshToNurbsBoatShell.png
You want to start with a proper mesh reparametrization:
http://www3.cs.stonybrook.edu/~gu/software/RiemannMapper/figures/ti...
Once you have your mesh reparametrized it's relatively easy to divide it into surfaces. That is the easiest approach but it doesn't take into account any features(creases etc)...
This illustrates a nice mesh parametrization with features.
https://www.graphics.rwth-aachen.de/media/paper_images/qgp_340.png
EDIT:
Got a brief look at the Geomagic thingy... seems like it's a subd modeler (like tsplines). Creating nurbs out of subd meshes is easy cause you can basically trace back the subdivision. With Giulios help I was able to make a rough version of that process here: http://www.grasshopper3d.com/forum/topics/skeletal-mesh?commentId=2985220%3AComment%3A558193 ;
(the point is that subd meshes to nurbs are not as much challenging as mesh to nurbs).…
can be found in "C:\Documents and Settings\<user name>\Application Data\McNeel\Rhinoceros\5.0\Plug-ins\IronPython\settings\lib\rhinoscript" folder on WinXP. So could have used yours too.
RhinoCommon is a SDK and basically the power behind grasshopper and rhinoscriptsyntax functions. In fact each time you call a rhinoscriptsyntax, a RhinoCommon code gets executed.
And, yes:
import Rhino - imports RhinoCommon
import utility - enables importing utility.coercebrep() (or coerce3dpoint() coercecurve() ... so on)
Item access means an input is consisted of a single item.List access means an input is a list.Tree access means an input is consisted of a tree with data on different branches.rs.BooleanDifference requires both of it's arguments to be lists, so it would be logical to set the inputs b1 and b2 as lists. But there is one problem, that Mitch pointed out to me: it seems that python components (like grasshopper components) are "intelligent", and can distinguish whether you are inputting item, list, or tree. Setting your input as list, might disable this ability and leave you with only possible type of input (list).So honestly I do not know why in this case, setting the inputs to Lists worked - due to mentioned "intelligence" of python component, even an Item type would work.This might be a question for an experienced user, I am just a beginner.…
(1) I have been exporting small sections of a larger model into Maya from Rhino as FBX. In Maya I rotate and scale the models (-90 in X, Scale XYZ 0.001). The Named Views are being saved, but do not have a successful import into the Maya model. They do not appear as in Rhino, and the problem is not solved by scaling or rotating the cameras.
(2) If I try going the other direction, the cameras exported from Maya as FBX are also not aligning with the model in Rhino as they are in Maya.. I will do my best to post some images of the problem and hope you can help.
error !!
This is what the named views look like
here I am trying to the other way with a good view from Maya
strange placement..
This is the best result I can achieve, after I scale the camera by 1000
Any Advice???
Thanks, Robert.
…
ysim.ning.com/
When you run the simualtion you will notice on the batch terminal that Daysim is also being called, so you may want to consider how Daysim uses Radiance files & data.
Regarding your current problem, I think you stumbled onto something weird and interesting.
Interior and exterior readings appear to differ by 40 in the best case scenarios. Even setting the transmittance to 1 yields similar results. I tried changing from cummulative sky to climate sky and got similar values. Changing the test points did nothing either.
I think, (yet I'm too lazy to prove this) that the difference in values stems from diffuse radiation over the sky dome.
If you delete everything except the glass you'll notice that interior values are like 80-90% of the exterior values (this seems like the expected behaviour with a transmittance of 1). So, if we consider that a vertical window, part of an opaque box, is receiving radiation from 25% of a sphere, as you start to inset the interior test points the radiation they receive will be a fraction of the 25%.
Let me try to explain this better...The exterior surface receives radiation from a section of a sphere calculated by 180degrees on the xy plane (let’s call this angle theta) and by 90degrees (let’s call this angle phi) in azimuthal elevation. If you integrate this over spherical coordinates (theta from 0 to pi; phi from 0 to pi/2) you will find that it comes to a quarter of a sphere. By comparison, the interior surface will not integrate theta from 0 to 180degrees,nor phi from 0 to 90degrees, instead it will be the subtended angle from the exterior surface as a function of their separation; the farther in you go the smaller the view of the outside.
If my hypothesis is correct there shouldn't be that much difference since the separation is only 10cms...the subtended angle would be like 170 instead of 180 for theta and 85 instead of 90 for phi...overall if you integrate both spherical areas there should only by a difference of 10%.
In conclusion, I believe the unexpected behaviour stems from the previous subtended angle thing. If direct radiation was the only factor the difference would be the aforementioned 10%, which suggests that an additional source of energy is also affected by this. Perhaps indirect and diffuse radiation from other areas of the sky dome.
I’m definitely intrigued on why this is happening. Please post if you figure it out.
Regards,
Mauricio
…
he time to work with it.
the project is about facade strips which turns along height. the top angle is
parallel to the facade and the bottom is max. 90 degrees twisted, but the strips
should turn diffrently to achieve more dinamic look.
first i have tried to achieve this by calculating distance between the rotation angle from points of the grid and a single point.
then i have tried to ad some more effecting points and used the distance to the divided surface (the circles are just to control the area of effection):
i manually lofted it.
the result is a bit annoying becouse the points that effect the angle are always visible:
i have triend to solve this by drawing a line and divided it to recieve points along the bottom of the geometry. the result is not working properly:
Anyway,
there must be a better/smoother way to achieve this. i would like to effect the twist of the surfaces by distance to a spline, but im just lost. can you help me please?
the problems im encountering:
0- distance spline to grid to effect the angle
1- list of x/y coordinates and angle of rotation for each point of the grid
2- export points to excel
3- lofting lines in one direction only (x1, x2, x3...)
4- reduce the list data to 2 decimal (0,00)
5- maybe angle from radian to degrees
thx…
e some questions.
I want to loop with a foreach loop trough a list of points do i have to make a list before or is it possible to use them coming in from a noed i set the access to list?
Also i dont understand why no plane is created. How do i need to feed the points in?
And why is c# expecting open parens in line 88 and 86?
Hope its not to much at once, probably i should try a few less steps to get the problems solved one by one, just hoped it would be easier and sometimes just a parentesis is missing or some format stuff, so maybe it is not so much i really cant say.
If anybody has the time and feels he wants to help it would be nice on the other hand i understand cause of the amount of chaotic questions.
Regards!…