What are the arguments to call OCC.PAF.Context.curve_operations.MakePolyline?
Please have a look at the example at the end of this message. The call 
'my_context.curve_operations.MakePolyline([my_pnt1,my_pnt2])' throws the 
following error message:

> got *args: (<OCC.PAF.Context.curve_operations object at 0x1770610>, 
> [<OCC.SGEOM.Handle_GEOM_Object; proxy of <Swig Object of type 
>'Handle_GEOM_Object *' at 
>
> 0x2000cac8> >, <OCC.SGEOM.Handle_GEOM_Object; proxy of <Swig Object of type 
> 'Handle_GEOM_Object *' at 0x2000ce88> >])
> modified args: ([<OCC.SGEOM.Handle_GEOM_Object; proxy of <Swig Object of type 
> 'Handle_GEOM_Object *' at 0x2000cac8> >, <OCC.SGEOM.Handle_GEOM_Object; proxy 
>of <Swig 
>
> Object of type 'Handle_GEOM_Object *' at 0x2000ce88> >],)
> got **kwargs: {}

How do I create a polyline or other curves given a list of points?

Thank you
Björn

---- begin example ----
from OCC.PAF.Context import ParametricModelingContext 
from OCC.PAF.Parametric import Parameters

p = Parameters()            # Create a parameters set 
my_context = ParametricModelingContext(p)     # Create and initialize a 
parametric context 

my_context.init_display()   # start display# 
my_context.register_operations(my_context.basic_operations, 
my_context.prim_operations,
                   my_context.curve_operations,my_context.local_operations)

p.X1, p.Y1, p.Z1, p.X2, p.Y2, p.Z2, p.RADIUS = 
12,70,12,30,30,30,4                                   # Create 7 parameters 

my_pnt1 = my_context.basic_operations.MakePointXYZ(p.X1,p.Y1,p.Z1, name="Pnt1", 
show=False)
my_pnt2 = my_context.basic_operations.MakePointXYZ(p.X2,p.Y2,p.Z2, name="Pnt2", 
show=False)
my_poly=my_context.curve_operations.MakePolyline([my_pnt1,my_pnt2]) 
---- end of example ----





_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to