re say:
Error 54 El tipo 'GH_Component' is not defined. C:\Users\ususario\Documents\pruebaPlugin\prueba 10-9\Class1.vb
Error 55 property 'ComponentGuid' You can not declare 'Overrides' because not invalidate property at the base class. C:\Users\ususario\Documents\pruebaPlugin\prueba 10-9\Class1.vb
Error 56 The type 'Grasshopper.Kernel.GH_Component.GH_InputParamManager' is not defined. C:\Users\ususario\Documents\pruebaPlugin\prueba 10-9\Class1.vb
Error 57 The type 'Grasshopper.Kernel.GH_Component.GH_OutputParamManager' is not defined. C:\Users\ususario\Documents\pruebaPlugin\prueba 10-9\Class1.vb
Error 58 The type 'Grasshopper.Kernel.IGH_DataAccess' is not defined. C:\Users\ususario\Documents\pruebaPlugin\prueba 10-9\Class1.vb
…
vas
Closing and creating a new file (memory resets when this is done) @4:00, 5:57, 6:53
System slow down and crashes @ 8:16 (takes 5 minutes to end the process - perhaps not the most entertaining movie to watch until the end - a good point to turn the kettle on)…
RCH 01)
between 10 AM - 2 PM
Sun vectors where temperature is higher than 6 ° Ca>6 °C
4 hours od direct acces to sunshine in winter. It is a minimum useful for good passivesolar design. 57 Sun vectors
SUMMER ( jun 01 - sept 01)10 AM - 4 PM Sun vectors where temperature is higher than 19 ° Ca>19 °C
6 hours od direct acces to sunshine in summer.
447 Sun vectors
These vector are for gaining some energy trough PVs or something like that.
If you want to shade, ignore Summer!!!
…
lass BrepDeform Inherits GH_Component Public Reslist As New List(Of String) Public Sub New() MyBase.New("BrepDeform", "Deform", _ "移动物件的控制点" & vbCrLf & "(Move the control Point to change a object)", "SEG", "Modify")
End Sub Public Overrides ReadOnly Property ComponentGuid As System.Guid Get Return New Guid("8226e0ea-ed6b-47c2-8a24-244f044152d8") End Get End Property Protected Overrides ReadOnly Property Internal_Icon_24x24() As System.Drawing.Bitmap Get Return My.Resources.SEG_BrepDeform End Get End Property Protected Overrides Sub RegisterInputParams(ByVal pManager As GH_Component.GH_InputParamManager) ' pManager.AddTextParameter("Guid", "Id", "将要被替换的犀牛物件" & vbCrLf & "(RhinoObjects that will be replaced)", GH_ParamAccess.item) 'Dim guidParam As New Param_Guid pManager.AddParameter(New Param_Guid, "Guid", "Id", "将要被替换的犀牛物件" & vbCrLf & "(RhinoObjects that will be replaced)", GH_ParamAccess.item) pManager.AddPointParameter("ControlPoint3d", "C", "控制点的位置" & vbCrLf & "(Control Point's location)", GH_ParamAccess.item) pManager.AddPointParameter("NewPoint3d", "P", "新控制点的位置" & vbCrLf & "(New Control Point's location)", GH_ParamAccess.item) pManager.AddNumberParameter("Tolerace", "T", "输入点与物件实际控制点对比的精度" & vbCrLf & "(Tolerace for the Control Point match)", GH_ParamAccess.item, 0.1)
pManager.AddBooleanParameter("BlMove", "M", "如果是True则进行移动" & vbCrLf & "(If true Perform the Move)", GH_ParamAccess.item, False)
End Sub Protected Overrides Sub RegisterOutputParams(ByVal pManager As Kernel.GH_Component.GH_OutputParamManager) pManager.AddTextParameter("Result", "RG", "结果列表" & vbCrLf & "(Result)", GH_ParamAccess.list) End Sub Public Overrides ReadOnly Property Exposure As GH_Exposure Get Return GH_Exposure.primary End Get End Property
Protected Overrides Sub SolveInstance(ByVal DA As Kernel.IGH_DataAccess) If Banner.astrict.showmessage Then Return Dim Ids As Guid = Guid.Empty 'Dim Ids As String = String.Empty Dim tpt As Point3d = Point3d.Unset, opt As Point3d = Point3d.Unset Dim tolar As Double = 0.1 Dim blMove As Boolean = False If Not DA.GetData(0, Ids) Then Return If Not DA.GetData(1, opt) Then Return If Not DA.GetData(2, tpt) Then Return If Not DA.GetData(3, tolar) Then Return If Not DA.GetData(4, blMove) Then Return If Not blMove Then GoTo line1 Reslist.Add(Now & "_未替换!(Replace failed!)") Else Reslist.Clear() ' Grasshopper.Instances.ActiveCanvas.ModifiersEnabled = False End If
' rt.AddRange(docobjlist.Select(Function(geoobj As RhinoObject) GH_Convert.ObjRefToGeometry(New ObjRef(geoobj.Id)))) 'Private Checked(5) As Boolean, Namestr() As String = {"Point", "Curve", "Brep", "Mesh", "TextDot", "TextEntity"}
Try
Dim rh As RhinoDoc = Rhino.RhinoDoc.ActiveDoc Dim rhobj As RhinoObject = rh.Objects.Find(Ids) ' Dim rhobj As RhinoObject = rh.Objects.Find(New Guid(Ids))
Dim bobj As BrepObject = CType(rhobj, BrepObject) RhinoApp.RunScript("Cancel", False) RhinoApp.RunScript("Cancel", False) bobj.Select(True)
RhinoApp.RunScript("_SolidPtOn", False) Dim gobjs As GripObject() = bobj.GetGrips ' rh.Views.RedrawEnabled = False For Each grpobj As GripObject In gobjs
If grpobj.CurrentLocation.DistanceTo(opt) < tolar Then grpobj.Select(True) Dim CurrentPln As Plane = RhinoDoc.ActiveDoc.Views.ActiveView.ActiveViewport.ConstructionPlane Dim tropt As New Point3d(opt), trtpt As New Point3d(tpt) tropt.Transform(Transform.PlaneToPlane(Plane.WorldXY, CurrentPln)) trtpt.Transform(Transform.PlaneToPlane(Plane.WorldXY, CurrentPln))
Dim movestr As String = "_move " + String.Format("{0},{1},{2} ", tropt.X, tropt.Y, tropt.Z) + String.Format("{0},{1},{2} _Cancel _Cancel", trtpt.X, trtpt.Y, trtpt.Z) RhinoApp.RunScript(movestr, True) grpobj.Select(False) End If
Next
'RhinoApp.RunScript("Cancel", False) 'RhinoApp.RunScript("Cancel", False) '' rh.Views.RedrawEnabled = True Reslist.Add(Now & "_替换成功!(Replace Success!)") Catch ex As Exception Reslist.Add(Now & "_替换失败!(Replace failed!)" & vbCrLf & ex.Message)
End Try ' Grasshopper.Instances.ActiveCanvas.ModifiersEnabled = True
line1: DA.SetDataList(0, Reslist) End Sub
'Private Sub Testt_PingDocument(sender As IGH_DocumentObject, e As GH_PingDocumentEventArgs) Handles Me.PingDocument ' Dim Mbool = Aggregate bcbool In Checked Into cb = Any(bcbool)
' If Not Mbool Then ' Checked(0) = True ' Message = Namestr(0) ' Order = 0 ' End If 'End Sub
End Class
The picture below shows the two question.
Question One I must use data dam, or the component can't batch deal the brep. I don't know why, I have You can give me a solution to make it working normal not using the data dam
Question Two I can not uset the Button component, If I use it, the gh canvas will die with some mouse event--. I have see this problem before in this forum,but there is no solution and explain. I want to know why and How to solve it.
I don't know if I have made my question clear,if not give a message. Thank you! Thank you all.
The gh test file and 3dm test file in the upload files.
…
) so you have to code it up in Arduino code first.
If you're interested in testing out the capacitive sensing Firefly firmata, you can download the arduino sketch here: http://dl.dropbox.com/u/22255624/Firefly_Firmata_CapSense.zip Basically, what I'm doing is using Digital Pin 2 as my send pin, and using Digital Pins 4 & 7 as my receive pins. Now, this will only allow you to read up to two capacitive sensors using this sketch. It's definitely possible to do more, but I wanted to try to keep with the pin configurations of the Uno Read component. For more pins, we would likely need to modify the code and use the Generic Serial Read component... but this should work for starting purposes.
In order to use this, you'll need to install the CapSense library on your computer. To do this, create a folder called "libraries" (if it isn't already there) in the Arduino folder found in My Documents. Then download the CapSense library from here: http://arduino.cc/playground/Main/CapacitiveSensor?from=Main.CapSense Unzip the download file and place its contents in a folder called CapacitiveSensor inside your libraries folder. Then, upload the sketch I linked up above. That's basically it. Then, just connect your circuit (similar to the diagram in the sparkfun video)... using a 1M ohm resistor coupled with your sensing electrode. Let me know if you need a diagram. The Uno Read component will always return a zero for pin number 2, but will return either a one or a zero for Digital Pins 4 & 7 depending on whether the amount of capacitance has surpassed the threshold in the sketch. Actually, that brings up an important point... The sketch works by checking whether or not the current sensor value is above or below a cutoff threshold value (of arbitrary units... check the CapSense library page for more info). To modify this cutoff setpoint, simply change the variable called Cap_Threshold which is defined on line 57. If you load up the sketch and launch the serial monitor, the message that is printed out will tell you what the current capacitance sensor value is for both Pins 4 & 7. Try touching your electrode and see how those values change, and then set your cutoff to be somewhere between the untouched (resting) value, and the touched value. Hopefully it's pretty self explanatory. Let me know if it works for your application.
Cheers,
Andy…
Added by Andy Payne at 11:54am on October 25, 2012