Forum

Author Topic: Create and export faces inside a loaded shape  (Read 5464 times)

Liesenfeld-Vermessung

  • Newbie
  • *
  • Posts: 12
    • View Profile
Create and export faces inside a loaded shape
« on: September 14, 2017, 12:44:08 PM »
Task:
Create and export faces only inside a loaded shape (which is defined as outer border)

 
Description:
I am working on a project of a landfill. It is georeferenced by using GCP’s. I aligned the photos, created the dense point-cloud and generated a mesh and a DEM.
Now, i imported a shape, which defines the outer border of the landfill, which was used for the volume measurements, before we started using Agisoft Photoscan.
In former times, we calculated the volume down on a reference height. In Agisoft, I can do the same by right-clicking on the shape, clicking on survey. Then I switch to the volume tab and change the base level from “best fit” to “user defined height” and click on update.

Problem:
Because our clients don’t use Agisoft Photoscan, they need a DXF file containing 3D faces.
I can export the whole mesh from Agisoft and delete the faces I don’t need, but then the faces near the border don’t end exactly at the border (see the screenshot).

The 3D faces should either be cut on the border or it should be possible to create a mesh only inside a loaded shape. Otherwise, when our clients recalculate the volume, using our exported 3D faces, they don’t get the same result. The final result should look like this (see the screenshot)



SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Create and export faces inside a loaded shape
« Reply #1 on: September 14, 2017, 01:36:51 PM »
Hi Liesenfeld-Vermessung,

One solution to your problem I can think of is to export the DEM as a XYZ file at a lower resolution and then do the meshing in your CAD software package.

Here is the workflow:

1. Double click on the DEM in the PhotoScan workspace pane to open it

2. Right click on your boundary/shape that outlines your landfill and choose SET BOUNDARY TYPE > OUTER BOUNDARY. This will guarantee that only points inside the shape will be included when you export your DEM.

3. Then right click on the DEM in the workspace pane, choose EXPORT DEM > EXPORT TIFF/BIL/XYZ

4. Change the pixel size to match your requirements (0.25 m for X and 0.25 for Y is probably more than you need; your mesh looks quite coarse in the screenshots)

5. Click EXPORT and choose XYZ as file type. It will only export points that lie within the shape that was set to OUTER BOUNDARY.

The XYZ file simply contains a list of points with X, Y and Z coordinates (can be read with any editor). You should be able to open such a file with any CAD software package and generate a mesh from it. Then use the mesh for volume calculations. Note that there will be volumetric differences between your measurements in PhotoScan (based on a high-res DEM) and the mesh that is based on a lower resolution dataset. Unfortunately, most CAD packages have issues when loading large point clouds or meshes, hence you cannot use the dataset at its full fidelity.

I hope this works for you.

Regards,
SAV

« Last Edit: September 14, 2017, 01:39:18 PM by SAV »

Liesenfeld-Vermessung

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Create and export faces inside a loaded shape
« Reply #2 on: September 14, 2017, 01:44:26 PM »
Hello SAV,

thank you for this solution. I'll give it a try.
At the moment i load the 3d faces into AutoCad, then i convert them into regions. In the next step i cut the regions on my border. This step is a lot of work, because i have to click inside every region i want to cut. Afterwards, i use the command _meshsmooth to convert the regions into a 3D-Net and finally i use _explode to convert them back into 3D-faces. Very time consuming!  :(

Is there no way to generate a mesh only inside a given shape using Agisoft Photoscan?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14855
    • View Profile
Re: Create and export faces inside a loaded shape
« Reply #3 on: September 14, 2017, 01:46:32 PM »
Hello Liesenfeld-Vermessung,

Currently mesh is generated inside the bounding box (region box) and doesn't take into consideration the shapes defined as boundaries both for mesh generation and export operations.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Liesenfeld-Vermessung

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Create and export faces inside a loaded shape
« Reply #4 on: September 14, 2017, 01:50:47 PM »
Hello Alexey Pasumansky,

is it planned to support the generation of a mesh inside a shape, or should i post it in the feature request sub forum?

Liesenfeld-Vermessung

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Create and export faces inside a loaded shape
« Reply #5 on: September 14, 2017, 02:19:38 PM »
Hey SAV,

i tried your solution and it works perfect!  ;D
Thank you very much!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14855
    • View Profile
Re: Create and export faces inside a loaded shape
« Reply #6 on: September 14, 2017, 02:30:11 PM »
is it planned to support the generation of a mesh inside a shape, or should i post it in the feature request sub forum?

We are considering such possibility for some future updates.
Best regards,
Alexey Pasumansky,
Agisoft LLC

SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Create and export faces inside a loaded shape
« Reply #7 on: September 14, 2017, 06:56:23 PM »
Great. Good to hear that it worked for you.

Would be nice if PhotoScan was able to crop/trim a mesh based on a shape. But the beauty of PhotoScan is its flexibility; there are almost always several ways do get what you need.  :D

Regards,
SAV

P.S. I've just added a post regarding this topic in the feature request section of this forum  :D


Hey SAV,

i tried your solution and it works perfect!  ;D
Thank you very much!
« Last Edit: September 14, 2017, 07:01:07 PM by SAV »