orking in Grasshoper v0.9.00xx (I tried, 9.0010 and 9.0014)
If I try this code
------------------------------------------------------------------------------
System.Globalization.CultureInfo oldCI = new System.Globalization.CultureInfo("en-US");
Object objExcel;
objExcel = System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application");
objExcel.Cells(2, 1).Value = "titleA";
------------------------------------------------------------------------------
I see, the message
" Error: 'object' does not contain a definition for 'Worksheets' (line 95) "
Line 95 is the last one < objExcel.Cells(2, 1).Value = "titleA"; >
I've also tried,
Microsoft.Office.Interop.Excel.Application xlApp;xlApp = (Microsoft.Office.Interop.Excel.Application) System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application");
But GH C# says
Error: The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) (line 89)
What did I wrong??
…
e between (A,B). PS: in C# that could be: double angleCA = Vector3d.VectorAngle(C.Direction, A.Direction);
BTW: in fact we deal only with points where Pnode = the point for a given node and Pconnected is a collection of others that are connected with that Pnode in the mesh structure (thus we need connectivity info: always provided via indices of the related points).
2. Get the smallest of two angles, say: minAngle. Divide by 2.0 (NOT 2: we are after double values).
3. the "net" adapter length A1 has as follows: (AstrutRadius + tolerance)/A1 = Math.Tan(minAngle) > ... > get A1.
3. and finally (add some tolerance) A1final = A1+strutTolerance.
Of course I could provide to you the portion of the C# code that does this ... but it's unfortunately in C#.
But on the other hand: why bother with that? Just provide a test mesh (or graph) PLUS the tool that you use to extract connectivity data (kinda like SandBox). Or I could use my C# captured that tells you everything about anything for manifold (and not) meshes.
…
more complex geometries, nothing works anymore and the output is weird: every test point has the same value (97% DA) and it's impossible to visualize these values even if a text tag 3D is assigned to points (check Result.jpg)
The output that we get is a uniform mesh.
To check this output we also run an illuminance analysis using the same test surface, giving 300lux as high and low bound and some areas didn't reach the target value - which means that there must be some areas below that threshold.
Another thing: as you can see from Screenshot.jpg at one point we get the string saying *.dgp not found. Is that a problem?
Attached you can find the Grasshopper file.
Thank you all!
Simone
…
untime error:
Runtime error (PythonException): unable to add point to document Traceback: line 97, in AddPoint, "C:\Users\AKIDRIBM\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\geometry.py" line 136, in Point, "" line 47, in toGH, "" line 187, in RunScript, ""
Could anyone help me figure out what's causing it? The code for adding the point is below:
# Plots points/text dots def Point(self, pointSource): print pointSource, type(pointSource) pt = rs.AddPoint(float(pointSource.value.x.value), float(pointSource.value.y.value), float(pointSource.value.z.value)) return pt
pointSource is a custom object that stores information about the point. Its only relevance here is to obtain the point coordinates. I do not get this error all the time, so I'm having trouble figuring out what is exactly causing it.…