Personal tools
You are here: Home Forum Use quadrangle mapping doc

quadrangle mapping doc

Up to Use

quadrangle mapping doc

Posted by Chandra S at January 18. 2018

Hi,

Circular, trapez and star shaped faces are shown with quadrangle mapping in the docs section of Salome, can someone please point me to a tutorial section that shows how was it achieved? Say a star shape face one?

 

thanks,

CS

Re: quadrangle mapping doc

Posted by SMESH expert at January 18. 2018

Hello

An essential part of the script creating this mesh follows

# "star" case

nb = 20
circle_3 = geompy.MakeCircleR( 4 )
points_3 = []
for i in range(nb):
    if i % 2:
        points_3.append( geompy.MakeVertexOnCurve( circle, i/float(nb)))
    else:
        points_3.append( geompy.MakeVertexOnCurve( circle_3, i/float(nb)))

wire = geompy.MakePolyline( points_3, True )
face_3 = geompy.MakeFace( wire, True )

mesh_3 = smesh.Mesh( face_3, "Star" )
mesh_3.Segment().NumberOfSegments( 5 )
mesh_3.Quadrangle()

assert mesh_3.Compute()
assert mesh_3.NbTriangles() == 0

 

Best regards

Edward

Re: quadrangle mapping doc

Posted by Chandra S at January 18. 2018

Thankyou SMESH,

Would you please advice on this shape? I'm trying to minimize assigning 1D segments manually. I got this far, but this mesh needs improvement. 

Regarding the script below, for cases like "star", is that possible only with script?

b/r,

CS

Previously SMESH expert wrote:

Hello

An essential part of the script creating this mesh follows

# "star" case

nb = 20
circle_3 = geompy.MakeCircleR( 4 )
points_3 = []
for i in range(nb):
    if i % 2:
        points_3.append( geompy.MakeVertexOnCurve( circle, i/float(nb)))
    else:
        points_3.append( geompy.MakeVertexOnCurve( circle_3, i/float(nb)))

wire = geompy.MakePolyline( points_3, True )
face_3 = geompy.MakeFace( wire, True )

mesh_3 = smesh.Mesh( face_3, "Star" )
mesh_3.Segment().NumberOfSegments( 5 )
mesh_3.Quadrangle()

assert mesh_3.Compute()
assert mesh_3.NbTriangles() == 0

 

Best regards

Edward

 

Attachments

Re: quadrangle mapping doc

Posted by SMESH expert at January 18. 2018

I don't see how to minimize assigning 1D segments manually. Maybe Propagation hypotheses could help a bit.

As about "star," the same can be done in GUI. 

Best regards

Edward

Re: quadrangle mapping doc

Posted by Chandra S at January 18. 2018

Thanks Edward,

I'll work on it, maybe make a template via dumpstudy later on.

b/r,

CS

Previously SMESH expert wrote:

I don't see how to minimize assigning 1D segments manually. Maybe Propagation hypotheses could help a bit.

As about "star," the same can be done in GUI. 

Best regards

Edward

 

Re: quadrangle mapping doc

Posted by SMESH expert at February 22. 2018

Hello Chanrda

I improved a bit Quadrangle Mapping algorithm, namely the way it chooses corners of a quadrangle. With this improvement your mesh becomes as in the snapshot. (Smoothing was applied after computing). Thank you for providing this use case.

Best regards

Edward

Powered by Ploneboard
Document Actions