try to get the output. In this case the output needs to be set before requesting for it. I am doing it with this call:
ret = gsaobj.Output_Init_Arr(1,"Global","A1",14003001,3)
In API help the call is documented like this:
short Output_Init_Arr (long iFlags, string sAxis, string sCase, enum ResHeader header, long num1dpos)
so this call has 5 arguments (long, string, string, long, long) (the enums are defined as longs)
This call works, because when I print the ret, i get 0 that is "succeded" so everything works so far.
Then I request the output with the following:
results = []
ret = gsaobj.Output_Extract_Arr(10,results,numcomponents)
In API help the call is documented like this:
short Output_Extract_Arr(long iRef, SAFEARRAY(struct GsaResults)*arrayResults, long* numComponents)
I am getting the error "
Runtime error (ArgumentException): Could not convert argument 1 for call to Output_Extract_Arr."
So it seems that is not accepting 10 as a long in the beginning (assuming that argument 1 is the first). I already tried passing a variable as long, using long(10) there, nothing works.
Furthermore I don't know if the other two variables are correct like that. I come from VBA where I need to declare everything but AFAIK python is more permissive in this sense. "results" should be a dynamic array of objects and "numcomponents" a long.
Any help would be appreciated!
Thanks! :)
…
r "virtual partitions" as follows:
What I mean "air walls" here, is derived from the description of the E+ documentation with the header of "Air wall, Open air connection between zones". (Page 17, http://apps1.eere.energy.gov/buildings/energyplus/pdfs/tips_and_tricks_using_energyplus.pdf)
As I understand, the term "air wall" used in E+ here refers to a description of something like "boundary condition" between adjacent interzone heat transfer surfaces, but not a kind of "construction or material" (like air space resistance or air gaps within a wall/double glazing window).
The main purpose of introducing the "air wall", is to simulate or approximate the airflow/convection/natural ventilation effect between multiple thermal zones which are connected by a large opening.
In my previous tests, using HBzones and GB, I managed to create the gbXML file which can be successfully imported to DB (without assigning any constructions within HB). And the adjacency condition can be recognized automatically by DB, even when I did not use the "Solve adjacencies" component in HB - shared surfaces between multiple thermal zones are recognized automatically by BD as "internal - partition"(which are standard partitions, but not virtual partitions).
In order to create/approximate "virtual partition", I need to manually draw a "hole" in the standard partition surface (fig.1&2). Again, the reason why we want to use "virtual partitions"(or "air wall") is that it allows airflow between multiple thermal zones which are connected by large openings and we could get different temperature of the each subdivided thermal zone which compose a large thermal zone.
My question is, if there is a possible way to simulate/approximate this kind of "virtual partitions"(or "air wall") in HBzones or in GB? If so, I would like to test if DB recognizes it or not. Actually, we expect that there is no need to involve any manual operations (like drawing a "hole" in the standard partition surface) in DB, due to an automatic optimization loop.
Thank you!
Best,
Ding
fig.1
fig.2
…
We invite participants of the eCAADe 2015 conference to propose workshops on their current research. The workshops will be held on the 14th an the 15th of September…
ported to Rhino and "set" in Grasshopper, i trim both surfaces from their rectangular bases so that when sDivide is used it creates and distributes the same number of points on each surface.But heres the problems: a) if i use the "trimmed" surfaces with SrfGrid it errors warning: "A point in the grid is null. fitting operation aborted".I'd learned this was caused by "nulls" replacing position Data Items when the rectangular grid(surface base) was trimmed away. So i used Clean Tree which worked removing all nulls, then Shift Paths\Flip Matrix to create line-endpoint pairs for Polyline\Evaluate Curve. I Flattened the last Flip Matrix placing all data items in one source for SrfGrid, like in the working Untrim\CopyTrim definition.This time,.b) SrfGrid errored with: "The UCount value is not valid for this amount of points",.So, i substituted a 356 value, numeric Slider in the Addition B param., and tested its range until a valid UCount was found. Then SrfGrid fitted a surface thru the points, BUT,d) those SrfGrid surfaces are extremely deformed even thought the points preceding it from Evaluate Curve are accurate,SEE: def: "3b-RGH_SurfaceBlend.gh",AND,.a2) if i use Untrim with CopyTrim then SrfGrid works, but since the Jokers limbs WILL be in different surface positions then the blends between the Arm (for example) will rise from its relative FLAT position on the untrimmed Source surface to the Arm on the Target surface, rather than morphing from the Corresponding Arm position on the Source surface,. ..see def.: "4-RGH_SurfaceBlend.gh"So please let me know,..1) how to produce accurate surfaces from SrfGrid in def.: "3b-RGH_SurfaceBlend.gh",. ..(NOTE: BOTH these def's contain 2 indentical, "internalized" surfaces, but if def. 3b can be made to work it will also work with Dis-similar surfaces)2) which component to use or how else to determine the correct UCount value for a specified amount of points(ie:155), re: SrfGrid error: "The UCount value is not valid for this amount of points",.3) how else to force SrfGrid to work with Trimmed surfaces?, AND,..4) how to force intersurface, point-blend correspondence lines: Polylines(PLine) to be connected between correctly! correponding positions (Limbs) on the surfaces?,
Really! appreciate all help, definitions and kind generosity common to this knowledgable membership,
Cheers!,
Jeff…
50 and reduced the 'cell size' slider to 0.5. When the 'Azimuth' angle is changed to 180 +- 90 (dawn or dusk), the points are widely dispersed, reducing the density and increasing the number of cells in the "sparse grid". Under these conditions, the number of cells was ~2000 and the Profiler time for 'Boundary' went up to a full minute or more each time 'Altitude' or 'Azimuth' was changed.
So I created this code to benchmark some alternatives and found two interesting things:
'Boundary' surface performance (v.1) is not linear. As the number of surfaces goes from 1000 to 2000, the time per surface goes up dramatically.
I tried three alternatives for creating a rectangular surface at a given point that are all substantially faster: v.2, v.3 and v.4. For 2000 points, v.4 is 150 times faster than v.1 !!!
Performance of v.2, v.3 and v.4 are similar and all scale up very well. To benchmark beyond 2000 points, I recommend disabling the VERY SLOW v.1. At 5000 points the 'Pop2D' component takes ~11.3 seconds but v.3 and v.4 take less than one second to generate 5000 surfaces!
See boundary_2015Nov19a.gh attached.
So I replaced the 'Rectangle' and 'Boundary' components in my sun reflection model with v.4 in focus_2015Nov19b.gh (also attached) and the performance is amazing.
I'm sure someone has mentioned this performance issue with 'Boundary' on the forum before but as with many things, I didn't realize what a major obstacle it can be until I discovered this for myself.…
Added by Joseph Oster at 9:16pm on November 19, 2015
grout lines, a tile surface and tile perimeter poly line). I then use that as a Mesh (from Rhino) in the second definition.
2. I can tile out the mesh surface and rotate all the tiles in 90 deg. increments.
To get what I wanted. I took the Mesh and have copied it in series to make a grid. I can then control the dimensions of the grid. X and Y extents. I can also rotate the tiles around their centers.
The spacing of the grid is set from an edge curve of the tile (or mesh). This sets the size of the squares in the grid themselves.
See definition, images and Rhino 4 File, to give the definitions a shot. I have labeled how to use them.
My question -- how can I randomly rotate squares in my grid? I would like the deg of rotation to be random and also which tiles they are.
Also how might I rotate (every other tile) for example? So that I can control the pattern more?
Thoughts?
Thanks!
…
ror when it comes to points on edges of the surface.I guess it is because normal vectors at a few of points are invalid. After all, because of these invalid points, an error message comes out which is saying " Runtime error (PythonException) : Unable to add polyline to document " and it results in no output. Please give me some help if you know how to handle this problem. I post a code below.Thanks in advance.
---------------------------------------------------------------------------------------------
import Rhinoimport rhinoscriptsyntax as rsimport mathimport ghpythonlib.components as gh
output_crvs = []
for pt1 in input_pt :output_pts = []newPt = pt1output_pts.append(newPt)
while len(output_pts) <= 100: newPt = outputpoint(base_srf, newPt, distance_factor) output_pts.append(newPt)
output_crv = rs.AddPolyline(output_pts)output_crvs.append(output_crv)A = output_crvs
def outputpoint(base_srf, input_pt, distance_factor):centre_point = rs.AddPoint(0,0,0)height_point = rs.AddPoint(0,0,10)
zaxis = rs.VectorAdd(centre_point, height_point)
cp_pt = rs.SurfaceClosestPoint(base_srf, input_pt)normal_vector = rs.SurfaceNormal(base_srf, cp_pt)drain_vector = rs.VectorCrossProduct(normal_vector, zaxis)
dvector2 = rs.VectorUnitize(drain_vector)dvector3 = rs.VectorRotate(dvector2, 90, normal_vector)
mpt = gh.DeconstructVector(distance_factor*dvector3)moved_pt = rs.PointAdd(input_pt, mpt)moved_uv = rs.SurfaceClosestPoint(base_srf, moved_pt)output_pt = rs.EvaluateSurface(base_srf, moved_uv[0], moved_uv[1])
return output_pt…
g from a list of 12 items I would find all the combinations taking just 4 at time.
I'd use a Stream gate that takes the indexes of the items and pass them to a list item in order to select just the items of the combination. Doing so I can choose a single combination of index at time to pass to the list item.
In this moment all the data come out from the first gate, all the others are empty.
If I pass these index to the list item it gives me an error (probably because of the data structure).
*long version*
I start from a list of 12 segments, all of them with the starting point in common and the ending point distributed regularly in the space. It's a quite simple starting point.
What I'm trying to achieve is to find all the possible spatial configurations made of 2, 3, 4 segments. I started with 2 segments so I've 12^2=144 possible configurations but just 4 different configurations that can intuitivelly be recognized (60°, 90°, 120°, 180°).
Doing the same with 3 segments generates 12^3=1728 configurations and I don't know how many different ones. With 4 segments I've got 12^4=20736 possible configurations.
As you can imagine many configurations are identical but just with a different orientation so at the end I'll have to parse geometrically the output to delete duplicates (I'll address this later on).
Please could you help me to figure out how to mix these segments in different configurations?
Thank you in advance.…
per bake commands to bake the connected geometry with the corresponding materials.
mxDiff is a simple diffuse material. Only reflectance color for 0° and 90° are exposed.
mxEmit is a basic emitter material. You can set light color, power and efficiacy of the emitter.
mxBasic is the most complex material for now. You can set all the properties of a single layer material including. Use this for transparent materials.
mList is your way if you don't want to create your own materials. This component returns a list of all the materials on the Maxwell scene manager. Make sure this is evaluated after you add your own materials if you want to see them in the list.…
diseño, construcción y entendimiento de nuestro entorno.
BIM está poniendo a disposición de los diseñadores y gestores auténticas bases de datos que pueden generarse, conectarse y editarse de forma paramétrica, proporcionando una sólida capa de realidad a los ejercicios de diseño generativo y computación que son objeto de estudio en Algomad, el seminario que busca popularizar la programación y la parametrización en el diseño y en la experiencia de nuestro entorno construido.
Tras un paréntesis en 2015, Algomad vuelve con el objetivo de demostrar cómo una visión computacional del BIM es una oportunidad para mejorar la forma de trabajar de ingenieros, arquitectos, constructoras y operadores de edificios e infraestructuras, tendiendo un puente entre las técnicas de diseño digital más avanzadas y la realidad de la construcción.
Algomad 2016 tendrá lugar en el centro de Madrid, en IE School of Architecture and Design, IE University, los días 3, 4 y 5 de Noviembre de 2016 y comprenderá 4 talleres así como ponencias a cargo de expertos de primer nivel.
Estructura de Algomad 2016
Algomad 2016 se estructura en torno a tres áreas temáticas principales:
BIM, como la metodología total específica para el sector de la construcción.
Computación, englobando las aplicaciones de programación y parametrización al diseño de edificios e infraestructuras.
Realidad, como marco de trabajo, buscando siempre resolver problemas reales a través de los dos puntos anteriores.
Público objetivo
Arquitectos, arquitectos técnicos, ingenieros y en general académicos, estudiantes de últimos cursos y profesionales del mundo inmobiliario y de la construcción que compartan un interés por la digitalización de nuestro sector. Se espera un nivel mínimo en el uso de herramientas BIM y de parametrización. Algomad proporcionará formación adicional y gratuita en las herramientas básicas a emplear en los talleres para asegurar un correcto desempeño.…