[OpenSCAD] multmatrix expands the input matrix to 4x4?

adrianv avm4 at cornell.edu
Wed Jul 3 17:46:52 EDT 2019


I think the argument for tightening size requirements would be that
mathematically the size needs to be 4x4 and if it isn't it *could* be
intentional, or it could be programmer error, and by issuing a warning, you
may help the programmer avoid bugs.  

The argument for the current behavior is that the programmer has the
convenience of specifying only what is needed, which may simplify the code
and make it more readable and maintainable.  


nophead wrote
> I think it should warn if you don't pass a vector of vectors, but other
> than that, what is the point in tightening up the size requirements?
> 
> On Wed, 3 Jul 2019 at 22:24, adrianv <

> avm4@

> > wrote:
> 
>> This sounds like pretty intentional behavior.  Is there a prevailing (or
>> at
>> least common) belief that it's wrong and needs to change?
>>
>>
>> nophead wrote
>> > The code
>> > <
>> https://github.com/openscad/openscad/blob/69bf5a55475102be43c2ddc698198e85821332b3/src/transform.cc#L204&gt
>> ;
>> > creates
>> > a 4x4 identity matrix and then for each element it looks to see if the
>> > corresponding element exists in the passed matrix and if it does it
>> > overwrites that entry.
>> >
>> > So basically it tries as hard as it can to convert any shape matrix to
>> > fit.
>> > Any element it can't find is left as the value from the identity. If
>> the
>> > argument isn't even a matrix it silently uses the identity.
>>
>>
>>
>>
>>
>> --
>> Sent from: http://forum.openscad.org/
>>
>> _______________________________________________
>> OpenSCAD mailing list
>> 

> Discuss at .openscad

>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>
> 
> _______________________________________________
> OpenSCAD mailing list

> Discuss at .openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





--
Sent from: http://forum.openscad.org/



More information about the Discuss mailing list