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.
…
tivas.
Desde lo básico a sistemas complejos + documentación para fabricación.
Orientado a Diseñadores, Arquitectos, Artistas Multimedios y profesionales afines.
Objetivos específicos:
• Distinguir los conceptos principales del diseño paramétrico y su aplicación en entornos de modelación CAD. • Manejar la modelación paramétrica de sistemas geométricos simples y complejos en Grasshopper 3D. • Aplicar el conocimiento paramétrico en la creación de documentación para construcción y fabricación de un modelo desarrollado en Grasshopper 3D. Contenidos: Sesión 1. Introducción a la modelación paramétrica. Sesión 2. Elementos geométricos y sus propiedades. Sesión 3. Estructura de la información. Sesión 4. Condiciones de campos, grillas y atractores. Sesión 5. Panelización de elementos en superficie complejas. Sesión 6. Parametrización orientada a objetos. Sesión 7. Documentación paramétrica 1. Sesión 8. Documentación paramétrica 2. Sesión 9. Modelación avanzada y optimizaciones. Sesión 10. Profundización personal.
Fechas : Del 14 de Marzo al 13 de Abril de 2016
Modalidad : Presencial
Duración : 30 horas (10 sesiones)
Horario : Lunes y miércoles de 18:30 a 21:30 hrs.
Facultad : Escuela de Arquitectura
Pontificia Universidad Católica de Chile
…
genetic algorithm requires a lot of iterative calculations, but the computing power needed for analyzing structural models is very huge, and it also takes much time. And modifying the structual model according to genetic algorithm was not so easy for real-scale complex structures.So, we've developed StrAuto, a parametric structural modeler and optimizer based on Rhino/Grasshopper. StrAuto can execute iterative structural analysis and optimization automatically, and the most powerful feature of it is that it can execute the analysis task (the most time consuming part of optimization) in multi-processed way on distributed systems in network.Now, in the movie you can see the galapagos G.A. optimizer in the left monitor (the main system) is running and many instances(15) of structural solver Sap2000 are running along with it. The middle monitor shows 5 worker systems that are running 3 instances of Sap2000 for each under the control of the main system.The number of sap instances can be extended as much as your SAP license permits.(one license can launch 3 instances of SAP)With StrAuto, structural G.A. optimization can be performed 10 ~ 30 times faster so that even very complex real scale structures can be optimized.If you are interested in StrAuto, you can see more athttp://tree8.chang-soft.co.kr/Sangsu Lee, changsoft I&I…
hs (sequenced points) in initially one of two lattice structures. Output only the paths that meet the path requirements.
Path requirement (GH Inputs):
1. Number of path points: 1..N (N could and up being up to 100? (Massive calculations, realistic numbers in the up to 30 range)
2. Symmetry requirement: 0 (none), 2,3,4,5,6 fold (path sections repeat)
3. Closed path boolean: default true (output only paths where first point is last point)
4. Lattice selection: cubic body centered, cubic face centered
5. Straight path section boolean: default false. Blocking the path from going straight or allowing it to go straight. Going backwards should always be blocked.
Outputs:
1. List of unique points in sequence for path in the lattice. grouped by individual path
On implementation:
1. generate all paths and eliminate paths with duplicate points (self intersecting lines)
2. eliminate paths that don't meet closed boolean (first point not equal to last point)
3. eliminate paths that don't meet symmetry variable
for symmetry paths (symmetry not equal to 0) only number of points divided by symmetry has to be calculated. each section can be repeated the number of times of the symmetry.
For closed paths, a distance from the staring point could be maintained that could stop the generating of paths that can't make it home.
Any thoughts would be greatly appreciated!…
Added by Anton Bakker at 10:38pm on December 29, 2013
5% of all my geometry
Ideally, the percentage distribution should be parametric as well.
My gut feeling told me that I should utilize the gene pool component and mass addition but it is not working for me.
Please see attachment for my gh file.
Many thanks. …
Added by Lucas Ler at 11:44am on November 27, 2015
n. The material - lightweight fabric, weights only just about 30 kg. The only rigid structural elements, the steel rings, 3 and 4 meters in diameter form the boundaries of the shape, which is stretched between them, creating an extraordinary visual experience for the visitors.
The shape is basically a replica of original Green Void by l-a-v-a
http://www.l-a-v-a.net/projects/green-void/
The software used in design workflow: Rhino, Grasshopper, Kangaroo, 3ds Max, Lamina design.
Fair enough to say, this design would not exist without these great software giants, but special credits go to Lamina design)
http://laminadesign.com/
Author's blog: http://designcompute.tumblr.com/…
Added by Artyom Maxim at 6:20pm on January 18, 2013
n. The material - lightweight fabric, weights only just about 30 kg. The only rigid structural elements, the steel rings, 3 and 4 meters in diameter form the boundaries of the shape, which is stretched between them, creating an extraordinary visual experience for the visitors.
The shape is basically a replica of original Green Void by l-a-v-a
http://www.l-a-v-a.net/projects/green-void/
The software used in design workflow: Rhino, Grasshopper, Kangaroo, 3ds Max, Lamina design.
Fair enough to say, this design would not exist without these great software giants, but special credits go to Lamina design)
http://laminadesign.com/
Author's blog: http://designcompute.tumblr.com/…
Added by Artyom Maxim at 6:10pm on January 18, 2013
n. The material - lightweight fabric, weights only just about 30 kg. The only rigid structural elements, the steel rings, 3 and 4 meters in diameter form the boundaries of the shape, which is stretched between them, creating an extraordinary visual experience for the visitors.
The shape is basically a replica of original Green Void by l-a-v-a
http://www.l-a-v-a.net/projects/green-void/
The software used in design workflow: Rhino, Grasshopper, Kangaroo, 3ds Max, Lamina design.
Fair enough to say, this design would not exist without these great software giants, but special credits go to Lamina design)
http://laminadesign.com/
Author's blog: http://designcompute.tumblr.com/…
Added by Artyom Maxim at 6:09pm on January 18, 2013
n. The material - lightweight fabric, weights only just about 30 kg. The only rigid structural elements, the steel rings, 3 and 4 meters in diameter form the boundaries of the shape, which is stretched between them, creating an extraordinary visual experience for the visitors.
The shape is basically a replica of original Green Void by l-a-v-a
http://www.l-a-v-a.net/projects/green-void/
The software used in design workflow: Rhino, Grasshopper, Kangaroo, 3ds Max, Lamina design.
Fair enough to say, this design would not exist without these great software giants, but special credits go to Lamina design)
http://laminadesign.com/
Author's blog: http://designcompute.tumblr.com/…
Added by Artyom Maxim at 6:10pm on January 18, 2013
n. The material - lightweight fabric, weights only just about 30 kg. The only rigid structural elements, the steel rings, 3 and 4 meters in diameter form the boundaries of the shape, which is stretched between them, creating an extraordinary visual experience for the visitors.
The shape is basically a replica of original Green Void by l-a-v-a
http://www.l-a-v-a.net/projects/green-void/
The software used in design workflow: Rhino, Grasshopper, Kangaroo, 3ds Max, Lamina design.
Fair enough to say, this design would not exist without these great software giants, but special credits go to Lamina design)
http://laminadesign.com/
Author's blog: http://designcompute.tumblr.com/…
Added by Artyom Maxim at 6:09pm on January 18, 2013