IRC log for #brlcad on 20130226

01:12.44 brlcad waves back to PrezKennedy
01:13.29 brlcad maths22: that was almost certainly a registration predating the new checks
01:14.27 brlcad maths22: that's how a lot of the spammer systems work, registers an account and comes back to post X months later to get past spam tests looking at how long ago an account was created
03:03.13 brlcad Posterdati: you can apply an arbitrary transformation matrix with ON_Xform
03:03.24 brlcad should just work fine
03:03.45 brlcad see opennurbs_xform.h
03:31.35 maths22 yep. That user was created on January 7
03:49.15 brlcad probably should just cull out all users with length greater than the current limit
07:51.05 *** join/#brlcad witness (uid10044@gateway/web/irccloud.com/x-laisyrdfbuutpilc)
07:51.05 *** join/#brlcad Notify (~notify@66-118-151-70.static.sagonet.net)
11:32.20 Posterdati hi
11:40.19 Posterdati I need to perform a taper transformation, so I applied a scale(plane, sx, sy, sz) along a path, but my object become flat along that path
11:40.21 Posterdati :(
12:19.13 brlcad Posterdati: did you see my reply?
12:19.34 brlcad you can apply any transformation matrix, including one that tapers
12:27.12 Posterdati well
12:27.26 Posterdati I used a scale along a vector and it worked
12:27.31 Posterdati but how apply a shear?
12:27.41 Posterdati I saw that it uses a plane
12:27.44 brlcad apply a shear matrix :)
12:27.51 Posterdati how does it work?
12:27.56 Posterdati yes
12:28.07 Posterdati but how is it calculated that matrix?
12:28.56 brlcad http://en.wikipedia.org/wiki/Shear_matrix
12:29.55 brlcad for a 4x4, try setting a value in field [0][2]
12:30.04 brlcad (on a unit matrix)
12:30.29 Notify 03BRL-CAD:indianlarry * 54480 brlcad/trunk/src/librt/primitives/brep/brep_debug.cpp: Fixed occurrences where face index was being checked to see if it were less than the total number of surfaces, it should be checked to the total number of faces instead. In openNURBS you can have more than one face per surface leading to the number of faces greater than the number of surfaces.
12:30.29 Posterdati yes, I know what is a shear matrix
12:30.30 brlcad that'd be a shear along the z axis
12:30.53 Posterdati but
12:30.57 brlcad then I don't understand your question :)
12:31.37 Posterdati opennurbs has got a function ON_XForm::Shear(ON_Plane, ON_3dVector, ...)
12:31.44 Posterdati what are plane and vectors?
12:32.12 brlcad that just looks like a helper function
12:32.45 Posterdati yes
12:34.33 Posterdati but if I want to perform a shear on z axis which plane and vectors shall I select
12:34.35 Posterdati use?
12:38.44 brlcad if your shear is that simple, you don't need the helper function
12:38.52 brlcad you can just set the matrix values
12:39.24 brlcad a shear along z would be something like [1 0 A 0] [0 1 B 0] [0 0 1 0] [0 0 0 1]
12:39.38 brlcad where A = B = your shear factor
12:40.19 brlcad the helper function just helps figure out which matrix elements get set and by how much but you certainly don't have to use it
12:40.41 brlcad reading their docs, it sounds like the plane is a fixed anchor point and 3dvector is a shear direction on that point
12:42.10 brlcad so you could specify it that way too, but it's kinda superfluous
12:43.01 brlcad i'd imagine you'd use the origin with whatever your up-vector is (e.g., 0,0,1,1) and define the vector as your shear (e.b., 0 0 2)
12:44.42 Posterdati there are three vectors
12:49.39 Posterdati I'm trying to perform a taper too
12:54.18 Notify 03BRL-CAD:bob1961 * 54481 brlcad/trunk/src/libged/comb.c: Simplify the code a bit in _ged_combadd2().
12:57.25 Posterdati the sad thing is that is not documented well
12:59.22 brlcad it sounds like you're wanting them to tell you how to build a shear matrix, but that's such an open-ended question with many many possible ways
12:59.40 brlcad so they just give you the 4x4 and say "do what you need"
13:00.23 brlcad that really is all you need if you understand shear matrices because that's all that is ultimately applied
13:01.08 brlcad it may simplify your particular problem if you break it up instead of trying to do multiple operations with one matrix
13:01.21 Posterdati brlcad: I know how to build a shear matrix, I don't know how to use their functions
13:01.33 brlcad so don't use their functions!
13:01.44 brlcad ...
13:02.03 brlcad that's why the m_xform is public
13:02.10 Posterdati and how it is supposed to perform a non linear object transformation?
13:02.15 Posterdati I mean
13:02.29 Posterdati I need to change scaling factors along a direction
13:02.44 Posterdati how it is supposed to do that?
13:03.06 Posterdati transform() apply a transformation to an entire object
13:04.49 brlcad it's not :)
13:04.52 brlcad that very different from your original question
13:04.56 brlcad that's not a shear
13:05.19 brlcad or at least, it's maybe multiple shears
13:05.25 Posterdati I need to perform that too
13:05.57 brlcad so you've got me curious now, what are you working on ? :)
13:06.27 brlcad that's not a simple operation in any system
13:07.02 Posterdati yes
13:07.14 Posterdati a program to modify prismatic objects
13:07.37 Posterdati I've got three surfaces
13:07.51 Posterdati laterall surface, top surface and bottom surface
13:08.16 Posterdati I need to deformate the object changing scale factor for top and bottom differently
13:08.48 Posterdati but I think that if I scale the topo alone, the object will break up
13:09.01 Notify 03BRL-CAD:indianlarry * 54482 brlcad/trunk/src/librt/primitives/brep/brep_debug.cpp: Added ?\226?\128?\156KN2d?\226?\128?\157 option to ?\226?\128?\156brep?\226?\128?\157 command to display surface knots in 2d UV space.
13:09.26 brlcad even most of the commercial systems have limite support for non-linear transforms (because of other complexities you haven't even touched on yet)
13:09.35 brlcad that said, xform can probably do that with a taper matrix
13:09.42 brlcad but that's a lot harder to calculate
13:09.59 brlcad I doubt there's a helper for tapering
13:10.03 Posterdati no
13:10.11 Posterdati but shear could accomodate
13:10.20 brlcad I don't think so..
13:10.42 Posterdati may I scale only the top?
13:10.52 Posterdati will the program seam it then?
13:11.17 brlcad where is the "top" defined geometrically?
13:11.28 brlcad you could directly scale just the top surface
13:11.43 brlcad but yeah, you'd have to restitch the brep
13:12.05 brlcad there may be some update function to do that for you, haven't looked
13:12.34 brlcad a taper matrix would do it and keep it together
13:12.58 Posterdati top and bottom arte brep objects
13:13.04 Posterdati top and bottom are brep objects
13:13.25 brlcad they're entities (i.e. surfaces) in a brep object
13:13.39 brlcad but nothing specifically defines top/bottom/whatever *geometrically*
13:15.27 brlcad an ON_Brep represents a single object comprised of N surfaces with topological connectivity, but not topological awareness (no CAD system does that afaik) other than maybe a notion of up
13:15.44 brlcad yeah, something like this http://www.charlespetzold.com/blog/2009/07/Taper-Transforms-with-Matrix3DProjection-An-Analytical-Approach.html
13:16.51 brlcad hm, a simpler form that might be easier to play with: http://en.wikipedia.org/wiki/Tapering_(mathematics) but would have to be extended to homogenous coordinates
13:17.35 brlcad still, Transform() may be limited to affine transformations (i.e., no tapering, twisting, bending) .. so you'd want to check that before trying to build one by hand
13:22.23 Notify 03BRL-CAD Wiki:Sean * 0 /wiki/User:ShantelujpmgezqzqzhqamoodekmwydwcddxftbiuzDhosane: Spamming links to external sites
13:22.37 Notify 03BRL-CAD Wiki:Sean * 0 /wiki/The_use_of_Inflatable_water_slides: spam
13:29.12 Notify 03BRL-CAD:bob1961 * 54483 brlcad/trunk/src/libged/comb.c: More simplification of _ged_combadd2().
13:31.33 Posterdati ok
13:32.51 Posterdati antway
13:33.02 Posterdati anyway whichis the center of transformation?
13:33.22 brlcad for what?
13:33.47 Posterdati taper
13:34.08 Notify 03BRL-CAD:bob1961 * 54484 brlcad/trunk/src/libged/comb.c: More simplification of _ged_combadd2().
13:43.20 Posterdati so no solution for my problem
13:51.09 Posterdati :(
13:55.12 Posterdati I should apply transform for every object points, is that possible?
13:55.30 Posterdati is it possible to evaluate points in such manner?
13:58.52 brlcad every real piece of real geometry has a Transform()
13:58.55 brlcad so yes
13:59.23 brlcad you could apply Transform() to the individual points and the surfaces should be updated accordingly
14:00.24 Posterdati ok
14:00.31 Posterdati I'll try that
14:00.43 brlcad maybe a useful example in brlcad/src/librt/test_bot2nurbs.cpp
14:00.58 brlcad we transorm individual points to project them onto a plane for testing
14:03.04 Posterdati ok tx
14:06.02 Posterdati it means that I have to apply a ON_Xform to every brep
14:10.13 Posterdati so Brep objects has got their own Transform helper function
14:10.36 Posterdati I should override it too
14:14.39 Posterdati but how can I be sure that all points get transformed?
14:18.15 Posterdati :(
14:20.06 Posterdati rhino can taper objects
14:24.05 brlcad you can iterate over all points in an on_brep
14:25.11 brlcad not suprising that rhino can, it does a lot that opennurbs does not (and they provide access via the rhino sdk) such as surface intersection testing, closest point, tessellation, and more
14:25.33 brlcad most of the hardest pieces to implement are removed
14:26.04 brlcad we've spent several years implementing a couple of the features they intentionally removed that we needed
14:26.33 Posterdati mmmh
14:26.41 Posterdati I can't port it on sdk
14:26.44 Posterdati no time
14:26.48 Posterdati and I'm working on linux
14:31.38 Notify 03BRL-CAD Wiki:Dhyan singh * 0 /wiki/User:Dhyan_singh:
14:37.11 brlcad no time?
14:37.35 brlcad is this for work? class?
14:40.06 Posterdati work
14:55.17 brlcad Posterdati: not sure what the implementation of Shear is supposed to tell me/you that wasn't said.. it sets up the m_xform matrix based on the plane and vector
14:55.32 brlcad that's still not going to get you a non-linear transform (by itself)
14:55.55 brlcad multiple shearings might for some specific cases like your cube
14:56.51 brlcad like I said earlier, "it sounds like the plane is a fixed anchor point and 3dvector is a shear direction on that point" .. and the impl indeed confirms that
14:58.25 Posterdati plane gives you the origin point for transformation
14:59.03 brlcad i.e., "the plane is a fixed anchor point"
14:59.42 brlcad sorry if that wasn't clear earlier
15:00.33 *** join/#brlcad Skriptkid (~Skriptkid@117.202.103.23)
15:00.38 brlcad hi Skriptkid
15:00.55 Skriptkid hey :)
15:01.18 Skriptkid Is buildbot currently unavailable?
15:01.33 brlcad probably
15:02.11 Skriptkid hm..okay
15:02.39 brlcad Skriptkid: looking for something?
15:03.03 Skriptkid Nope. Just casually seeing. Its gives me a 503
15:03.08 brlcad Skriptkid: it'd be great to get it back up and running -- I don't think it was configured to properly start/restart on server execution
15:03.12 brlcad s/execution/reboot/
15:03.36 Skriptkid Oh. I'll see if anything can be done
15:03.37 brlcad what was the url?
15:03.44 Skriptkid crit.brlcad.org/buildbot/
15:04.32 brlcad looks like a rewrite rule gone bad
15:04.33 brlcad <p>The document has moved <a href="http://brlcad.orgbuildbot">here</a>.</p>
15:04.54 brlcad crit.brlcad.org is now brlcad.org
15:05.53 Skriptkid Oh.
15:06.53 brlcad fixed the redirect
15:07.18 brlcad and it is indeed down (probably due to aforementioned config)
15:07.33 Skriptkid okay
15:08.56 Skriptkid Will you be in San Francisco as well? During our trip?
15:09.18 brlcad nope, you're the lucky ones :)
15:09.52 Skriptkid Ahh..was looking forward to meeting you too :)
15:10.02 brlcad I'd like that
16:24.08 Posterdati I always need a taper function :(
16:50.17 brlcad implement one and make it part of our libnurbs library ;)
16:51.18 Posterdati but how using opennurbs?
16:51.44 brlcad your first suggestion about applying a taper transform to all of the individual points sounded like a reasonable start
16:52.37 Posterdati yes
16:52.38 brlcad shouldn't be more than a day to code that up I'd think
16:52.39 Posterdati so
16:52.48 Posterdati listen to the idea
16:52.52 Posterdati I need
16:52.54 Posterdati a line
16:53.08 Posterdati a segment
16:53.19 Posterdati between two points
16:53.32 Posterdati and a plane perpendicular to it, I think
16:54.01 Posterdati every object point intersecting the plane are scaled
16:54.25 Posterdati this plane travel on the segment
16:54.31 Posterdati from A to B
16:55.28 Posterdati now objects are all breps
16:55.44 Posterdati so how can I scale every brep points?
16:56.34 brlcad your description leaves much to be desired ... unclear
16:56.47 brlcad "every object point intersecting the plane are scaled" ... what does scaling a point mean?
16:57.01 brlcad object is a line segment, presumably?
16:57.48 brlcad so every point on a line segment is .. "scaled", maybe you mean transformed by some translation matrix?
16:58.00 Posterdati scaling a point means translating it
16:58.27 Posterdati p' = Sp
16:58.29 brlcad so turning the line segment into a new line segment or into a new curve?
16:58.45 Posterdati no
16:59.07 brlcad maybe you can draw a picture :)
16:59.09 Posterdati the line segment is the path along the plane travel
16:59.16 brlcad sure
16:59.34 Posterdati is a straight line
16:59.35 brlcad but what happens to a line segment within that plane's travel path
17:00.05 brlcad basically, I'm asking what kind of transforms are possible
17:00.19 Posterdati on the plane you can translate
17:00.21 brlcad if you're only talking about affine transformations, then you're good already and the problem is very simple
17:00.27 Posterdati and rotate
17:00.45 brlcad if you're talking about non-affine transforms (where a line turns into a curve), you've got a much harder problem
17:01.02 Posterdati wsell
17:01.04 Posterdati well
17:01.23 Posterdati the problem is what is a taper transformation?
17:01.53 Posterdati T = [[ sx(u) 0 0 ][0 sy(u) 0 ][ 0 0 sz(u) ]]
17:02.06 Posterdati is that a generic taper?
17:03.24 Posterdati so what happen if I've got a cyclinder and want to taper it along z axis, I mean changing its point x y coordinates but not the z one
17:04.16 brlcad it depends if the taper is linear or not
17:04.22 Posterdati linear
17:04.47 Posterdati T = [[ sx(z) 0 0 ][ 0 sy(z) 0 ][ 0 0 1 ]]
17:04.57 brlcad I think linear tapering should be representable with just a scaling matrix
17:05.04 brlcad but I don't have a proof on hand
17:06.45 brlcad but yeah, I think T is the basic idea
17:08.43 Posterdati ok
17:08.56 Posterdati now I have to apply T to every point
17:09.26 Posterdati with their z equal to z parameter
17:23.39 brlcad Posterdati: heh, https://github.com/mcneel/rhinocommon/blob/master/dotnet/opennurbs/opennurbs_xform.cs line 345
17:23.48 brlcad that's their rhinosdk c# wrapper
17:24.19 brlcad leads me to believe that they have a Taper function in the RhinoSDK, but it was intentionally removed from openNURBS
17:25.37 brlcad still, that's probably because they implemented it for non-linear tapering which is seriously hard
17:26.12 brlcad especially when you do some taper that changes topology or creates singularities
17:30.18 Posterdati I saw that too
17:30.37 Posterdati but I could arrange something
17:50.23 *** join/#brlcad luca79 (~luca@net-37-116-125-167.cust.dsl.vodafone.it)
18:06.41 Posterdati ciao
18:16.33 Notify 03BRL-CAD:carlmoore * 54485 brlcad/trunk/src/liboptical/sh_cloud.c: make use of sqrt(1/2)
18:40.21 Notify 03BRL-CAD:carlmoore * 54486 brlcad/trunk/src/librt/primitives/ell/ell.c: use M_SQRT1_2 , and clarify some remarks about use of degrees, not radians
18:43.48 Notify 03BRL-CAD:carlmoore * 54487 brlcad/trunk/src/librt/primitives/nmg/nmg_inter.c: make use of M_SQRT1_2
19:23.40 Notify 03BRL-CAD:carlmoore * 54488 brlcad/trunk/src/librt/primitives/superell/superell.c: use M_SQRT1_2, and clarify some comments about use of degrees, not radians
19:26.27 Notify 03BRL-CAD:carlmoore * 54489 brlcad/trunk/src/librt/primitives/tgc/tgc.c: make use of M_SQRT1_2
19:41.48 Notify 03BRL-CAD:carlmoore * 54490 brlcad/trunk/src/proc-db/tube.c: use M_SQRT1_2
20:04.22 Notify 03BRL-CAD:carlmoore * 54491 brlcad/trunk/src/conv/g-shell-rect.c: use square root of 2
20:09.13 Notify 03BRL-CAD:n_reed * 54492 brlcad/trunk/src/proc-db/tube.c: remove broken comment
20:16.33 Notify 03BRL-CAD:carlmoore * 54493 (brlcad/trunk/src/remrt/rtsrv.c brlcad/trunk/src/rt/opt.c and 2 others): make use of M_SQRT2 and M_SQRT1/2 (the latter is sqrt(2.)/2)
20:22.19 Notify 03BRL-CAD:n_reed * 54494 (brlcad/trunk/include/ged.h brlcad/trunk/src/libged/draw.c): add ged_redraw to recalculate vlists without changing display state
20:23.05 Notify 03BRL-CAD:carlmoore * 54495 brlcad/trunk/src/libbn/poly.c: use M_SQRT3 for square root of 3
22:19.09 starseeker Huh - http://www.amazon.com/Handbook-Source-Tools-Sandeep-Koranne/dp/144197718X - mentions BRL-CAD
22:19.35 starseeker not the kind of book I'm used to seeing from Springer...
23:21.18 Notify 03BRL-CAD:n_reed * 54496 (brlcad/trunk/src/mged/chgview.c brlcad/trunk/src/mged/dm-generic.c and 2 others): have mged redraw after zoom events when adaptive plotting is enabled

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.