Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete import on plain SAT #82

Open
marcocecchiscmgroup opened this issue Feb 21, 2024 · 3 comments
Open

Incomplete import on plain SAT #82

marcocecchiscmgroup opened this issue Feb 21, 2024 · 3 comments
Assignees

Comments

@marcocecchiscmgroup
Copy link

marcocecchiscmgroup commented Feb 21, 2024

Dear Jens,
this one should be very easy for you.
The attached sat, which presents nothing apparently unusual, crashes on conversion. The reason is simple, it's OCCT failing to create a periodic b-spline when indicated to be non periodic. The fix is simple:

  	periodic = False, \
  	periodic = pcurve.uPeriodic, \

in create createBSplinesPCurve().
With this, the converted step misses the six holes (cylindrical surface with all its bounds) on the side face.
Actually the conversion results in a STEP file which is about half the size of the correct version. Both are included.

Your help here would be much appreciated, thanks in advance.
samples.zip

@marcocecchiscmgroup
Copy link
Author

Actually the problem is in the boundary of the cylindrical surface the six drills on the side face are made of.
image

Can you take a look please?

@jmplonka
Copy link
Owner

jmplonka commented Dec 12, 2024

but how can I than "recalculate" the new number of poles, knots, ... because for periodic curves the number and sums are mismatching.

@marcocecchiscmgroup
Copy link
Author

marcocecchiscmgroup commented Dec 12, 2024

This works:

if (pcurve.rational):
try:
bsc.buildFromPolesMultsKnots(
poles = pcurve.poles,
mults = pcurve.uMults,
knots = pcurve.uKnots,
periodic = pcurve.uPeriodic,
degree = pcurve.uDegree,
weights = pcurve.weights)
except:
bsc.buildFromPolesMultsKnots(
poles = pcurve.poles,
mults = pcurve.uMults,
knots = pcurve.uKnots,
periodic = False,
degree = pcurve.uDegree,
weights = pcurve.weights)
else:
try:
bsc.buildFromPolesMultsKnots(
poles = pcurve.poles,
mults = pcurve.uMults,
knots = pcurve.uKnots,
periodic = pcurve.uPeriodic,
degree = pcurve.uDegree)
except:
bsc.buildFromPolesMultsKnots(
poles = pcurve.poles,
mults = pcurve.uMults,
knots = pcurve.uKnots,
periodic = False,
degree = pcurve.uDegree)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants