STL Mesh to Part. Need some ideas for getting photogrammetry to FreeCAD part

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
wwwsam
Posts: 5
Joined: Thu Sep 30, 2021 1:54 am

STL Mesh to Part. Need some ideas for getting photogrammetry to FreeCAD part

Post by wwwsam »

Hi,

Im fairly new to CAD in general and I've run into a dead end trying to get a mesh model of my car boot (created by photogrammetry) into a workable FreeCAD part.

Ultimately, I would like to model the curves behind the rear wheel arch so that I can make an enclosure that fits snuggly in the area.

I've tried Mesh Design and Part WB and haven't really gotten very far.
Out of desperation I've managed to make a cutout using the cut boolean operation. However, I cannot apply the thickness tool on it as it errors out.

Whats the best way to go about this?
Will I have to just suck it up and just try to trace it? If so, is there a good tutorial/suggestions on tracing/drawing curved shapes?

Edit: Doing a Part->Cross-sections might be a way forward. However, I can only Loft 2 cross-sections at a time, otherwise I get "DRepFill :: profiles are inconsistent".

I have attached some screenshots for a better idea:



The original Mesh model:
Capture1.PNG
Capture1.PNG (911.36 KiB) Viewed 2451 times

Decimated mesh model:
Capture2.PNG
Capture2.PNG (246.23 KiB) Viewed 2451 times

Rear of the Lazy cutout that doesn't work:
Capture3.PNG
Capture3.PNG (174.29 KiB) Viewed 2451 times

Any help/suggestions are appreciated.
User avatar
thomas-neemann
Veteran
Posts: 11919
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: STL Mesh to Part. Need some ideas for getting photogrammetry to FreeCAD part

Post by thomas-neemann »

wwwsam wrote: Thu Sep 30, 2021 5:54 am

is that helpful? from min 2:30

https://www.youtube.com/watch?v=1oH7X3fk56o


phpBB [video]


3.png
3.png (45.19 KiB) Viewed 2416 times
1.png
1.png (164.93 KiB) Viewed 2416 times

2.png
2.png (163.45 KiB) Viewed 2416 times
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: STL Mesh to Part. Need some ideas for getting photogrammetry to FreeCAD part

Post by TheMarkster »

Nice looking scan. How did you make the mesh? Was it with a phone camera and a 3d scanner app or a hand held 3d scanner? I have access to a handheld scanner, but it didn't come with any software and all I can find is a developer sdk with no examples of outputting to a file.
wwwsam
Posts: 5
Joined: Thu Sep 30, 2021 1:54 am

Re: STL Mesh to Part. Need some ideas for getting photogrammetry to FreeCAD part

Post by wwwsam »

@thomas-neemann
I don't have too much time to work on it today, but the meshlab->filter->poisson surface thing seems to have made the mesh much nicer to work with.
Thanks heaps for the video!

@TheMarkster
The mesh was made in RealityCapture. (Unfortunately you need to pay to export the model)
RealityCapture is great for modelling 3D things but not so great for mapping.

For hardware, I used the Sony a7riv dslr with a 50mm macro (what i had on hand).
However it is very possible to achieve same results with proper lighting and sharp images from different angles with plenty of overlap.
I have modelled things with phone camera, gopro etc. Its a little more difficult to work with then a DSLR, but the results can be compareable.
jeno
Veteran
Posts: 1850
Joined: Sun Jun 29, 2014 10:41 am

Re: STL Mesh to Part. Need some ideas for getting photogrammetry to FreeCAD part

Post by jeno »

TheMarkster wrote: Thu Sep 30, 2021 9:10 pm Nice looking scan. How did you make the mesh? Was it with a phone camera and a 3d scanner app or a hand held 3d scanner? I have access to a handheld scanner, but it didn't come with any software and all I can find is a developer sdk with no examples of outputting to a file.
(handheld) 3D Scanner usually save only Point Cloud data. You can use for example Cloudcompare for postprocessing (point set registration, surface reconstruction and so on).

@wwwsam
Would you mind sharing the mesh file?

Regards
domad
Veteran
Posts: 2094
Joined: Mon Jun 22, 2020 12:16 pm

Re: STL Mesh to Part. Need some ideas for getting photogrammetry to FreeCAD part

Post by domad »

wwwsam wrote: Fri Oct 01, 2021 1:59 am .....
Hello wwwsam, greetings to the Community!
... as requested/suggested in the previous replicas, attach the mesh to give the possibility to carry out a more specific study, but in my opinion it would be more appropriate to attach the point cloud, even better attach both.
Remember that you can attach files up to 1 Mb, if larger you must use a cloud service indicating the download link (if you decide to do so remember to set the download open.
wwwsam
Posts: 5
Joined: Thu Sep 30, 2021 1:54 am

Re: STL Mesh to Part. Need some ideas for getting photogrammetry to FreeCAD part

Post by wwwsam »

@jeno @domad
Thank you for the reply!

Here's a link to the *.stl and *.las
https://www.dropbox.com/sh/fhli1etav4ie ... kUlJa?dl=0

The longer the *.stl name the smaller the file/less faces (as some people may not be able to open full size)
ie. Rotated = rotated approx -24.5 degree in meshmixer on Z axis so XYZ roughly align
Poissonn/decimate = filters in meshmixer

I played with it a bit more bit cannot apply thickness on the part.
All thickness seems to do is generate some dots of noise. Maybe the shape is too complex?
mrdic
Posts: 132
Joined: Wed May 10, 2017 4:25 am

Re: STL Mesh to Part. Need some ideas for getting photogrammetry to FreeCAD part

Post by mrdic »

The shape is quite a simple prismatic shape, most of the surfaces are curved for strength instead of flat. It's not too complex - but it is too noisy. Scans try to give you copious explicit points on surfaces that are essentially smooth (probably roughened by underseal or other finish coating in this case), but the scan deviation error makes them appear rough. You'll need to pass smooth profiles through the surfaces, ie very simplified from the scan data, and rebuild them, but this shape isn't too bad, I can see around 12 discrete surfaces, filleting will reconcile their edges. There are automatic, or semi-auto methods to rebuild these smoothly, but they're expensive. I use Rhino and Cyborg 3D to do it in my practice, that's at the bottom end and the results are arbitrary, not parametric or feature-based.
User avatar
thomas-neemann
Veteran
Posts: 11919
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: STL Mesh to Part. Need some ideas for getting photogrammetry to FreeCAD part

Post by thomas-neemann »

wwwsam wrote: Thu Sep 30, 2021 5:54 am Hi,
you can model it in freecad like here from min 5:30


https://www.youtube.com/watch?v=9PNQSm0Q6SI


phpBB [video]
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
mrdic
Posts: 132
Joined: Wed May 10, 2017 4:25 am

Re: STL Mesh to Part. Need some ideas for getting photogrammetry to FreeCAD part

Post by mrdic »

Mesh WB has cross section cap ability, I passed a few through your scan, they're a great start to reconstructing it.
Something to think about for this is that .stl describes a volume and the skirts that give this object volume are irrelevant to its shape, but obstruct views of the surfaces you want. .obj objects as output from scans can be surfaces without volume.
cross sections.png
cross sections.png (652.12 KiB) Viewed 1973 times
Post Reply