Hey, I'm running into a fairly odd situation.

I have a circle ( actually an approximation of a circle done with
Approx.Approx_Curve3d).

The curve is parameterized from 0.0 to 1.0, and corresponds to a full circle
created with this code:

circle = gp.gp_Circ(gp.gp_Ax2(gp.gp_Pnt(2,2,0),gp.gp().DZ()),1);
e1 = BRepBuilderAPI.BRepBuilderAPI_MakeEdge(circle).Edge();
mw = BRepBuilderAPI.BRepBuilderAPI_MakeWire();
mw.Add(e1);
return mw.Wire();

My algorithm does a bunch of stuff and ends up making edges of particular
portions of the circle.
When I make an edge from two parameters that are at parameters 0.1 and 0.8,
 what I expect to get is a small segment of the circle that connects these
two points along the 'shortest' path-- but in fact I get nearly all of the
circle instead.

I tried reversing the parameters, and MakeEdge is too smart for that-- it
just creates the same edge and reverses it.

The more i thought about it, the more i realized that there's really no way
for MakeEdge to know i want  to connect the points another way-- as far as
it is concerned, the curve's start and end points do not match up. And even
if they did, ( IsPeriodic() = True ), it wouldnt know whether i want the
shorter or the longer path on a circle.

Does anyone how i could go about constructing an edge between two points on
a circular curve using the shorter path between the two?
_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to