Giter Site home page Giter Site logo

Comments (4)

maxwxyz avatar maxwxyz commented on June 24, 2024

@bgbsww related to TNP?

from freecad.

bgbsww avatar bgbsww commented on June 24, 2024

Quick test shows it happening in 0.21.2 where TNP is still off. It also happens in LS3 and in 0.20.2 Is the example code correct, and on what version exactly did it return None?

from freecad.

tomate44 avatar tomate44 commented on June 24, 2024

Indeed, I observe the same behavior on 0.21.2, and on Appimage 0.20.2 with OCCT 7.6.3
That look strange because I use this function for years, and I am sure it worked fine in the past.
So I have no clue what's going on ???
By the way, here is another script showing the bug :

cone = Part.makeCone(2, 4, 10)
seam = cone.Edge2
Part.show(seam, "Seam")
# This edge has 2 pcurves
print(seam.curveOnSurface(0))
print(seam.curveOnSurface(1))
print(seam.curveOnSurface(3))  # None = no more pcurves

topface = cone.Face2
Part.show(topface, "TopFace")

cos = topface.curveOnSurface(seam)
print(cos)
# should be None because seam has no pcurve on the top face
# instead, the returned curve2D is a projection of the seam on the topface
edge = cos[0].toShape(topface.Surface, cos[1], cos[2])
Part.show(edge, "PCurve")

from freecad.

tomate44 avatar tomate44 commented on June 24, 2024

I checked into Opencascade source code.
When Face is a plane and no existing pcurve is found, curveOnSurface() does a projection on the plane.
Quite strange it does not check if Edge and Face are coplanar beforehand.
Anyway, I was obviously wrong.
Apologies for the wasted time. I close.

from freecad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.