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

Bug? Scaling sphere at one direction.

Kazumasa Uno's picture

Hello everybody.

The following simple program does not work properly.
I think it is bug.

void OnDebug_test6(Handle_AIS_InteractiveContext myAISContext)
// Create Sphere
gp_Pnt aCenter(0,0,0);
TopoDS_Shape tShape = BRepPrimAPI_MakeSphere( aCenter, 50.0 );

// Scale down at Z axis only
gp_GTrsf aTrsf;
gp_Mat rot( 1.0, 0, 0, 0, 1.0, 0, 0, 0, 0.5 ); // Only Z scale down 50%
BRepBuilderAPI_GTransform aBrepTrsf(tShape,aTrsf);
tShape = aBrepTrsf.Shape();
// Display
Handle(AIS_Shape) aShape = new AIS_Shape(tShape);
myAISContext->Display(aShape, Standard_False);

Almost everything goes disappear and only wireframe is hilighted when mouse moves to the sphere.

Some of my trials.

1. I try converting sphere into nurbs by BRepBuilderAPI_NurbsConvert, but the result was same.

2. I build the shape by BRepPrimAPI_MakeRevol with 360 degree,
arbitrary cross-sectional contour such as half of circle, half of ellipse, spline curve,
the result was also same.
but the donuts like shape was correctly scaled.

3. I try shape healing function ShapeFix_Shape, but the result was same.

Any suggestion and opinion would be appreciated.

Fotis Sioutis's picture

This is a known BUG in OCC.There is a patch available for this issue in Salome 4.1.4 distribution, which modifies BRepMesh_FastDiscret.hxx, IntPatch_Intersection.hxx and IntPatch_PrmPrmIntersection.gxx.Recompilation of OCC with the new files has solved this problem in my case.


Kazumasa Uno's picture

Hello Fotis.

Thank you very much for your reply and useful information.

I found the patch 'CAS-6.3-patch.tar.gz' in Salome Debian version.

I confirm that The bug is fixed.

Thank you once again!