For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

BRepOffsetAPI_MakeOffsetShape

Liu Ailin's picture
Forums: 

Hi,
Everyone,
When we build a face with BRepOffsetAPI_MakeOffsetShape,
The offset shape is constructed:

- outside S, if Offset is positive,
- inside S, if Offset is negative;
Now, my problem is how to know that a side of face is the outside or the inside before making offset.
We can get the normal direction aNormal of aFace by below method.

Standard_Real aUMin, aUMax, aVMin, aVMax;
BRepTools::UVBounds (aFace, aUMin, aUMax, aVMin, aVMax);
gp_Pnt2d aUV((0.5 * (aUMin + aUMax)),(0.5 * (aVMin + aVMax)));

Handle(Geom_Surface) aSurface = BRep_Tool::Surface(aFace);
gp_Vec aD1U, aD1V;
gp_Pnt aStartPnt;
aSurface->D1(aUV.X(), aUV.Y(), aStartPnt, aD1U, aD1V);
gp_Vec aNormal = aD1U^aD1V;

What relation is there between this normal direction and inside or outside of a face?

Thanks in advance

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.