Stick - Stretchy in 3D with 1 3D-Handle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-01-22 03:15 PM
So it is possible to follow complex 3D-meshes to build stuctures like this:
Picture:
My problem:
If you drag over 180 degrees, the stick flips in 3D to the other side.
You can easily worrkaround by move the thing to the other endpoint and drag the other one, but it sucks.
What do i make wrong?
Code:
gosub 1 ! Einstellungen usw. gosub 100 ! Hotspots Gosub "Drehungen" !!inkl Art des Stabes end ! ------------------------------------------------------ 1: uid = 1 return 100 : !!! ========== Hotspots ein Segment ========== !!! ----- x ----- hotspot 0 , y, z, uid, x, 1+128 : uid = uid+1 ! base hotspot -1 , y, z, uid, x, 3 : uid = uid+1 ! ref hotspot x , y, z, uid, x, 2 : uid = uid+1 ! move !!! ----- y ----- hotspot x , 0, z, uid, y, 1+128 : uid = uid+1 hotspot x , -1, z, uid, y, 3 : uid = uid+1 hotspot x , y, z, uid, y, 2 : uid = uid+1 !!! ----- z ----- hotspot x , y, 0, uid, z, 1+128 : uid = uid+1 hotspot x , y, -1, uid, z, 3 : uid = uid+1 hotspot x , y, z, uid, z, 2 : uid = uid+1 return "Drehungen": h = SQR(x^2+y^2+z^2) roty 90 rotx -atn(y/x) roty -atn(z/SQR(x^2+y^2)) material Mat if ArtDesStabes = "Zylinder mit Endkugeln" gosub "Zylinder mit Endkugeln" if ArtDesStabes = "Endkugel+Endkegel+Zylinder" gosub "Endkugel+Endkegel+Zylinder" if ArtDesStabes = "quadratischer Stab mit Endkugeln" gosub "quadratischer Stab mit Endkugeln" del 3 if Endkugeln = 1 then sphere Kugeldurchmesser addx x addy y addz z sphere Kugeldurchmesser del 3 else endif return !!!!Ende Drehungen "Zylinder mit Endkugeln": Cylind h, QRadius return "Endkugel+Endkegel+Zylinder": CONE h/3, Verjuengung, QRadius, 90, 90 addz h/3 Cylind h/3, QRadius addz h/3 CONE h/3, QRadius, Verjuengung, 90, 90 del 2 return "quadratischer Stab mit Endkugeln": addx -QRadius/2 addy -QRadius/2 Block QRadius, QRadius, h del 2 return
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-01-22 04:21 PM
www.leloup.nl
ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-01-22 04:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-01-24 06:51 PM
In trigo, according to xy coords, there are four particular situations, plus four quadrants.
Attached an example of XYZ Tube. If you replace the TUBE command by CYLIND or EXTRUDE,
you need to add two transformations. Result is the same, see 3D script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-01-25 10:58 AM
Did You ever try this object - to make it growing - from one 3d-Point to an other - for exampleto follow a complex 3D - Morphline?
This would be a killer-App solving many 3D-modelling problems!
and
Question:
For what is this good for?
hotspot x*0.5, y*0.5, z*0.5, uid : uid = uid+1 ! halfIs this just Your programming - standard to get a halfpoint - or does it have to do with the XYZ-Interface?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-01-25 12:34 PM
Wow!
(http://archilib.od.pagesperso-orange.fr/)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-01-26 12:25 PM
My first target is to alter his GDL-example to be able to apply every sort of Stick to the 3D-Centerline. (Cylinder, Block, IPE-Steel-Forms ond many other things)
x2 = (x[k1+1] - x[k1]) !!calculates distances in 3D y2 = (y[k1+1] - y[k1]) z2 = (z[k1+1] - z[k1])Here the Archicad- compiler thinks - the code is i ok.. ?? !! ??
h = SQR(x2^2+y2^2+z2^2)This was the 3D-Diameter..
But here the Interpreter in Archicad finds a Fault !?!
len2 = sqr(x2^2+y2^2) ! 2D Axis Length len3 = sqr(len2^2+z2^2) ! 3D Axis LengthAnd here too:
if abs(len2) > EPS then zAng = atn(z/len2) endifIt told me (translated by me from German):
Operator can not be used at factors from "array" (x[nSeg]) ...
My Question: A factor - calculated from the array (integer) - is different to a factor calculated from a normal Parameter for Archicad - Why?
And how do i change it - that it can be used by -for example: Abs x[nSeg]) and othe roperators?
An other target would be to change the Interface behaviour: In Your GDL, You have to change the number of segments in the normal Dialogue. It would be "nearer to the User" if first there is only one segment visible. In the direction of the only open segment shold be a new interactive hotspot - a little further.
If you drag this hotspot, the next segment should appear - now as endpoint of the next segment - and so on. It would be much faster and smoother - to edit for the user. Im trying..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-01-26 05:21 PM
The problem was appearing by calling a named function into a loop.
The same scripted in the loop - and all was ok.
And - i got solved the problem with the flipping stick by dragging it in the wrong quadrant - with Help from Mr. Dentans GDLs.
I hope that i can solve my target 2 - appearing segment after segment by dragging on the new interactive hotspot...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-01-26 07:28 PM
www.youtube.com/watch?v=OAIP9C7IinA&feature=youtu.be
and to try:
Its not from me - the most code came from Mr. Dentan, i just playd with it.. he has better objects.
the difference is, that my alterings makes it possible to add any polygon or multiple set of objects to each vector. - to make fences, Walls following the 3D-earth, objects following each line of a roof and so on..
Also it should be possible to multiply the thing within the object and to generate 3D - Meshes with frames...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-01-26 08:19 PM
It was intended to build walls with special cross section along meshes.
It suits my needs, more or less, thus I didn't go further.
Take it as a study case, and fell free to modify it.
For better stuff, take a look at Objective, from Ralph Wessel.