Page 1 of 1
Wire inside another wire
Posted: Wed May 27, 2020 4:11 am
by eVoodoo
Hello
I am totally new to dgk and i am trying to solve the following problem. I have two wires that I know definitely are cyclic and are parallel to z axis. I want to check if the one of the wires is inside the other. How can i do that?
Re: Wire inside another wire
Posted: Thu May 28, 2020 7:44 am
by Prashant Kande
Hello eVoodoo
Sorry, currently we do not have it on level of wires. I suggest getting all curves from the wires and using
ICurve_DG.GetPointLocation().
Via
IBRepWire_DG.GetEdge() >
IBRepEdge_DG.GetCurve()
Think about adding something like WireGetPointLocation(IBRepWire_DG wire, DgPoint point) or WireGetCurveLocation(IBRepWire_DG wire, ICurve_DG curve) in your code.
We are planning to add a high level way to do things like that in minor versions of v6
Regards
Re: Wire inside another wire
Posted: Mon Jun 01, 2020 6:29 am
by eVoodoo
Thank you, Prashant
but where the points should come from for ICurve_DG.GetPointLocation()?
Re: Wire inside another wire
Posted: Fri Jun 12, 2020 12:17 am
by Prashant Kande
Sample the curves using
ICurve_DG.GetPointAtRatio(double ratio) at a number of positions (in 0 to 1.0 range). How many? - I guess 10 would be plenty, but it is better to take it larger like 60 and tune in to reduce until you start getting wrong answers.