Home
Reply
Contributor
triet
Posts: 28

about api_offset_face

[ Edited ]

Hi,

 

I have encountered a scenario where api_offset_face() removes the associated mesh data of the source face (the face to be offset). Is it true api_offset_face() sometime removes the mesh data associated to the source face? I could not find any document that confirms the operation? If it is true, what is the motivation of the removal?

I have a model with different surfaces in it but there is one case when that particular surface is offset, the function removes the mesh data of the surface. The rest of the surfaces are ok, the mesh data is retained after the api_offset_face() function is used.

Thanks.

Manhtriet.

Spatial Moderator
ybiyani
Posts: 223

Re: about api_offset_face

Hello Triet,

 

I am unable to duplicate the issue. The facet counts exists before and after the offset.

 

(part:clear)
; Create a spherical face.
(define face (face:sphere (position 0 0 0) 40 -45 45 0 90))
(define r (refinement))
(refinement:set-prop r "triang mode" "AF_TRIANG_FRINGE_3")
(entity:set-refinement face r)
(entity:facet face #f)
(entity:set-color face BLUE)
(entity:count-facets face)
; Create a face offset.
(define offset (face:offset face -20))
(entity:set-color offset RED)
(entity:count-facets face)
(entity:count-facets offset)

 

Please provide a test case for review.

 

Regards,

Yogesh

Contributor
triet
Posts: 28

Re: about api_offset_face

Thanks Yogesh,

 

I attached the file and this sample code. Please verify it again I think the issue is there. As mentioned in my previous message, not every face gives the issue. It only happens with some rare cases since I tested a lot faces and I only found the issue with this one.

 

(part:clear)
(part:load "C:/triet/planar_face.sat" )
(define body (list-ref (part:entities) 0))
(define faces (entity:faces body ))
(define face (list-ref faces 0))
(define r (refinement))
(refinement:set-prop r "triang mode" "AF_TRIANG_FRINGE_3")
(entity:set-refinement face r)
(entity:facet face #f)
(entity:set-color face BLUE)
(entity:count-facets face)
; Create a face offset.
(define offset (face:offset face -0.1))
(entity:set-color offset RED)
(entity:count-facets face)
(entity:count-facets offset)

 

Thanks for helping out again.

 

Manhtriet.

Spatial Moderator
ybiyani
Posts: 223

Re: about api_offset_face

Hello Mantriet,

 

The case is reproducible. I will log a defect and send you an update via the incident.

 

Regards,

Yogesh

Contributor
triet
Posts: 28

Re: about api_offset_face

Thanks Yogesh.

 

Manhtriet.