Shubham,
The "first input point" part sounds good.
Then we need a list. You could look at the sketch or pipe how they
are doing it. We can have multiple texts and lines in any order here.
Regarding the text position, I would use flags, e.g. "bl" or "cc"
which means [t]op, [b]ottom, [l]eft, [r]ight, [c]enter. (What is
"none"?)
Keep in mind that this is the basic command to create any annotation.
There may be additional convenience functions as (a hypothetical)
"annotate <region> <text>" which creates a line with predefined length
and angle from the center of the region and puts the text at the end
of it. But first, you have to create the foundation: The basic
annotation primitive with its command line interface.
Regards,
Daniel
2017-06-13 19:18 GMT+02:00 Shubham Rathore <[email protected]>:
> Sir,
>
> Regarding the input, what I thought it to be:
>
> static char *p_anno[] = {
> "Enter the point to be annotated: ",
> "Enter Y: ",
> "Enter Z: ",
> "Enter the text label: ",
> "Enter X,Y for the text placement: ",
> "Enter Y: ",
> "Enter the relative vertical position(1->bottom, 2->middle, 3->top,
> 4->none): ",
> "Enter the relative horizontal position(1->right, 2->center, 3->left,
> 4->none): ",
> "Enter the start point for the line segment(X,Y): ",
> "Enter Y: ",
> "Enter the end point for the line segment(X,Y): ",
> "Enter Y: ",
> };
>
>
>
> The First input point can be mapped to the origin in the 2D coordinate
> system.
> This is basically the point which the user wants to annotate.
> The next input points i.e. for the text placement and line segment coords,
> can be entered accordingly.
> I have defined a total of 15 placement flags( refer the latest geom.patch
> update)
> This way it becomes easy for the user to enter the position, which is
> internally appended to find the exact position.
> This way we can fill all the params of the internal object.
> This is currently only for the line segment, which can be extended to
> arc,nurb, beizer etc.
> Next step will be the coordinate plane representation and mapping.
>
> Inputs !
>
> Regards,
> Shubham Rathore(:gabbar1947)
>
> On Mon, Jun 12, 2017 at 2:43 PM, Daniel Roßberg <[email protected]>
> wrote:
>>
>> Shubham,
>>
>> > 1) In which file do you think, the placement flag values should be
>> > defined ?
>>
>> include/rt/geom.h
>> Other primitives define their flags there too.
>>
>> > 2) regarding the input. It was decided that the input will be through
>> > the
>> > "in" command:
>> > - in "parameters"
>> > - what all parameters are desired ?
>>
>> The parameters which are needed to fill the rt_anno_internal(?)
>> structure. The sketch should be a good template for how it should
>> look like for the annotation.
>>
>> > 3) if we talk about line segment , then user can input the point to be
>> > annotated and the coords of the line segment.
>> > but for beizer, nurb etc. we will need the editor. suggestions please.
>>
>> Again: Similar as for the sketch. It can be created with an "in" too.
>> The annotation has a parameter "anchor point in 3D space" plus a list
>> of 2D segments. It should be possible to use a large portion of the
>> sketch code which interprets the TCL input for the annotation.
>>
>> You should aim for getting a line on the screen. When you are able to
>> see what you are doing it will make the live easier.
>>
>>
>> Regards,
>> Daniel
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> BRL-CAD Developer mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> BRL-CAD Developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel