Applying ShapeFix_Shape to the attached brep causes a crash. Setting aSfs.FixSolidMode() = false avoids this issue, maybe because this is a Moebius-type shape, but it should not cause a crash anyway. TopoDS_Shape shape ;
BRep_Builder builder ;
BRepTools::Read(shape, "Attachm
Hello,
With the attached brep, I get a volume of 329.6, but with CADAssistant I get a volume of 334.6.
Why is there a difference please ? TopoDS_Shape lShape ;
BRep_Builder lBuilder ;
GProp_GProps lProperties ;
BRepTools::Read(lShape, "Attachment 1 (BREP)", lBuilder) ;
Hello,
The whole Attachment 1 (BREP) (see attached files) is considered as common part between Attachment 1 (BREP) and Attachment 7 (BREP) but that's clearly wrong (see attached picture) BRepAlgoAPI_Common lBuilder ;
lBuilder.SetRunParallel(false) ;
TopTools_ListOfShape lArgs ;
T
Hi !
BRepAlgoAPI_Common can give no result although there is clearly a big common part between 2 shapes (see attached picture) You can use Tool and Argument joined in "NotAttachment 1 (ZIP)"
Hello,
There are sometimes bad results in
math_DirectPolynomialRoots::Solve(const Standard_Real a, const Standard_Real b, const Standard_Real c, const Standard_Real d, const Standard_Real e) We don't get the right results, with values:
a=1.0000000000000004
b=-2.[revision removed]
Hello,
The attached file is well seen on some CAD softwares, but import it with OCC gives a flat surface instead on a volume with 20 um of thickness.
This code allows to scale the shape and see clearly the (bad) result :
STEPControl_Reader reader ;
reader.ReadFile("C:\\Attac
Hello,
I try to use BRepAlgoAPI_Cut between 2 shapes. I should have a shape as result but I get an empty TopoDS_Shape. BRepAlgoAPI_Cut lBuilder ;
BRep_Builder lBRepBuilder ;
TopTools_ListOfShape lArgs ;
TopoDS_Shape lArg, lTool ;
BRepTools::Read(lArg, "Attachment 2 (BREP)&qu
The class BRepClass3d_SolidExplorer has the field myBox, and it is computed during initialization of the class instance. But this property is never used in the current configuration.
It is used only if preprocessor definition MARCHEPASSIUNESEULEFACE is defined in the file BRepCla
when a1 is not 0 and a2 is not 2 Pi and angle is not 2 Pi things go south:
BRepPrimAPI_MakeTorus(axis, r1, r2, a1, a2, angle)
Other combination of values may also be problematic. See discussion in forum. #include <iostream>
#include <gp_Ax2.hxx>
#include <TopoDS_Sh
IntPatch_InterferencePolyhedron is used in IntPatch_PrmPrmIntersection to compute two bi-parametrised surfaces intersection. In order to accelerate calculations use Bnd_BoundSortBox to collect intersect boxes.
BRepExtrema_OverlapTool use BVH and get relatively fast speed. So I su
Bnd_Box have the same data and provide update function, and HLRAlgo_PolyData::Box only have data do not have update function,
so there are many code about the box update. d
According to the Coons parametric equation(see the attach picture),
the parameter U should used to evaluate the point on Coons patch,
in the 7.2.0 source code, the parameter U is commented as follows:
//gp_Pnt GeomFill_CoonsAlgPatch::Value(const Standard_Real U,
gp_Pnt GeomFill_C
In file src/BRepLib/BRepLib.cxx, line 411:
for (ii = 0 ; ii < 3 ; ii++ ) {
should be changed to
for (ii = 1 ; ii < 3 ; ii++ ) {
Since ii == 0 always results in obtaining a null pointer Curve2dPtr after calling the first line BRep_Tool::CurveOnSurface (this function expects
The method BRepMesh_Delaun::isVertexInsidePolygon classifies a point inside 2D polygon calculating cumulative angle from the point to all segments.
I found out that for a CCW polygon the angle computed by that procedure will be equal to -2PI. However, the final condition checks t
Usage of BRepTopAdaptor_SeqOfPtr leads to potential memory leaks (see 0031009).
This issue proposes to get rid of BRepTopAdaptor_SeqOfPtr and substitute it by the collection of a certain type. Entities of this class are used in BRepTopAdaptor_FClass2d and IntTools_FClass2d. NA
OCCT team have new approach with reporting bug or features and questions.
Bugs or features:
Mantis: [archived tracker link removed]
GH Issues: https://github.com/Open-Cascade-SAS/OCCT/issues
GH Report issue: https://github.com/Open-Cascade-SAS/OCCT/issues/new/choose
_
Question or
I made a solid shape using boolean operations on some simple primitives like spheres, cylinders and boxes. Some of the source elements have fillet added. Then I tried adding more fillets and BRepFilletAPI_MakeFillet::Add() hangs on adding an edge.
This is fully reproducible in DR
BRepBuilderAPI_MakePolygon will be crash when apply some polygon. BRepBuilderAPI_MakePolygon MP;
MP.Add(gp_Pnt(0,0,0));
MP.Add(gp_Pnt(30,100,0));
MP.Add(gp_Pnt(40,20,0));
MP.Add(gp_Pnt(100,0,0));
MP.Add(gp_Pnt(70,45,0));
MP.Add(gp_Pnt(50,50,0));
MP.Add(gp_Pnt(60,70,0));
MP.Add(gp
This issue came from the FreeCAD community.
The following exception message is generated:
Draw[14]> blend res a 0.1 a_5
An exception was caught [revision removed] : Standard_Failure: There are no suitable edges for chamfer or fillet
** Exception ** [revision removed] : Standar
Issue when AIS_ViewCube set to Top and AIS_ViewController bind MouseGesture with AIS_MouseGesture_RotateView
The steps about the issue are as follows:
First, In class AIS_ViewController add MouseGesture AIS_MouseGesture_RotateView to myMouseGestureMap in its constructor function.
After reorganization of Standard_Type as a part of 7.8.0 there is a problem with releasing type_info objects.
Needs to prepare maintance patch to avoid crash.
Minor release will include full reorginization of Standard_Type to avoid using mutex mappint iteration
IGESControl_Writer with mode=1 missing Model Curves in Transfer_FinderProcess
I'm trying to set name and color attributes for Curves when exporting to BRep IGES files, but the Curve IGES entities are missing the Curve entities in the Transfer_FinderProcess. The attached example p
The following code causes access to null shape and as a result - crash. I think it was caused by 0029204: BRepOffsetAPI_MakePipeShell produces invalid result and raises exception in Draw
double tol = 6.[revision removed]-07;
sweep.SetTransitionMode(BRepBuilderAPI_TransitionMode::
ShapeFix_Shape crashes with a segfault when given a shape that contains faces without a surface pointer, for example if the shape is tessellated or triangulated, or contains tessellated / triangulated subshapes. 1) Load a step file with tessellated geometry
2) Run ShapeFix_Shape
ShapeUpgrade_UnifySameDomain crashes with a segfault when given a shape that contains faces without a surface pointer, for example if the shape is tessellated or triangulated, or contains tessellated / triangulated subshapes. 1) Load a step file with tessellated geometry
2) Run S
Hello,
With the attached shape, when I give to BRepMesh_IncrementalMesh a more accurate deflection I get a bad mesh at specfic areas. BRepMesh_IncrementalMesh lIncrMesh ;
lIncrMesh.SetShape(lShape) ;
// Good result
lIncrMesh.ChangeParameters().Deflection = 0.09 ;
lIncrMesh.Perfor
Hello,
Cutting an cylinder with anoter one to get a thickness doesn't work with a thickness < 4e-5.
Here I attached 2 cases : thickness of 3e-5 and thickness of 4e-5. // Parameters
const gp_Ax2 lTransform ; // Default value
double lThickness = 3.0e-5 ;
// First cylinder
TopoDS
Hello !
BRepAlgoAPI_Common builder returns no common part in some case, although there is clearly a big common part, as you can see on the joined picture.
BRepAlgoAPI_Common builder with the argument and tool joined in "NotAttachment 1 (ZIP)" file returns no common part
Hi !
BRepAlgoAPI_Common give no result although there is clearly a big common part between 2 shapes (see attached picture) You can use Tool and Argument attached in "NotAttachment 1 (ZIP)" file
With BRepAlgoAPI_Common, I manage to create an edge with an INTERNAL orientation and linked to a single face, and this edge seems to have no meaning. This is a bad artifact because my resulting shape is not considered a manifold since there is only one connection for this edge, i
We used the OCC API to convert from STP to GLB, but an error occurred. After conversion, there was damage on the curved surfaces, and some triangular facets were missing.
STP file before conversion:Attachment 4 (STP)
→ Attachment 7 (PNG)
GLB file after conversion: Attachment 3 (G
Hi !
BRepAlgoAPI_Common gives no result although there is clearly a big common part between 2 shapes (see attached picture) You can use Tool and Argument attached in "NotAttachment 1 (ZIP)".
From 2 TopoDS_Shape, I perform a BRepAlgoAPI_Common operation and the result shape is empty.
I set an identical translation in Y for the 2 shapes, I do it again and now I have a common shape. I should not. BRepAlgoAPI_Common lBuilder ;
lBuilder.SetRunParallel(false) ;
TopTools_Li
The sweeping fails with the provided traceline and profiles when using the RightCorner transition mode:
"An exception was caught 0x641d8902c600 : StdFail_NotDone: BRep_API: command not done"
The sweeping does not fail with the default Transformed transition mode, but th
An issue to start a pull request to write simple key value attributes to STEP geometry:
https://github.com/Open-Cascade-SAS/OCCT/discussions/631
https://github.com/Open-Cascade-SAS/OCCT/issues/629
When read step file contains the GDT with complex type of measure(main value). The GDT value does set to XCAD (0,0 by default)
It is needed to update handle measure as a complex type too (use a base class to keep the entity)
Complex measure type is a StepRepr_ReprItemAndLengthMea
For some STEP files we fail for geometric tolerances to read the "geometric_tolerance.magnitude" as a StepBasic_MeasureWithUnit. The parameter 3 may be of type StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI or StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI.
There
With BRepAlgoAPI_Common, I manage to create an edge with an INTERNAL orientation and linked to a single face, and this edge seems to have no meaning. This is a bad artifact because my resulting shape is not considered as manifold since there is only one connection for this edge,
Hi,
I use BRepAlgoAPI_Common to get the intersection between 2 shapes and the result is an empty shape, but it shouldn't.
I give you the example below.
Tried with v7.9.1 BRepAlgoAPI_Common lBuilder ;
lBuilder.SetRunParallel(false) ;
TopTools_ListOfShape lArgs ;
TopTools_ListOfSha
STEP import: change in colors of BRep
see the attached screenshots:
+ with OpenCascade 7.3.0 the colors are still fine
+ with OpenCascade 7.6.0 the colors are changed / mixed up
STEP file to investigate is attached
NOTE: pls ignore the red dots and the bounding box Import BRep of
NOTE: bug is reproducible with OCC 7.7.2 and OCC 7.8.0
=== ATTACHMENTS ===
+ Attachment 2 (ZIP)
NOTE: contains ReadMe.txt
+ STEP file "M_5SV33466KL_SIEMENS.stp" (zipped)
=== REPRODUCTION ===
The attached Visual Studio 17 solution exemplifies in an
STEP to DXF command li
we have a STEP file that was generated / saved with OC 7.3.0
=== OK / GOOD ===
with OC 7.3.0 we still were able to generate the right and left hand 2D views
=== BUG / REGRESSION ===
with OC 7.6.0, 7.7.0, 7.7,2 the right and left hand 2D views cannot be generated any more due to a
generation of 2D FRONT view results in erroneous frame corners
NOTE: bug is reproducible with OCC 7.7.2 see attached:
+ STEP-to-DXF-CmdLineTool.zip
NOTE: contains ReadMe.txt
+ STEP file
NOTE: contains several nested frames
+ screenshot of front view
NOTE: defective corners marked
generation of 2D views results in erroneous graphics / lines
=> see attached screenshot "A_B_N_140MT_D9N_A16_A.stp--Right.png"
=> see the four attached DXF files
Bug reproducible with OC 7.3.0, OC 7.6.0, OC 7.7.0 and OC 7.7.2
(others OC versions we did not test)
=
infinite loop in HLRBRep_InternalAlgo::Update() generating 2D view of right hand side from STEP file
NOTE: OpenCascade 7.7.0 still affected by this infinite loop
see attached:
+ Attachment 3 (ZIP)
NOTE: contains ReadMe.txt
+ STEP file
+ screenshot of call stack of infinite loop i
=== BUG ===
OpenCascade 7.6.2 (as used by FreeCAD 0.20) displays an unexpected sphere for this STEP file
=> see the huge orange sphere on the attached screenshot
=== Regression ===
OpenCascade 7.5.3 (as used by FreeCAD 0.19) does not yet display this unexpected sphere
=> th
Generating 2D front view from STEP file: Handle_HLRBRep_Data::NbEdges() == 0
BUG: no edges are returned for the front view
=> see error message of the cmdline tool
The contained Visual Studio 17 solution exemplifies in an STEP to DXF command line tool
how we use OpenCascade to
Hi,
I have a simple App, which tells OCCT to read and mesh a STEP file. The result is written to a VRML file:
app->NewDocument("BinXCAF", doc);
auto success = reader.Perform(input, doc);
if (!success)
{
std::cout << "ERROR!\n";
return -1;
}
shapeTool
Draw hungs up in BRepAlgoAPI_Cut function during loading e3i-file in Gallery but
does not hung up in Gallerydeb. To reproduce the bug it is necessary to launch
XSDRAWE3I and call eucbrep
/disk8/DET/QA/TOP009/TOP191.e3i
In Gallarydeb the file is loaded about 20 sec but in Gallery
DXF Importer leaves wires open when importing. It seems to happen with any arbitrary DXF-file. ShapeFix_Wire will fix it though, but I would expect that the imported object would be valid in the first place. Just import the uploaded DXF-file and check out whether the wire of the
This occurs in OCCT 7.9.0 and is caused by to https://github.com/Open-Cascade-SAS/OCCT/pull/374.
In previous versions of OCCT, applying a transformation with theCopyGeom=true to a Degenerate Edge worked, but after issue 374 the transformed Degenerate Edge is missing a 2D curve an
The attached file can be imported and features correct surfaces and spatial trimming loops.
However parametric loops are wrong.
See attached image for an example:
_ the blue surface should be a rectangle, but the side on the left is eroded, making it curvy;
_ additionally the sid
The code in the next box crashes in the end. It works OK if you comment out the
BRepMesh_IncrementalMesh(shape0, 0.5, Standard_False, hPi);
line
BTW this form has problems. It crashes when I click submit void BRepBuilderAPI_GTransformTst::Test0()
{
// Rectange
double width = 2;
d
In the current version of OCCT documentation, several flaws are reported regarding OCCT "Tutorials and Samples" and "User Guides" manual sections.
Based on the Teams meeting the following action list is presented:
1) Proofreading (+fact-checking and content-re
TKMath contains very specific things related to BSplines, Bounding boxes, Geometry computations, and stuff around gp classes, i.e. low-level functionality related to geometry.
TKernel provides general functionality like Type basics, OSD, and also the general purpose and independe
OCCT V7_7_0_beta and V7_7_0
NCollection_IndexedDataMap::FindFromKey exception in BRepOffsetAPI_MakePipeShell when sweeping a single profile along a simple wire from a NURBS. In DRAW:
pload ALL
restore "spine.brep" s
restore "profile.brep" p
mksweep s
setsweep
After union of a box and a cylinder fillet operation fails on edge of the intersection in case when cylinder intersects an edge of the box. See the attached C:\DISoft\Keep\Attachment 1 (CPP)
It happens in OCCT 7.8.0, 7.7.0, 7.5.0 and 6.9.1
Debug the attached Attachment 1 (CPP) wi
The code blocks are broken when using the latest version of doxygen. This patch provides the replacement for syntax, excluding the broken highlighting mechanics from the blocks by replacing the ~~~~{.***} .... ~~~~ with \verbatim ... \endverbatim as proposed by Dmitry.
When reading nist_stc_07_asme1_ap242-e3.stp there is an exception in src/STEPCAFControl/STEPCAFControl_Reader.cxx line 3007.
gp_Ax2 anA(aPnt, aDir, aDirR);
This is a correct behavior, as the two passed directions are colinear. The reason are in lines 3004-6.
aDir.SetCoord(aDirArr
Beginning in OpenCASCADE v7.7, the method BRepTools_NurbsConvertModification::NewPolygon can fail to create a curve, but return Standard_True anyway. This is FreeCAD bug 9760: https://github.com/FreeCAD/FreeCAD/issues/9760. DRAW script:
pload ALL
bsplinecurve bc 2 2 0 3 1 3 0 3 0
Currently, in the AIS_ViewController, we have the method UpdateMouseButtons (AIS/Attachment 3 (CXX):712)
Inside it, the library increment the index by one each time we trigger a mouse button, we increment a counter by one. And this counter is only reset when the mouse click is de
V3d_View provides functionality displaying rectangular or circular grid on the screen. Current implementation is quite basic and displays fixed number of line segments.
It is desired improving this functionality or providing substitution.
Possible extensions:
- Dynamic grid step
After calling AIS_InteractiveContext::Redisplay() / AIS_InteractiveContext::RecomputeSelectionOnly() highlighting state might keep removed Owner, which can be later selected. pload MODELING OCAF XDE VISUALIZATION
# Create a green cube and add it in the document
XNewDoc aDoc
set a
Currently AIS_Manipulator supports only one presentation with thick arrows.
In some applications another skin might be preferred - with thin arrow-less axes. Not required
AIS_Manipulator relies on PrsMgr_PresentableObject::LocalTransformation() to read/set object transformation, but when attaching to object having Graphic3d_TMF_ZoomPers persistence, manipulator behavior is unusable as Manipulator is not consider Graphic3d_TransformPers::AnchorPoin
OCCT allows to create static version of libraries, however it does not allow to use them in any kind of project except LGPL ones which makes OCCT quite impractical and makes features like webassembly merely a toy.
OCCT license represents a modification of the general LGPL license
All the intersections of two offset curves, each of the offset curves having a basis curve being an arc of ellipse, are not detected by the GeomAPI_ExtremaCurveCurve algorithm.
In the attached pictures you can see the two original arcs and the two offset curves on those arcs. Thi
Intersection between a circle and a line not detected WHEN TANGENT when using either Geom2dAPI_InterCurveCurve or GeomAPI_ExtremaCurveCurve.
For a more visual view, see picture here:
https://forum.freecadweb.org/viewtopic.php?f=10&t=31371
Basically:
1. If a line is tangential
A bug exists in BRepFill_PipeShell or BRepFill_Sweep (as BRepFill_PipeShell relies on this class) when using a spline as the spine wire. This appears to be the same unresolved issue described here: https://dev.opencascade.org/content/brepoffsetapimakepipeshell-bspline-error
The i
When OCCT is compiled somewhere outside the workstation where it is supposed to be used, e.g. by CI/CD, it becomes impossible to start DRAWEXE on target workstation, because all paths in env.{bat|sh} and custom.{bat|sh} are hardcoded with absolute paths corresponding to the file