Forum Replies Created
-
AuthorPosts
-
Péter BaksaKeymaster
You can add a fill type parameter, and the user can select the inline fill there.
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi Bruce,
there will be an NZE library update available sometime this week, that should fix this problem too.
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi,
The forum engine got rid of [i] even in the code, so we turned off the italic BBCode feature. Please try the code again, now it should work.
If you still see the twist at the apex, please write back the library version you are using. (gravity_tube has been corrected in a library update, it’s possible that your version doesn’t contain that update yet.)Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi,
The TUBE commands were designed for objects with much less twist, where some auto-correction of the profile rotation comes handy. We don’t want to fix that in the TUBE commands, that would break compatibility. There is a solution however: in a library update in version 21, the “gravity_tube” macro was added.
As you can read in the documentation, the W axis of a cross-section at each particular node of TUBE is tied to the Z axis. With a spatial helix, this makes no sense. Using “gravity_tube”, you can set this W axis freely. In your spatial helix, this gravity vector would be pointing from the path point to the axis of the helix.
Based on your example object, here is a sample code that models a bent helix nicely:
resol 16 ! model a helix bent 180 mat = 45 ! glass rWire = 0.002 rCoil = 0.011 nCoil = 18 ! number of turns around axis nTurn = 36 ! number of points in one turn R = 0.1 ! radius of bending dFi = 180 / (nCoil * nTurn) dim axis[][3] dim helix[][3] dim gravity[][3] n = 0 for fi = 0 to 180 step dFi n = n + 1 ! compute points as a helix on a straight cylinder, then bend it aCoil = fi / dFi * (360 / nTurn) ! angle around axis xCoil = cos(aCoil) * rCoil ! x, y on cylinder yCoil = sin(aCoil) * rCoil rTurn = R - yCoil ! turn radius of vertical line on cylinder ! helix axis point axis[n][1] = 0 axis[n][2] = cos(fi) * R axis[n][3] = sin(fi) * R ! helix point helix[n][1] = xCoil helix[n][2] = cos(fi) * rTurn helix[n][3] = sin(fi) * rTurn ! vector from helix to axis gravity[n][1] = axis[n][1] - helix[n][1] gravity[n][2] = axis[n][2] - helix[n][2] gravity[n][3] = axis[n][3] - helix[n][3] next fi ! show helix for i = 1 to n - 1 lin_ helix[i][1], helix[i][2], helix[i][3], helix[i + 1][1], helix[i + 1][2], helix[i + 1][3] next i ! show helix axis and put helix as tube path for i = 1 to n hotspot axis[i][1], axis[i][2], axis[i][3] put helix[i][1], helix[i][2], helix[i][3], 0 next i ! try TUBE TUBE 2, n, 1 + 2 + 16 + 32, 0, 0, 901, rWire, 360, 4001, GET(NSP) ! try "gravity_tube" add 4 * rCoil, 0, 0 ! parameters for gravity_tube (derived from TUBE{2}): ! top_material, bottom_material, cut_material, ! n, m, mask, ! u1, w1, s1, mat1, ! ... ! un, wn, sn, matn, ! x1, y1, z1, angle1, gravity1_x, gravity1_y, gravity1_z, ! ... ! xm, ym, zm, anglem, gravitym_x, gravitym_y, gravitym_z put mat, mat, mat, 2, n, 1 + 2 + 16 + 32, 0, 0, 901, mat, rWire, 360, 4001, mat for i = 1 to n put helix[i][1], helix[i][2], helix[i][3], 0, gravity[i][1], gravity[i][2], gravity[i][3] next i call "gravity_tube" del 1
PS. “gravity_tube” might give some warnings with strict error checking options, that will be corrected in the next main release.
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterI don’t know about Door Marker 21, Door Stamp 21 does this too.
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi Izabela,
yes, you can use use
ac_wido_oversize_b
parameter. The D Marker 21 uses this withac_wido_subfl_thickness
to display the sill height.Here is a listing of all available parameters for markers:
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi James,
the GDL interpreter runs some checks before executing the script. This check is done line-by line, not in execution order. In version 2 when it first comes to foobar_, that is an uninitialized variable, but it would expect string or group type. Sadly we can’t easily initialize a variable to be group type.
A solution:
– move the subgroup and placegroup commands to another subroutine, placed after subroutine 100
Less elegant solution if the above doesn’t work for your code structure:
– initialize group type variable: create an empty group and add it to itself, creating a group type variablegroup “dummy”
endgroup
foobar_ = ADDGROUP(“dummy”, “dummy”)
killgroup “dummy”GOSUB 100
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi Kristian!
By automatic counting do you mean the auto-incrementation of zone no.?
You don’t need autotext for that, just type your prefix before the number, and place the zones. Btw. this doesn’t work for postfixes. It might not work in all versions, I’ve tested this only with AC21.Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi,
Yes, SYMB_VIEW_PEN doesn’t work for railings and stairs, since railing objects don’t have a Symbol Line Pen setting like objects do.
The usual parameters A, B, ZZYZX, AC_show2DHotspotsIn3D, ac_toplevel, ac_bottomlevel,
gs_cont_pen, gs_fill_type, gs_fill_pen, gs_back_pen,
and most of the SYMB_… globals except SYMB_MIRRORED are irrelevant.There is a trick you can use, without rewriting the macro:
Globals are really global variables, they can be changed in script, they are passed to the macro with their current values, and don’t get reset at the beginning of the macro.
In the railing object use SYMB_VIEW_PEN =before the macro call. Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi James,
I tried to achieve what you described, but it works for me: set the pen in the object, and the called macro will be drawn with that pen.
Could you post a code example of what isn’t working?Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi Bruce,
Hotspots, hotlines and hotarcs are ineffective currently with the railing tool, in 2D and 3D too.
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi Bruce,
There is no restriction on using resol, it should work. With which modelling command are you trying to use it?
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi Pavel,
To define polygons, you have to list the indices of it’s edges. These indices are generated internally, incremented after each EDGE command, and reset to 1 with the BASE command. The edges have a direction. If you include an edge with -ID, the GDL interpreter will include the edge in opposite direction. The edge directions of a polygon should form a continuous counter-clockwise loop. When you have two neighboring polygons with a common edge, going counterclockwise around both polygons means that the common edge will be positive direction in one polygon, and negative in the other. The negative ID is a shortcut for reusing the same edge in opposite direction, you don’t have to define them twice.
If you include an edge with ID = 0, the following edges will define a hole. The edge directions of holes should form a continuous clockwise loop.I hope this gets you closer to understanding.
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi Joachim,
in the define texture command you used flag 566, which breaks down to 2+4+16+32+512. The 2 bit sets the bump mapping.
By the way we don’t have a flag 512, that does nothing.Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SEPéter BaksaKeymasterHi,
use UI_INFIELD{3} or UI_INFIELD{4} with method 2 or 8. There are some examples here
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SE -
AuthorPosts