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?
Wire inside another wire
-
- Posts: 121
- Joined: Mon Apr 04, 2016 4:55 am
Re: Wire inside another wire
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
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
Thank you, Prashant
but where the points should come from for ICurve_DG.GetPointLocation()?
but where the points should come from for ICurve_DG.GetPointLocation()?
-
- Posts: 121
- Joined: Mon Apr 04, 2016 4:55 am
Re: Wire inside another wire
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.