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.
…
o 5 beta version today and kangaroo to a new beta version. Somewhere in there the VB script stopped working, with the following error:
error: Operation unavailable (Exception from HRESULT: 0x800401E3 (MK_E_UNAVAILABLE)) (line:0)
Any ideas?
VB Script is as follows:
Dim xlApp As Object Dim CellValues As New List(Of Object) Dim CellColorsInt As New List(Of Integer) Dim CellColorsOnColor As New List(Of OnColor) Dim i As Int32 Dim RowRange As Int32 RowRange = (ERow - SRow) 'Grab a running instance of Excel xlApp = System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application") 'Some error checking...in case Excel isn't running If IsNothing(xlApp) Then Exit Sub 'In order to access the data into Excel you have to navigate through 'its object heirarchy. Getting the Application is just the first step. 'After that you need to achieve a workbook (typically the active one, or you 'could open one if you knew which one you needed...watch out with that though). 'Once you have the workbook, you will need to retrieve a sheet so that you can begin 'to read or write data to it. 'getting the workbook is best done through getting ActiveWorkbook method Dim wb As Object = xlApp.ActiveWorkbook If IsNothing(wb) Then Exit Sub 'Getting the sheet is best done through the ActiveSheet method Dim sheet As Object = wb.ActiveSheet If IsNothing(sheet) Then Exit Sub For i = 0 To RowRange CellValues.Add(sheet.Cells(SRow + i, Column).Value) 'CellColors.Add(xlApp.Worksheets(1).Cells(SRow + i, Column).Interior.Color) 'Print("colR = {0}", colR(i * ColumnRange + j)) 'If you want to get the colors, that's fine, but they will get kicked 'back as an integer, which isn't very useful within GH. 'This is how you were getting them before...the integer list CellColorsInt.Add(sheet.Cells(SRow + i, Column).Interior.color) 'This is how to translate those to an OnColor... 'get the integer version of the color first. Dim intCellColor As Integer intCellColor = sheet.Cells(SRow + i, Column).Interior.color CellColorsInt.Add(intCellColor) 'Use the Color translator to get a system.drawing color, which 'can be used within the OnColor constructor Dim OnColorCellColor As New OnColor(System.Drawing.ColorTranslator.FromWin32(intCellColor)) CellColorsOnColor.Add(OnColorCellColor) Next val = CellValues col = CellColorsOnColor colInt = CellColorsInt End Sub…
ppend(r"C:\Program Files\Rhinoceros 5 (64-bit)\System")clr.AddReferenceToFile("RhinoCommon.dll")
(I'm using IntelliJ for IDE)
It works fine, until I call the Rhino.Geometry.Brep.CreateFromLoft method, than its throw a bunch of errors:
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.at UnsafeNativeMethods.RHC_RhinoSdkLoft(IntPtr pCurves, Point3d start_point, Point3d end_point, Int32 loft_type, Int32 simplify_method, Int32 rebuild_point_count, Double refit_tolerance, Boolean bClosed, IntPtr pBreps)at Rhino.Geometry.Brep.LoftHelper(IEnumerable1 curves, Point3d start, Point3d end, LoftType loftType, Int32 simplifyMethod, Int32 rebuildCount, Double refitTol, Boolean closed) at Rhino.Geometry.Brep.CreateFromLoft(IEnumerable1 curves, Point3d start, Point3d end, LoftType loftType, Boolean closed)at Microsoft.Scripting.Interpreter.FuncCallInstruction6.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run8[T0,T1,T2,T3,T4,T5,T6,T7,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) at System.Dynamic.UpdateDelegates.UpdateAndExecute7[T0,T1,T2,T3,T4,T5,T6,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) at Microsoft.Scripting.Interpreter.FuncCallInstruction10.Run(InterpretedFrame frame)at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)at Microsoft.Scripting.Interpreter.LightLambda.Run8T0,T1,T2,T3,T4,T5,T6,T7,TRetat IronPython.Compiler.Ast.CallExpression.Invoke5Instruction.Run(InterpretedFrame frame)at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)at Microsoft.Scripting.Interpreter.LightLambda.Run8T0,T1,T2,T3,T4,T5,T6,T7,TRetat IronPython.Compiler.PythonCallTargets.OriginalCallTarget7(PythonFunction function, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6)at IronPython.Runtime.FunctionCaller1.Default6Call1(CallSite site, CodeContext context, Object func, T0 arg0) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.FuncCallInstruction6.Run(InterpretedFrame frame)at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)at Microsoft.Scripting.Interpreter.LightLambda.Run4T0,T1,T2,T3,TRetat IronPython.Compiler.Ast.CallExpression.Invoke1Instruction.Run(InterpretedFrame frame)
and so on.....
other Rhino methods working fine.
Have you got an idea what should be the problem?…
Added by Viktor Lajos at 7:23am on November 12, 2014
try now to integrate Geco in an interdisciplinary architectural engineering studio: hoping we can show you some nice applications of your tool, I'll keep you update and sending now details by e-mail. Here the file (very welcome to be shared). It most probably contais trivial errors by me, thanks for helping and giving some tip! Gr. Michela
FILE:
Ok, right, I see the outputs update correctly. Origin of problems must be in some different mistake I do:
- Incident radiation: I am not sure I understand what is going on: why I get so many 'not a number' ? (The Galapagos report is full of NaNs).
Bio-Diversity: 0.887 Genome[0], Fitness=NaN, Genes [89% · 44%] { Record: Too many fitness values supplied } ...
Genome[7], Fitness=NaN, Genes [74%] { Record: No fitness value was supplied } ....
Genome[9], Fitness=NaN, Genes [37% · 11%] { Record: Genome was mutated to avoid collision Record: Too many fitness values supplied }
- Daylight calculations: the geometry accumulates withouth deleting the previous models. As a consequance, results almost do not change after few varations (so, outputs get updated but do not vary). In current daylight definition: the first object being imported is the one where the grid has to fit; its setting makes it cancelling all the other objects during import. All the others, do not delete anything when imported. When running loops (manual or GA) that vary parameters, the entire geometry do not get cancelled - so I guess the loop does not pass back by the cancelling step, but imports only the geometry which has been varied by the parameters using the setting of that import component only? I will then try again by changing the order of the operations, but if you have specfic tips, let me know.
THANKS!
…
ting.
Thanks
Rania
** Warning ** IP: Note -- Some missing fields have been filled with defaults. See the audit output file for details.
** Warning ** Version: in IDF="'8.2.7'" not the same as expected="8.2"
** Warning ** ManageSizing: For a zone sizing run, there must be at least 1 Sizing:Zone input object. SimulationControl Zone Sizing option ignored.
** Warning ** ManageSizing: For a plant sizing run, there must be at least 1 Sizing:Plant object input. SimulationControl Plant Sizing option ignored.
************* Testing Individual Branch Integrity
************* All Branches passed integrity testing
************* Testing Individual Supply Air Path Integrity
************* All Supply Air Paths passed integrity testing
************* Testing Individual Return Air Path Integrity
************* All Return Air Paths passed integrity testing
************* No node connection errors were found.
************* Beginning Simulation
************* Simulation Error Summary *************
** Warning ** The following Report Variables were requested but not generated
** ~~~ ** because IDF did not contain these elements or misspelled variable name -- check .rdd file
************* Key=*, VarName=ZONE IDEAL LOADS SUPPLY AIR TOTAL COOLING ENERGY, Frequency=Hourly
************* Key=*, VarName=ZONE IDEAL LOADS SUPPLY AIR TOTAL HEATING ENERGY, Frequency=Hourly
************* Key=*, VarName=ZONE PACKAGED TERMINAL HEAT PUMP TOTAL COOLING ENERGY, Frequency=Hourly
************* Key=*, VarName=ZONE PACKAGED TERMINAL HEAT PUMP TOTAL HEATING ENERGY, Frequency=Hourly
************* Key=*, VarName=CHILLER ELECTRIC ENERGY, Frequency=Hourly
************* Key=*, VarName=BOILER HEATING ENERGY, Frequency=Hourly
************* Key=*, VarName=FAN ELECTRIC ENERGY, Frequency=Hourly
************* Key=*, VarName=ZONE IDEAL LOADS SUPPLY AIR LATENT HEATING ENERGY, Frequency=Hourly
************* Key=*, VarName=ZONE IDEAL LOADS SUPPLY AIR LATENT COOLING ENERGY, Frequency=Hourly
************* Key=*, VarName=ZONE IDEAL LOADS SUPPLY AIR SENSIBLE HEATING ENERGY, Frequency=Hourly
************* Key=*, VarName=ZONE IDEAL LOADS SUPPLY AIR SENSIBLE COOLING ENERGY, Frequency=Hourly
************* Key=*, VarName=SYSTEM NODE MASS FLOW RATE, Frequency=Hourly
************* Key=*, VarName=SYSTEM NODE TEMPERATURE, Frequency=Hourly
************* Key=*, VarName=SYSTEM NODE RELATIVE HUMIDITY, Frequency=Hourly
************* There are 3 unused schedules in input.
************* There are 5 unused week schedules in input.
************* There are 13 unused day schedules in input.
************* Use Output:Diagnostics,DisplayUnusedSchedules; to see them.
*************
************* ===== Recurring Surface Error Summary =====
************* The following surface error messages occurred.
*************
************* Base Surface does not surround subsurface errors occuring...
************* Check that the GlobalGeometryRules object is expressing the proper starting corner and direction [CounterClockwise/Clockwise]
*************
** Warning ** Base surface does not surround subsurface (CHKSBS), Overlap Status=No-Overlap
** ~~~ ** The base surround errors occurred 1 times.
** ~~~ ** Surface "839A5ADACCE44BC0AF00_GLZP_31" misses SubSurface "839A5ADACCE44BC0AF00_GLZP_31_GLZ_31"
** Warning ** Base surface does not surround subsurface (CHKSBS), Overlap Status=Partial-Overlap
** ~~~ ** The base surround errors occurred 1 times.
** ~~~ ** Surface "839A5ADACCE44BC0AF00_GLZP_34" overlaps SubSurface "839A5ADACCE44BC0AF00_GLZP_34_GLZ_34"
*************
** ~~~ ** The base surround errors occurred 2 times (total).
*************
************* EnergyPlus Warmup Error Summary. During Warmup: 0 Warning; 0 Severe Errors.
************* EnergyPlus Sizing Error Summary. During Sizing: 2 Warning; 0 Severe Errors.
************* EnergyPlus Completed Successfully-- 7 Warning; 0 Severe Errors; Elapsed Time=00hr 07min 35.94sec…
ly fabricated interventions and interactive electronic performance art installations in Barra Funda. Along with other experts, these tutors will teach how to use and apply new design technologies, notably Rhino and Grasshopper (and numerous plug-ins including GECO, Galapagos, Kangaroo and RhinoCam); Arduino and Processing; and the use of laser-cutters, rapid- prototype machines and CNC routers and mills.
Alan Dempsey of NEX, was in 2010, selected by the Centre for European Architecture/Chicago Athenaeum as one of the 40 most significant architects in the EU under 40. In 2008 he was selected by the British Council as one of the six most significant Design Entrepreneurs. He previously worked with Future Systems, OCEAN and Homa Farjadi. Alan was an AA Unit Tutor and is Director of the AA Independent’s Group (www.independentsgroup.net), which facilitates research into the use of computational design and fabrication. Alan has lectured, exhibited and been published worldwide. His work has received a number of awards, including a LEAF award for Spencer Dock Bridge, and a D&AD pencil for the [C]space DRL 10 Pavilion.
Robert Stuart Smith of Kokkugiais a Studio Course Master at the AA DRL. Robert previously worked for Lab Architecture Studio and Nicholas Grimshaw & Partners. He focuses on self-organisational systems and developmental growth, pursuing polyvalent and environmentally responsive affect. He leads consultation to Cecil Balmond on non-linear algorithmic design research. Kokkugia has projects in the USA, UK and Mexico, and is exhibited and published internationally.
Iván Ivanoff is an artist, programmer, and researcher. He searches for new forms of communication for the society of the future and is the director of different Media Labs worldwide. He founded the artistic collaborative i2off.org+r3nder.net, which develops multi-media and interactive projects, and Estado Lateral Media Lab to investigate and develop new technologies.
The Barra Funda district of São Paulo was once characterised by a mix of small industrial, commercial and residential programmes, but, as economic policies have favoured larger production industries, numerous companies have abandoned the area. In response, the workshop proposes the creation of new types of smaller industries to produce a mix of both consumption and production, manifested through micro-manufacturing interventions that can co-exist alongside retail and housing. Computational design and digital fabrication could be used to help create these new micro-industries, which in turn will help empower local craftsman to produce and sell directly to consumers through micro-manufacturing, located in small urban workshops.
The workshop will tap into emergent gallery scene of Barra Funda and local initiatives that use computational technology to introduce a new cultural and economic impetus. The workshop is a part of the International Festival of Electronic Language (FILE), an exhibition of interactive electronic technology, and will import these electronic technologies out of the galler, collaborating with local manufacturers, artists, and activists, with a goal of disseminating a high-tech yet low-cost and small-scale fabrication systems to promote this new micro-industrial movement. The workshop is open to architecture and design students and professionals worldwide.…
of a hack to push it to an android device, and you can't use labels, which is a very bad point!
...
I won't buy an Iphone!
The other is Control OSC. It looks rougher, but it has a lot of advantages to me.
+ Game of Life included!
+ you can use and update labels :))
+ Has a nice muti touch widget unfeatured in touch osc
+ You can script the interface using java script manipulation in gh, stream it to your dropbox and update in one "tap", as follows
Does anyone have experience with scripting interfaces for this software? I'm stuck already. I know nothing of java script to begin with. As you can see I managed to format the labels but the osc message I could not find a way, it stays untouched.
Just in case someone knows better, here are my "objects" (I said that right?). The userXXX are replaced in GH.
{ "name":"userName", "type":"Slider", "x":(xPadding + .11), "y": yPadding, "width":.82, "height":.082, "color":"userColor", "min":userMin, "max":userMax, "ontouchmove" : "var roundedvalue = this.value.toFixed(userFix); LbluserName2.changeValue(roundedvalue)", "onvaluechange": "oscManager.sendOSC('/userName', 'f', this.value.toFixed(userFix))",},{ "name":"LbluserName1", "type":"Label", "x":xPadding, "y": yPadding, "width":.1, "height":.05, "color":"userColor", "value": "userName"},{ "name":"LbluserName2", "type":"Label", "x":xPadding, "y": (yPadding + 0.05), "width":.1, "height":.05, "address":"/userName", "color":"userColor", "value": 0},…
5 Marzo 2017.
Plug it², primo step del percorso formativo in tre fasi “AAD Workshop Series“, è il corso più seguito in Italia sulla modellazione parametrica, giunto al sesto anno consecutivo di attivazione. Plug it² fornirà ai partecipanti un’effettiva padronanza delle più avanzate tecniche di modellazione digitale, approfondendo le metodologie della modellazione algoritmica e parametrica nel campo dell’architettura e del design del prodotto. Il corso è rivolto a studenti e professionisti dei settori della progettazione architettonica, design, moda e gioielleria, con esperienza minima nel disegno CAD bidimensionale (acquisita su qualsiasi piattaforma software) e si articolerà in lezioni teoriche frontali ed esercitazioni guidate.
INFO ED ISCRIZIONI
…