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

Related pages

GeomProjLib::Curve2d doesn't project the curve.

Anonymous's picture
Forums: 

Hello

It seems that "GeomProjLib::Curve2d()" doesn't project the curve on the surface itself. This means that I have to "GeomProjLib::Project()" the curve on the surface first and the resulting curve can be projected to a 2D curve in the parametric space of the surface. According to the documentation the intermediate step isn't necessary. Is this correct or do I do something wrong?

By the way, sometimes "GeomProjLib::Curve2d()" fails and returns a null handle for relatively simple geometry. The surface is a simple BSplineSurface and the curve a simple BSplineCurve that has a valid projection on the Surface. Is there something I can do to still get a 2D curve? Some sample geometry is below.

Yours Matthias Sattler

Surfacedata: Control points: X: 34.1421 Y: 1100.26 Z: 34.1421 weight: 0.666667 X: 34.1421 Y: -899.739 Z: 34.1421 weight: 0.666667 X: 9.64724 Y: 1100.26 Z: 58.637 weight: 0.333333 X: 9.64724 Y: -899.739 Z: 58.637 weight: 0.333333 X: 0.681483 Y: 1100.26 Z: 25.1764 weight: 0.666667 X: 0.681483 Y: -899.739 Z: 25.1764 weight: 0.666667 X: -8.28427 Y: 1100.26 Z: -8.28427 weight: 0.333333 X: -8.28427 Y: -899.739 Z: -8.28427 weight: 0.333333 X: 25.1764 Y: 1100.26 Z: 0.681483 weight: 0.666667 X: 25.1764 Y: -899.739 Z: 0.681483 weight: 0.666667 X: 58.637 Y: 1100.26 Z: 9.64724 weight: 0.333333 X: 58.637 Y: -899.739 Z: 9.64724 weight: 0.333333 X: 34.1421 Y: 1100.26 Z: 34.1421 weight: 0.666667 X: 34.1421 Y: -899.739 Z: 34.1421 weight: 0.666667 UKnots Knot: 0 with multiplicity: 3 Knot: 1 with multiplicity: 2 Knot: 2 with multiplicity: 2 Knot: 3 with multiplicity: 3 VKnots Knot: 0 with multiplicity: 2 Knot: 1 with multiplicity: 2 Udegree: 2 Vdegree: 1

Curvedata (3D curve before the projection): Control points: Control point: 0 X: -1.14897e-05 Y: 0 Z: 20 Control point: 1 X: 2.70834e-05 Y: 0 Z: 16.8584 Control point: 2 X: 0.61666 Y: 0 Z: 13.7167 Control point: 3 X: 1.85107 Y: 0 Z: 10.7369 Control point: 4 X: 3.6364 Y: 0 Z: 8.07927 Control point: 5 X: 5.85786 Y: 0 Z: 5.85786 Control point: 6 X: 8.07927 Y: 0 Z: 3.6364 Control point: 7 X: 10.7369 Y: 0 Z: 1.85107 Control point: 8 X: 13.7167 Y: 0 Z: 0.61666 Control point: 9 X: 16.8584 Y: 0 Z: 2.7083e-05 Control point: 10 X: 20 Y: 0 Z: -1.14897e-05 Curve knots. Knot: 0 with value: 0 and multiplicity: 6 Knot: 1 with value: 1 and multiplicity: 5 Knot: 2 with value: 2 and multiplicity: 6