Projection of TopoDS_Shape onto TopoDS_shape

Hello, 

I'm trying to project a TopoDS_Shape (A) onto a TopoDS_Shape (B) given a defined direction and obtain a new TopoDS_Shape. This new shape will be the shape B with the projection of A drawn (see attached picture). How can I do that?

Thanks in advance,

Regards

Attachments: 
Daniel Woodman's picture

Hi Adriana Costas,

Just to clarify: are you trying to project the green rectangular face to the grey structure (I suppose a wall)? Because the smaller slab of shape already looks like it's touching the wall.

In any case, have you tried BRepProj_Projection? You will need to get a wire from the structure though, and it will return the wire projections.

Dan

Adriana Costas's picture

Hi Daniel,

Yes, you're right. I wanted to project the prism onto the wall in the orthogonal direction regarding the wall. No, I haven't tried BRepProj_Projection because I don't know how to use it. Is there any documentation about it?

Thanks

Daniel Woodman's picture

Here it is: link.

Dan

Adriana Costas's picture

Ok, thanks! And how can I get the wires?With TopExp_Explorer?

Daniel Woodman's picture

Yes you can use TopExp_Explorer. Unfortunately you will need to iterate through all the other wires.

Or, if you can somehow pick the desired face by a graphical means, e.g. a mouse click, the method BRepTools::OuterWire can be used: link.

Dan

Guido van Hilst not specified's picture

Hi Adriana Costas,

Maybe you could use HiddenLine functionality See:

HiddenLine

Best regards, Guido

Adriana Costas's picture

Hi,

I think that HiddenLine functionality wouldn't work in this case because I need to have a TopoDS_Shape that consists of the base shape (the wall) with the projection of the other shape (prism) on it in order to take a view afterwards. Would that be possible using this functionality?

Regards,

Adriana