[cad-linux] Re: An open CAD file format

  • From: Eric Wilhelm <ewilhelm@xxxxxxxxxxxxx>
  • To: cad-linux@xxxxxxxxxxxxx
  • Date: Sun, 7 Sep 2003 16:26:31 -0500

> The following was supposedly scribed by
> Massimiliano Mirra
> on Sunday 07 September 2003 01:30 pm:

>Associative
>arrays are one more, lightweight, option, e.g. should a file be
>organized like this:
>
>    rectangle: 1 1 4 4
>    line: 0 0 10 5
>    circle: 35 30 2
>
>...and a bash script only understands `rectangle' and `line', it can
>just work on `rectangle' and `line' lines and leave the rest
>untouched.

Taking this up one level:

What if the line is defined parametrically via the 3D points A and B?

    rectangle: 1 1 4 4
    line: A B
    circle: 35 30 2

Where:

        point("A"): 0 0 3
        point("B"): 10 5 0

Does the bash script see "line A B" or should it see "line: 0 0 10 5"?

Is the script responsible for tracking down this data?  If so, we are then 
unable to apply simple 2D methods to a 3D or parametric 3D model (or even 
just a parametric 2D definition.)

Could an abstraction layer be created which would allow the script to declare 
that it expects 2D static data?  If this is the case, the abstraction layer 
could expose the line as read-only and simply show the script:  
        line:  0 0 10 5
Of course, any attempts to in-place-modify the line would need to fail or else 
when a parametric program moves point A or tries to build a relationship from 
"line", it will be improperly defined.

--Eric

Other related posts: