Yep I guess it works too,.

One can also use an anulus as a section.

As always, many ways to get the similar or same result.

BRepOffsetAPI_MakeThickSolid operation;

operation.MakeThickSolidByJoin

(

pipeOut,

TopTools_ListOfShape(pipeBuilder2.FirstShape(), pipeBuilder2.LastShape()), //sudo code

-0.01, //default direction is ‘out’

Precision::Confusion(),

BRepOffset_Skin,

Standard_False,

Standard_False,

GeomAbs_Intersection,

Standard_True

);

https://dev.opencascade.org/doc/refman/html/class_b_rep_offset_a_p_i___make_thick_solid.html

]]>Thanks for the interest you have shown for my work.

A full example would be out of the scope of this blog.

Moreover these techniques belongs to a framework I’ve developed for my applications.

You can have a look there : http://www.ssg-aero.com

Letting all the openGL part of visualization, you can have look on how faces are meshed with openCASCADE:

TopLoc_Location loc;

Handle(Poly_Triangulation) triangulation = BRep_Tool::Triangulation(aFace, loc);

It is true! Could you make it?

]]>The file does not contain any visualization, can you please post a simple example to show an shape in a window (a simple and basic example 🙂 ).

I’m on Linux and I’m using oce 0.17 (OCCT 6.8.0). ]]>

Hi, sorry for my late answer. Something might get wrong in my notifications.

If you have a look at the description of the offset class :

You would notice that edges are not eligible for offset, witch, letting apart the planar case, makes sense.

BRepOffsetAPI_MakeOffsetShape::BRepOffsetAPI_MakeOffsetShape ( const TopoDS_Shape & S,

const Standard_Real Offset,

const Standard_Real Tol,

const BRepOffset_Mode Mode = BRepOffset_Skin,

const Standard_Boolean Intersection = Standard_False,

const Standard_Boolean SelfInter = Standard_False,

const GeomAbs_JoinType Join = GeomAbs_Arc

)

Constructs a shape parallel to the shape S, where.

S may be a face, a shell, a solid or a compound of these shape kinds;

Offset is the offset value. The offset shape is constructed:

outside S, if Offset is positive,

inside S, if Offset is negative;

Tol defines the coincidence tolerance criterion for generated shapes;

Mode defines the construction type of parallels applied to the free edges of shape S; currently, only one construction type is implemented, namely the one where the free edges do not generate parallels; this corresponds to the default value BRepOffset_Skin;

Intersection specifies how the algorithm must work in order to limit the parallels to two adjacent shapes:

if Intersection is false (default value), the intersection is calculated with the parallels to the two adjacent shapes,

if Intersection is true, the intersection is calculated by taking all generated parallels into account; this computation method is more general as it avoids some self-intersections generated in the offset shape from features of small dimensions on shape S, however this method has not been completely implemented and therefore is not recommended for use;

SelfInter tells the algorithm whether a computation to eliminate self-intersections must be applied to the resulting shape; however, as this functionality is not yet implemented, it is recommended to use the default value (false);

Join defines how to fill the holes that may appear between parallels to the two adjacent faces. It may take values GeomAbs_Arc or GeomAbs_Intersection:

if Join is equal to GeomAbs_Arc, then pipes are generated between two free edges of two adjacent parallels, and spheres are generated on “images” of vertices; it is the default value,

if Join is equal to GeomAbs_Intersection, then the parallels to the two adjacent faces are enlarged and intersected, so that there are no free edges on parallels to faces. Warnings

All the faces of the shape S should be based on the surfaces with continuity at least C1.

The offset value should be sufficiently small to avoid self-intersections in resulting shape. Otherwise these self-intersections may appear inside an offset face if its initial surface is not plane or sphere or cylinder, also some non-adjacent offset faces may intersect each other. Also, some offset surfaces may “turn inside out”.

The algorithm may fail if the shape S contains vertices where more than 3 edges converge.

Since 3d-offset algorithm involves intersection of surfaces, it is under limitations of surface intersection algorithm.

A result cannot be generated if the underlying geometry of S is BSpline with continuity C0. Exceptions Geom_UndefinedDerivative if the underlying geometry of S is BSpline with continuity C0.

Hello, I’m sorry but the rendering is done by in house code rendering engine.

Which is not part of opencascade’s framework.

Regards,

Sébastien

]]>Could you explain how to customized the color of these objects? ]]>

Hi Sebastien

Code :

[CODE]

TopoDS_Shape sh = BRepBuilderAPI_MakeEdge(gp_Pnt(0.0, 0.0, 0.0), gp_Pnt(0.0, 60.0, 0.0));

TopoDS_Shape offsetSh = BRepOffsetAPI_MakeOffsetShape(maker.Shape(), 10.0, 0.001).Shape();

Handle_AIS_Shape outputSh = new AIS_Shape(offsetSh);

mContext->Display(outputSh);

[/CODE]

]]>Hello,

Can you be more specific?

For instance, by giving the full code.

Sébastien

]]>