DiscussionsIssue archiveOCCT:Modeling Algorithms

Archived issue #0033043

Cannot display the result edge in 3d viewer when project circle on plane

CommunityOCCT:Modeling Algorithmsnew4 public notes

Search issues

Description

When use the following Tcl in Draw:
circle c 0 0 10 1 0 0 3
plane p 0 0 0 0 0 1
projonplane r c p

In Draw mu4 views can display the project curcle correctly, but can display nothing when to display the edge built from the project result curve:
mkedge e r
vdisplay e

Steps to reproduce

circle c 0 0 10 1 0 0 3
plane p 0 0 0 0 0 1
projonplane r c p
mkedge e r
vdisplay e

# parameters should be approptriate.
# current values are used just for the demonstration of an issue despite of numbers used.
crvtpoints r c 0.00001 0.1

Public activity

4 archived notes

Participants are labeled by their role within this record.

01Commenter 1
The problem is that the polygon representation of the edge has only 2 coincident nodes.
 -------
Dump of 1 Polygon3Ds
 -------
  1 : Polygon3D with 2 Nodes
with parameters
Deflection : 0.001

Nodes :
         1 :                 0                 0                 0
         2 :                 0                 0                 0
02Author
Yes, the project result is BSpline curve:
Draw[2]> dump r

*********** Dump of r *************
BSplineCurve
  Degree 8, 17 Poles, 3 Knots
Poles :

   1 : 0, 0, 0
   2 : 0, -1.17809724509617, 0
   3 : 0, -2.35620388376992, 0
   4 : 0, -3.25736798067373, 0
   5 : 0, -3.60539563891143, 0
   6 : 0, -3.25736798067192, 0
   7 : 0, -2.35620388376992, 0
   8 : 0, -1.17809724509617, 0
   9 : 0, -3.67394039744206e-16, 0
  10 : 0, 1.17809724509617, 0
  11 : 0, 2.35620388376947, 0
  12 : 0, 3.25736798067192, 0
  13 : 0, 3.60539563891507, 0
  14 : 0, 3.25736798066646, 0
  15 : 0, 2.35620388376947, 0
  16 : 0, 1.17809724509617, 0
  17 : 0, 7.34788079488412e-16, 0
Knots :

   1 : 0 9
   2 : 3.14159265358979 8
   3 : 6.28318530717959 9

But I think for this particular case, its better to use a Line.
03Commenter 1
The reported problem is a side effect of an issue in GCPnts_TangentialDeflection which is used to discretize edges inside BRepMesh.
The tool is unable to produce more than two points for the target curve despite of the fine parameters.

The following script shows the problem of GCPnts_TangentialDeflection and will be put to the Steps To Reproduction:

circle c 0 0 10 1 0 0 3
plane p 0 0 0 0 0 1
projonplane r c p
mkedge e r
vdisplay e
crvtpoints r c 0.00001 0.1
04Commenter 4
To require GCPnts_TangentialDeflection to produce good distribution of points for such degenerated bspline curve is to require almost impossible.
I agree with the author of this bug Author that in this particular case it is better to produce a trimmed line instead of bspline curve as a result of projection.
However, I am afraid of appearing other bugs that can appear due to another parameterization of line compared to the circle, when the projection algorithm will take part in projecting of some complex shape to a plane.
So, I propose to make a line as a projection result, and to check how this fix will impact a projection of some shape having the similar circle.