I try to draw city roads. Using TGLLines is result fine (see attachment) but since the speed is slow on zooming/rotation, I switch to TMeshLines. But then I have very strange result by diffeent linewidth (see attachment),
I have following codes for TMeshLines as:
functionCreateNewMeshLineItem(OwnerPlane:TGLPlane; var MeshLine:TMeshLines3D):TLineItem;varFGLMeshLines:TGLMeshLines;begin//wewillhaveonlyoneMeshlineforoneplanetoholdalltheroads//andeachroadisaoneTLineItemifFGLMeshLines=nilthenbeginFGLMeshLines:=TMeshLines(CityPlane.AddNewChild(TMeshLines));//donotforgetEndUpdateatfinishingloadingroadsFGLMeshLines.BeginUpdate;FGLMeshLines.NoZWrite:=True;FGLMeshLines.ShowNodes:=False;FGLMeshLines.Material.FrontProperties.Emission.Color:=clrGold;end;//weneedanewlineitemforanewroad,Result:=FGLMeshLines.Lines.Add;Result.Name:='Road'+IntToStr(FGLMeshLines.Lines.Count);//defaultResult.SplineMode:=lsmLines;Result.Division:=1;Result.TextureCorrection:=False;Result.BreakAngle:=-1;Result.TextureLength:=0.1;Result.Width:=1;Result.Nodes.Clear;end;
Is there any setting I have missed, who will make TMeshlines looked as normal lines?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here in attachment is the code to demo. Please select the 'road.mif" file in attachment, who contains the road data in city.
by default, we will use the TMeshline with linewidth 0.1, and after you uncheck the "use TMeshline", TGLLines will be used, and then you can compare the result.
I have not been able to compile your code (units missing), but try to offset
the lines from the plane. The effects shown in the image are typical when
objects have the exact same coordinate.
Lars
Fra: Liang Rong [mailto:easyblue@users.sf.net]
Sendt: 7. maj 2016 02:30
Til: [glscene:discussion]93606@discussion.glscene.p.re.sf.net
Emne: [glscene:discussion] Strange TGLMeshLines display
Hello
Here in attachment is the code to demo. Please select the 'road.mif" file in
attachment, who contains the road data in city.
by default, we will use the TMeshline with linewidth 0.1, and after you
uncheck the "use TMeshline", TGLLines will be used, and then you can compare
the result.
Sorry I have forgotten to remove the Eurekalog units, which is used to catch exceptions.
So I update the source and upload it again.
This "road.mif" is a high-resoltion mapinfo map of city Shanghai, so at the road crossing, and road turns, the coordinates may be the same, while in a large scale, the coordinates reflect the actual longtitude and latitude of each road segments, which can be see from the display using TGLLine.
Many units are still missing (AdvTrackBar, MemDS, DBAccess, MyAccess,
MyDacVcl, CodeSiteLogging)
Have you tried what I suggested?
Offset the lines from the plane vertically - or try to turn off the plane
Lars
Fra: Liang Rong [mailto:easyblue@users.sf.net]
Sendt: 9. maj 2016 12:46
Til: [glscene:discussion]93606@discussion.glscene.p.re.sf.net
Emne: [glscene:discussion] Strange TGLMeshLines display
Hi
Sorry I have forgotten to remove the Eurekalog units, which is used to catch
exceptions.
So I update the source and upload it again.
This "road.mif" is a high-resoltion mapinfo map of city Shanghai, so at the
road crossing, and road turns, the coordinates may be the same, while in a
large scale, the coordinates reflect the actual longtitude and latitude of
each road segments, which can be see from the display using TGLLine.
Sorry I have forgotten to remove the Eurekalog units, which is used to catch exceptions.
So I update the source and upload it again.
This "road.mif" is a high-resoltion mapinfo map of city Shanghai, so at the road crossing, and road turns, the coordinates may be the same, while in a large scale, the coordinates reflect the actual longtitude and latitude of each road segments, which can be see from the display using TGLLine.
Hey, please check your demo project before uploading. It cannot compile!
If I make it compile by removing links to the missing units, it seems that
the mif-file is not loaded, and no lines are shown.
And, I am not going to help you any further until you at least try my
suggestions!
Fra: Liang Rong [mailto:easyblue@users.sf.net]
Sendt: 9. maj 2016 13:35
Til: [glscene:discussion]93606@discussion.glscene.p.re.sf.net
Emne: [glscene:discussion] Strange TGLMeshLines display
Hi
Sorry I have forgotten to remove the Eurekalog units, which is used to catch
exceptions.
So I update the source and upload it again.
This "road.mif" is a high-resoltion mapinfo map of city Shanghai, so at the
road crossing, and road turns, the coordinates may be the same, while in a
large scale, the coordinates reflect the actual longtitude and latitude of
each road segments, which can be see from the display using TGLLine.
I am really sorry, that the source code is not clean enough.
Now I checked line by line, and removed all other third-party component and debug utilities.
The mif file is loaded by clicking the button, and then an file open dialog will come out to select this mif file, who should be in the source code folder not in the bin folder.
In case of any other problem, please feel free to contact me.
Hello
I try to draw city roads. Using TGLLines is result fine (see attachment) but since the speed is slow on zooming/rotation, I switch to TMeshLines. But then I have very strange result by diffeent linewidth (see attachment),
I have following codes for TMeshLines as:
Is there any setting I have missed, who will make TMeshlines looked as normal lines?
Thanks.
Here is the attachment for using TGLLine
Last edit: Liang Rong 2016-05-05
using Meshlines
TGLMeshLines with a different linewidth
Hi, Liang
Please, attach your project to look at object properties in your form
and check the code in sample demo
https://sourceforge.net/p/glscene/code/HEAD/tree/branches/Examples/MeshLines/
Hello
Here in attachment is the code to demo. Please select the 'road.mif" file in attachment, who contains the road data in city.
by default, we will use the TMeshline with linewidth 0.1, and after you uncheck the "use TMeshline", TGLLines will be used, and then you can compare the result.
Thanks.
Hi
I have not been able to compile your code (units missing), but try to offset
the lines from the plane. The effects shown in the image are typical when
objects have the exact same coordinate.
Lars
Fra: Liang Rong [mailto:easyblue@users.sf.net]
Sendt: 7. maj 2016 02:30
Til: [glscene:discussion] 93606@discussion.glscene.p.re.sf.net
Emne: [glscene:discussion] Strange TGLMeshLines display
Hello
Here in attachment is the code to demo. Please select the 'road.mif" file in
attachment, who contains the road data in city.
by default, we will use the TMeshline with linewidth 0.1, and after you
uncheck the "use TMeshline", TGLLines will be used, and then you can compare
the result.
Thanks.
Attachments:
https://sourceforge.net/p/glscene/discussion/93606/thread/a47f0ac0/da89/att achment/meshtest.zip (2.4 MB; application/zip)
Strange TGLMeshLines display
https://sourceforge.net/p/glscene/discussion/93606/thread/a47f0ac0/?limit=2 5#da89
Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/glscene/discussion/93606/
To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/
Hi
Sorry I have forgotten to remove the Eurekalog units, which is used to catch exceptions.
So I update the source and upload it again.
This "road.mif" is a high-resoltion mapinfo map of city Shanghai, so at the road crossing, and road turns, the coordinates may be the same, while in a large scale, the coordinates reflect the actual longtitude and latitude of each road segments, which can be see from the display using TGLLine.
Many units are still missing (AdvTrackBar, MemDS, DBAccess, MyAccess,
MyDacVcl, CodeSiteLogging)
Have you tried what I suggested?
Offset the lines from the plane vertically - or try to turn off the plane
Lars
Fra: Liang Rong [mailto:easyblue@users.sf.net]
Sendt: 9. maj 2016 12:46
Til: [glscene:discussion] 93606@discussion.glscene.p.re.sf.net
Emne: [glscene:discussion] Strange TGLMeshLines display
Hi
Sorry I have forgotten to remove the Eurekalog units, which is used to catch
exceptions.
So I update the source and upload it again.
This "road.mif" is a high-resoltion mapinfo map of city Shanghai, so at the
road crossing, and road turns, the coordinates may be the same, while in a
large scale, the coordinates reflect the actual longtitude and latitude of
each road segments, which can be see from the display using TGLLine.
Attachments:
https://sourceforge.net/p/glscene/discussion/93606/thread/a47f0ac0/48b0/att achment/meshtest.zip (2.6 MB; application/zip)
Strange TGLMeshLines display
https://sourceforge.net/p/glscene/discussion/93606/thread/a47f0ac0/?limit=2 5#48b0
Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/glscene/discussion/93606/
To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/
Hi
Sorry I have forgotten to remove the Eurekalog units, which is used to catch exceptions.
So I update the source and upload it again.
This "road.mif" is a high-resoltion mapinfo map of city Shanghai, so at the road crossing, and road turns, the coordinates may be the same, while in a large scale, the coordinates reflect the actual longtitude and latitude of each road segments, which can be see from the display using TGLLine.
Hey, please check your demo project before uploading. It cannot compile!
If I make it compile by removing links to the missing units, it seems that
the mif-file is not loaded, and no lines are shown.
And, I am not going to help you any further until you at least try my
suggestions!
Fra: Liang Rong [mailto:easyblue@users.sf.net]
Sendt: 9. maj 2016 13:35
Til: [glscene:discussion] 93606@discussion.glscene.p.re.sf.net
Emne: [glscene:discussion] Strange TGLMeshLines display
Hi
Sorry I have forgotten to remove the Eurekalog units, which is used to catch
exceptions.
So I update the source and upload it again.
This "road.mif" is a high-resoltion mapinfo map of city Shanghai, so at the
road crossing, and road turns, the coordinates may be the same, while in a
large scale, the coordinates reflect the actual longtitude and latitude of
each road segments, which can be see from the display using TGLLine.
Attachments:
https://sourceforge.net/p/glscene/discussion/93606/thread/a47f0ac0/97ea/att achment/meshtest.zip (2.6 MB; application/zip)
Strange TGLMeshLines display
https://sourceforge.net/p/glscene/discussion/93606/thread/a47f0ac0/?limit=2 5#97ea
Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/glscene/discussion/93606/
To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/
Hello
I am really sorry, that the source code is not clean enough.
Now I checked line by line, and removed all other third-party component and debug utilities.
The mif file is loaded by clicking the button, and then an file open dialog will come out to select this mif file, who should be in the source code folder not in the bin folder.
In case of any other problem, please feel free to contact me.
Did you solve the problem?
Last edit: Dmitry 2017-02-07