Hi Philipp,
1) The SplineCurve2d has it's own local coordinate system, lets say the coordinates in this system are denoted by (x',y'). The defined spline is always rotated around this x'-axis!!
Now you can map the local coordinates to your 3d coordinate system. When you define the revolution object you define the axis of rotation by two points. This means your point (0',0') is mapped to the first point and the x'-axis is pointing in the direction of the second point.
2) The meshing fails for me as well. Sounds like the algorithm has problems to find the special points to start the meshing. I'll have to look into that.
Shifting the points which define the axis revolution might help for now. The following setting works for me.
Code:
H = 1 # why not H=1 here?
R = 0.1 # why not R=.1 here?
pnts = [ (0,0), (0,R), (H,R), (H,0) ]
segs = [ (0,1), (1,2), (2,3), (3,0) ]
for pnt in pnts:
spline.AddPoint(*pnt)
for seg in segs:
spline.AddSegment(*seg)
rev = Revolution(Pnt(0,1.2,0), Pnt(0,0.4,0), spline)
Which kind of geometry would you like to define? I'm surprised that the cylinder causes problems. I already used it to define way more complicated geometries and did not have these problems.
Best,
Christoph