kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #06402
Re: Sweet parser
On 4/4/2011 12:15 PM, Dick Hollenbeck wrote:
> On 04/04/2011 10:40 AM, Chris Giorgi wrote:
>> On Mon, Apr 4, 2011 at 06:59, Dick Hollenbeck <dick@xxxxxxxxxxx> wrote:
>> -snip-
>>> If anything looks long winded (overly verbose), the next couple of weeks
>>> would be a good time to make those 11th hour changes.
>>>
>>> 'line_width' as a keyword name, seems a bit long to me, but its a minor deal.
>>>
>>> Overall, hopefully it still looks sweet.
>>
>> Hi Dick,
>> The grammar is looking great! I have a few suggestions regarding line
>> styling, including obviating the line_width keyword: Create a 'stroke'
>> property for the stroke of a figure, and within 'stroke' define a
>> 'weight' attribute to replace the 'line_width' property. The 'stroke'
>> property could also include a 'style' attribute , allowing for dashed
>> lines, and perhaps even an 'endpoint' attribute, allowing for arrow
>> heads and tails. This would be consistent with most vector graphics
>> packages, and I would consider it highly desirable functionality in
>> some circumstances.
>>
>> (rectangle (start -5 -14) (end 5 14) (stroke (weight 1.2) (style
>> (dashed 0.5 0.1)) (fill none))
>>
>> Draw an unfilled rectangle from (-5,-14) to (5,14) using a pen weight
>> of 1.2, with dashes 0.5 long with 0.1 spaces between each dash.
>>
>>
>> (line (start 1 3) (end 2 5) (stroke (weight 1.0) (style solid)
>> (endpoint tail head)))
>>
>> Draw a solid line segment from (1,3) to (2,5) using a pen weight of
>> 1.2. Decorate the start with a standard tail shape and the end with a
>> standard head shape.
>>
>> A few open questions:
>> One issue that I'm unclear about is what the units for the
>> 'line_width' were, and what they should be for 'stroke(weight)'.
>
>
> (line_width WIDTH) has WIDTH as a "percent of a logical unit".
>
> So 1.5 would be 1.5 percent of a logical unit, or .015 logical units.
> A logical unit is defined as the standard distance between two neighboring
> schematic pins, a dimensionless number. See the *.odt file in /new for more
> info.
>
> This grammar is specific to schematic parts. I won't talk about eventual
> PCBNEW requirements at this time.
>
> My concern about line_width was lack of brevity, so now instead of
>
> (line_width 1.2) we now have
>
> (stroke (weight 1.2) (style (dashed 0.5 0.1))
I like it. It's more descriptive and flexible.
>
>
> We are going in the wrong direction regarding brevity :)
>
> Maybe we can have defaults, and get rid of the weight wrapper:
We currently have default line widths. If line does have a width, then the
default applies.
>
>
> (stroke 1.2) which is now shorter than:
> (line_width 1.2)
>
> This is an improvement that gives us a container element in which to add in
> the fancy lines when not using default solid line:
>
> (stroke 1.2 (style (dashed 0.5 0.1))
>
>
>
>> Another question is should the 'fill' of a polygon outline in fact be
>> transparent, or should it be nonexistent? Should transparency be an
>> alpha channel so we can stack things, and if so, how is the stacking
>> order determined? What does it mean for text to have the '(fill
>> filled)' attribute? Would you be adverse to allowing for non-solid
>> fills, perhaps hatching similar to that in AutoCAD?
I don't see much need for alpha blending in the schematic editor. You
typically don't stack things on top of one another in a schematic.
Unfilled text is outlined text. Kicad's internal font implementation draws
lines and curves and fills everything within the lines. I the case of text,
filled would be the default setting. You can see what unfilled text would look
like in PCBNew be enabling the outline draw mode.
Wayne
>
> Wayne or others can comment on the other suggestions. I don't see us
> stacking things in a 2D schematic editor.
>
> I would not be opposed to showing it in 3D however, so long as we can see
> each side of the cylindrical wires.
> I'll bring the wire nuts.
>
>
>> Looks SWEET so far!
>
> Thanks.
>
> Dick
>
>> Take care,
>> ~~~Chris Giorgi~~~
>>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References
-
Sweet parser
From: Dick Hollenbeck, 2010-12-30
-
Re: Sweet parser
From: Wayne Stambaugh, 2010-12-30
-
Re: Sweet parser
From: Dick Hollenbeck, 2010-12-30
-
Re: Sweet parser
From: Wayne Stambaugh, 2010-12-30
-
Re: Sweet parser
From: Dick Hollenbeck, 2010-12-30
-
Re: Sweet parser
From: Dick Hollenbeck, 2011-01-03
-
Re: Sweet parser
From: Dick Hollenbeck, 2011-01-03
-
Re: Sweet parser
From: Wayne Stambaugh, 2011-01-03
-
Re: Sweet parser
From: Dick Hollenbeck, 2011-02-14
-
Re: Sweet parser
From: Dick Hollenbeck, 2011-02-28
-
Re: Sweet parser
From: Dick Hollenbeck, 2011-03-21
-
Re: Sweet parser
From: jean-pierre charras, 2011-03-21
-
Re: Sweet parser
From: Dick Hollenbeck, 2011-03-21
-
Re: Sweet parser
From: jean-pierre charras, 2011-03-21
-
Re: Sweet parser
From: Dick Hollenbeck, 2011-03-22
-
Re: Sweet parser
From: Dick Hollenbeck, 2011-03-23
-
Re: Sweet parser
From: Dick Hollenbeck, 2011-03-24
-
Re: Sweet parser
From: Wayne Stambaugh, 2011-03-25
-
Re: Sweet parser
From: Dick Hollenbeck, 2011-03-25
-
Re: Sweet parser
From: Wayne Stambaugh, 2011-03-25
-
Re: Sweet parser
From: Dick Hollenbeck, 2011-03-25
-
Re: Sweet parser
From: Dick Hollenbeck, 2011-03-25
-
Re: Sweet parser
From: Wayne Stambaugh, 2011-03-26
-
Re: Sweet parser
From: Dick Hollenbeck, 2011-04-04
-
Re: Sweet parser
From: Dick Hollenbeck, 2011-04-04