DiscussionsIssue archiveOCCT:Modeling Algorithms

Archived issue #0027637

Method Geom_BSplineCurve::Segment() produces invalid B-spline curve while the source curve seems to be OK

Open CASCADEOCCT:Modeling Algorithmsassigned2 public notes

Search issues

Description

After applying Geom_BSplineCurve::Segment(...) method to the attached curves we obtain the result curve with several close poles and knots.

Result of Steps To Reproduce scrips:

SCRIPT # 1

Draw[]> dump cc1
*********** Dump of cc1 *************
BSplineCurve
  Degree 8, 28 Poles, 5 Knots
Poles :
...
  22 : -41.6415298559676, 11.5000002955484, 113.822875195299
  23 : -41.4999999999997, 11.5000001477742, 113.822875425416
  24 : -41.4999999999996, 11.5000001477742, 113.822875425416
  25 : -41.4999999999994, 11.5000001477742, 113.822875425416
  26 : -41.4999999999992, 11.5000001477742, 113.822875425416
  27 : -41.4999999999991, 11.5000001477742, 113.822875425416
  28 : -41.4999999999989, 11.5000001477742, 113.822875425416
Knots :

   ...
   4 : 1.38173176294828 5
   5 : 1.38173176294839 9


SCRIPT # 2

Draw[]> dump cc2
*********** Dump of cc2 *************
BSplineCurve
  Degree 8, 30 Poles, 5 Knots
Poles :
...
  22 : -41.614408772683, 11.5, 113.822875655532
  23 : -41.4999999999999, 11.5, 113.822875655532
  24 : -41.4999999999999, 11.5, 113.822875655532
  25 : -41.4999999999998, 11.5, 113.822875655532
  26 : -41.4999999999997, 11.5, 113.822875655532
  27 : -41.4999999999997, 11.5, 113.822875655532
  28 : -41.4999999999996, 11.5, 113.822875655532
  29 : -41.4999999999996, 11.5, 113.822875655532
  30 : -41.4999999999995, 11.5, 113.822875655532
Knots :

   ...
   4 : 0.807999411490432 7
   5 : 0.807999411490455 9

Steps to reproduce

SCRIPT # 1

Draw[]> restore Attachment 1 (BREP) c0
Draw[]> takesegment cc1 c0 1.0064553654290889 1.3817317629483903
Draw[]> dump cc1

SCRIPT # 2

Draw[]> restore Attachment 2 (BREP) c1
Draw[]> reverse c1
Draw[]> takesegment cc2 c1 0.61918345724997570 0.80799941149045451
Draw[]> dump cc2

Public activity

2 archived notes

Participants are labeled by their role within this record.

01Commenter 1
The code for "takesegment" DRAW-command is attached in Attachment 3 (CXX) file.
02Commenter 2
Does not the command "segment" do the same as "takesegment"?