Hello,
so I have been trying to extract sections from a 3D model.
I have followed the wiki and I manage to have a good result, my main issue is how to extract it from cloudcompare to use it elsewhere
my workflow
1 first I import a shapefile with the line sections I want to use
2 I select the vertexes of my 3d model
3 I go to Tools/segmentation/Extract sections
4 I import the line section to the DB
5 I apply extract points along active sections
at this point I have my section created and stored in the "Extracted profiles"
now I would to like to export the result to use it in QGIS
I have tried out most of the options, so my question is it is possible to export the result with distance (projected distande on xy plane relative to origin) and height as coordinates?
for the moment what I do is export the ascii points and calculate the distance in a sheet, but I saw that a shapefile export of the line is available, the only problem is that the file saved is the projection on the XY plane...which is exactly the file I imported in the first place to create the section. It would be much more useful to have the projected distance to origin on xy plane vs Z as coordinates. Is it possible to extract that?
Is it possible to export extracted profile for 2D visualisation?
Re: Is it possible to export extracted profile for 2D visualisation?
Hum, not sure to understand. Why not extracting profiles (lines) instead of points? And then export the resulting profile as SHP file? You might also get a better profile by sampling a lot of points on your mesh first.
But I guess I'm missing something...
But I guess I'm missing something...
Daniel, CloudCompare admin
Re: Is it possible to export extracted profile for 2D visualisation?
thank you for your answer, and thanks for the tip on sampling mesh first, that is very useful
You are right, having the lines would be the better option for me
I did exactly what you said, export the resulting profile as a shapefile,
it gives the option of the vertical dimension
when I choose Z as a vertical dimension, I get the projection on the XY plane so I lose the profile
when I choose Y as vertical dimension ,I have the height value as X coordinates, ans the projected Y value as the Y coordinate
when I chose X as a vertical dimension, I get projected as X and height as Y
and they are not what I need, what I need is Distance as X and height as Y in order to open it in Qgis
that is why I export points with X Y and Z values
then I calculate distance to origin for each point
and import file as txt so I can put the distance and height as coordinates
and the compute the line profile
I was asking if there is a way no to do all these steps and have directly the line as explained here or any other shortcut I did not think of
maybe I should have posted in the request section, sorry about that
You are right, having the lines would be the better option for me
I did exactly what you said, export the resulting profile as a shapefile,
it gives the option of the vertical dimension
when I choose Z as a vertical dimension, I get the projection on the XY plane so I lose the profile
when I choose Y as vertical dimension ,I have the height value as X coordinates, ans the projected Y value as the Y coordinate
when I chose X as a vertical dimension, I get projected as X and height as Y
and they are not what I need, what I need is Distance as X and height as Y in order to open it in Qgis
that is why I export points with X Y and Z values
then I calculate distance to origin for each point
and import file as txt so I can put the distance and height as coordinates
and the compute the line profile
I was asking if there is a way no to do all these steps and have directly the line as explained here or any other shortcut I did not think of
maybe I should have posted in the request section, sorry about that
Re: Is it possible to export extracted profile for 2D visualisation?
So one thing you can do is swap any coordinate with the Distances scalar field. You simply have to use the 'Edit > Scalar fields > Set SF as coordinate(s)' tool.
You could do that on the polyline vertices (the cloud just below the polyline entities in the DB tree). Just before exporting them to SHP.
(and with this method, and its counterpart 'Export coordinate(s) to SF', you can also swap coordinates, etc. - or with the right transformation matrix and the 'Edit > Apply transformation' tool if you are confortable with those)
You could do that on the polyline vertices (the cloud just below the polyline entities in the DB tree). Just before exporting them to SHP.
(and with this method, and its counterpart 'Export coordinate(s) to SF', you can also swap coordinates, etc. - or with the right transformation matrix and the 'Edit > Apply transformation' tool if you are confortable with those)
Daniel, CloudCompare admin
Re: Is it possible to export extracted profile for 2D visualisation?
ok, thanks for that, swaping SF to coordinates should do the trick...if I am capable to compute the projected Distance of my section
one solution I see is
export coordinates as SF
create X0 constant SF with X of first point
create Y0 constant SF with Y of first point
use Edit/scalar fields/arithmetic to
compute DX2=(X-X0) power2
compute DY2=(Y-Y0) power2
and finally distance D= SQRT(DX2+DY2)
but exporting the XYZ ascii and computing distances is much easier
I can't find a way to compute this distance before swaping as coordinate. Is it possible?
one solution I see is
export coordinates as SF
create X0 constant SF with X of first point
create Y0 constant SF with Y of first point
use Edit/scalar fields/arithmetic to
compute DX2=(X-X0) power2
compute DY2=(Y-Y0) power2
and finally distance D= SQRT(DX2+DY2)
but exporting the XYZ ascii and computing distances is much easier
I can't find a way to compute this distance before swaping as coordinate. Is it possible?
Re: Is it possible to export extracted profile for 2D visualisation?
You could create a single point cloud (with 'Edit > Cloud > Create Single Point Cloud'). Then compute the distance from this 'unique point' cloud maybe? Just throwing some ideas in the air...
Daniel, CloudCompare admin