Point

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
makafaka
Posts: 6
Joined: Sun May 30, 2021 9:06 pm

Point

Post by makafaka »

I have tried distToShape, but that is not arbitrary because it returns the nearest face/edge/vert instead of the exact point of intersection.
Last edited by makafaka on Wed Oct 27, 2021 2:57 am, edited 4 times in total.
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Raycasting/Point of Intersection

Post by ickby »

makafaka wrote: Sun May 30, 2021 9:26 pm I have tried distToShape, but that is not arbitrary because it returns the nearest face/edge/vert instead of the exact point of intersection.
It does return both, the topologies that are nearest as well as the exact points on both shapes you used. The structure it returns is a bit convoluted, but if you read the tooltip in the python console it gives you the details.
makafaka
Posts: 6
Joined: Sun May 30, 2021 9:06 pm

Re: Raycasting/Point of Intersection

Post by makafaka »

ickby wrote: Sun May 30, 2021 10:09 pm It does return both, the topologies that are nearest as well as the exact points on both shapes you used.
I was using the first vector returned as a point instead of the second. When I use the second it works like a charm, thank you.
Post Reply