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

Not understanding translated IGES data structures.

Anonymous's picture
Forums: 

I have a problem. Could you help me, please.

I have translated IGESfile(simple solid cube) created in Pro/Engineer to OpenCASCADE shape through IGES DataExchange Module. and i try to find Face Normal Vector(using GeomLProp_SLProps) in translated shape with TopoDS_Wire data, but i have a not understanding problem. in other words, A few candidate sewing edges have same direction. I thought that candidate sewing edges of normal B-Rep Data Structure have different direction , but a few of translated shapes(translated cube IGESSfile) have same direction. I'd like to know this reason. and I'd like to know how to find Face Normal Vector in OpenCASCADE shape(translated IGES file), and If you have another data structures of Face, where to find another Loop Data Structure of Face(surface).

Thank you.

from Park jw in South Korea.

Roman Lygin's picture

Hello !

> I have a problem. Could you help me, please.

> I have translated IGESfile(simple solid
> cube) created in Pro/Engineer to OpenCASCADE
> shape through IGES DataExchange Module. and
> i try to find Face Normal Vector(using
> GeomLProp_SLProps) in translated shape with
> TopoDS_Wire data, but i have a not
> understanding problem. in other words, A few
> candidate sewing edges have same direction.
> I thought that candidate sewing edges of
> normal B-Rep Data Structure have different
> direction , but a few of translated
> shapes(translated cube IGESSfile) have same
> direction.

Yes, you are right - the edges should have different directions. But direction of the edge is composed of two things: - direction of the underlying curve, - flag of orientation of the edge (TopAbs_FORWARD or TopAbs_REVERSED)

Thus, probably you just analyze orientation of the curves forgetting to take into account orientation.

> I'd like to know this reason. and
> I'd like to know how to find Face Normal
> Vector in OpenCASCADE shape(translated IGES
> file),

Like in the case of the edge, face normal is defined through normal of the underlying surface (cross product of private derivatives) and orientation flag of the face (FORWARD or REVERSED).

Thus, again you may check your Open CASCADE shape, coming as a result of IGES reading, in this aspect. I hope you will find the reason.

Another principally different reason can be if you use IGES 5.0 when faces are coded as entities of the type #144 (not #508 as in IGES 5.1) without keeping connectivities between edges from the sending system. In this case, all the faces are stored independently and possibly the sending system does not keep the initial normals.

Best regards, Roman