per components.
I have attached a 3dm file and a picture so you guys can see what I am talking about.
I have previously translated boxes into breps, which i did with this code:
Dim bbx As New box(pl, New interval(-.5, .5), New interval(-.5, .5), New interval(-.5, .5)) Dim ms As New Mesh() ms.Vertices.AddVertices(bbx.GetCorners) ms.Faces.AddFace(0, 1, 2, 3) ms.Faces.AddFace(0, 1, 5, 4) ms.Faces.AddFace(1, 2, 6, 5) ms.Faces.AddFace(2, 3, 7, 6) ms.Faces.AddFace(3, 0, 4, 7) ms.faces.addface(4, 5, 6, 7) ms.Normals.ComputeNormals()
ms.Compact()
I have tried to do something similar with this specific example, and I now that meshes only consist of quads or triangles, so i broke down the geometry into quads without any succes.
Looking foreward to any suggestions.
- Jens…
The best way is to use a C# or a VB component to transpose these
lists. I think in C# you can use transpose directly. You can ask this
on the VB/C# forum on our new website, www.grasshopper3d.com
- Scott
On May 27, 3:56 am, Tonsgaard wrote:
> Being a long time user of Generative Components trying to use
> grasshopper i miss the "transpose" command.
> I have a point list like this:
>
> 0, 1, 2, 3, 4, 5
> 0, 1, 2, 3, 4, 5
> 0, 1, 2, 3, 4, 5
> 0, 1, 2, 3, 4, 5
> 0, 1, 2, 3, 4, 5
>
> and a want to transpose dimensions to:
>
> 1, 1, 1, 1, 1
> 2, 2, 2, 2, 2
> 3, 3, 3, 3, 3
> 4, 4, 4, 4, 4
> 5, 5, 5, 5, 5
>
> Surely I am not the first in need of this...
> how would i go about and do this...? I suppose its quite easy in VB
> script, but being used to GC's C# like language, I kinda dont know how
> to do this...
>
> thanks...
>
> Tonsgaard…
etc...}
the function just output numbers in the necessary syntax for the replace component.
in the image, there is a duplicate component so i think that the output function is:
{0} five times, {1} five times, {2} five times, {etc...}
The S input in the replace component its a series of integers (i think 0 to 35 in the image, 36 elements = the length of the list):
0, 1, 2, 3, 4, 5, ..., 35
Also R input its exactly 36 elements.
The replace component re-order the branches like this:
take the s={0} element and put it on r={0}, then
take the s={1} element and put it on r={0}, then
take the s={2} element and put it on r={0}, then
take the s={3} element and put it on r={0}, then
take the s={4} element and put it on r={0}, then
take the s={5} element and put it on r={1}, then
take the s={6} element and put it on r={1}, and so on...
i hope it helps...…
cture, Rhino treats them as a single flat list. For example a surface can have 10 rows and 6 columns of control-points, resulting in a list of 60 points.
But 10 times 6 isn't the only way to get to 60. If you want to make a surface out of a list of 60 points, you'll also have to tell Rhino how those 60 points should be interpreted in terms of a grid. It could be 2*30, 3*20, 4*15, 5*12, 6*10, and all of the aforementioned products the other way around.
Sometimes there's only one way for a number of points to fit into a rectangular grid. For example if you provide 49 points, then 7*7 is the only way to make it work, but these cases are rare so we always demand you give us all the information required to actually make a rectangular grid of control-points from a linear collection.
As for "Why is it, sometimes we need to attach additional value into it?", this is usually because when you divide a domain or a curve into N segments, you end up with N+1 points. For example take the domain {0 to 5}, and divide it into 5 equal subdomains. You end up with {0 to 1}, {1 to 2}, {2 to 3}, {3 to 4} and {4 to 5}. However there are six numbers that mark the transitions between these domains 0, 1, 2, 3, 4 and 5. This is why you often have to add 1 to the UCount, because the number that controls the UCount often results in N+1 actual points.…
Added by David Rutten at 8:30am on December 25, 2014
EC
1. Between hours 1:00 to 24:002. Current document units is in Meters3. Conversion to Meters will be applied = 1.0004. [1 of 7] Writing simulation parameters...5. [2 of 6] No context surfaces...6. [3 of 6] Writing geometry...7. [4 of 6] Writing materials and constructions...8. [5 of 7] Writing schedules...9. [6 of 7] Writing loads and ideal air system...10. [7 of 7] Writing outputs...11. ...... idf file is successfully written to : c:\ladybug\Freeformtower_IDF\EnergyPlus\Freeformtower_IDF.idf12. 13. Analysis is running!...14. ......
Done! Read below for errors and warnings:
15. 16. Program Version,EnergyPlus-Windows-64 8.1.0.009, YMD=2015.04.04 23:39,IDD_Version 8.1.0.00917. 18. ************* IDF Context for following error/warning message:19. 20. ************* Note -- lines truncated at 300 characters, if necessary...21. 22. ************* 577 Zone,23. 24. ************* Only last 1 lines before error line shown.....25. 26. ************* 578 Freeformbuilding27. 28. ** Warning ** IP: IDF line~578 Comma being inserted after:" Freeformbuilding" in Object=ZONE29. 30. ** Severe ** Out of range value Numeric Field#5 (Type), value=0.00000, range={>=1 and <=1}, in ZONE=FREEFORMBUILDING31. 32. ************* IDF Context for following error/warning message:33. 34. ************* Note -- lines truncated at 300 characters, if necessary...35. 36. ************* 586 BuildingSurface:Detailed,7341.
…
points 0, X-1, (2*x)-1, (3*X)-1, (4*X)-1, (5*X)-1 and then
1, X, (2*x), (3*X), (4*X), (5*X)
2, X+1, (2*x)+1, (3*X)+1, (4*X)+1, (5*X)+1
and so on till
5, X+4, (2*x)+4, (3*X)+4, (4*X)+4, (5*X)+4
How can I do this best?
Thanks,
Niels…