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

GFA hanging forever #71

Open
marcocecchiscmgroup opened this issue Jun 7, 2023 · 4 comments
Open

GFA hanging forever #71

marcocecchiscmgroup opened this issue Jun 7, 2023 · 4 comments

Comments

@marcocecchiscmgroup
Copy link

marcocecchiscmgroup commented Jun 7, 2023

Dear Jens,
I stepped into a solid example of the limits of the OpenCascade GFA.
If you take the enclosed Fusion 360 example that I created to try out all the basic operations with solids, the solid conversion to STEP, the helix, hangs forever in surface.generalFuse(edges, tolerance):

	def build(self):
		if (self.__ready_to_build__):
			self.__ready_to_build__ = False
			edges = self.buildCoEdges()
			if (self._surface):
				surface = self.getSurface().build()
				if (surface):
					if (self.sense == 'reversed'):
						surface.reverse()
					if (len(edges) > 0):
						tolerance = 0.1
						component, elements = surface.generalFuse(edges, tolerance)
						faces = elements[0]

So, as it seems, the attempt to reduce the dependencies from Part for Issue #65, is stil causing troubles.

Even with the following hack, the processing takes a very long time, even if it doesn't hang.

Acis2Step.py:

def _convertFace(acisFace, parentColor, context):
	color = getColor(acisFace)
	if (color is None): color = parentColor
	try:
		#surface, sense = _createSurfaceFaceShape(acisFace)
		surface = None
		sense = acisFace.sense == 'forward'
		if (surface):
			face = ADVANCED_FACE('', surface, sense)
[...]

helix_cut.zip

Immagine

@marcocecchiscmgroup
Copy link
Author

Even with the following hack, the processing takes a very long time, even if it doesn't hang.

I will address this in a separate issue with more details.

@marcocecchiscmgroup
Copy link
Author

Not sure, maybe I played around too much with variations of the master codebase, but, 'luckily' the point where the processing hangs is always the aforemetioned one. It don't know, but yesterday I got a different behaviour someway.

Attaching the sat version for your convenience.

helix_cut.sat.sat.zip

@marcocecchiscmgroup
Copy link
Author

marcocecchiscmgroup commented Jun 8, 2023

What about this fix?

EDIT: of course speaking of the STEP conversion

>					self.shape = surface
<				if (len(edges) > 0):
<					tolerance = 0.1
<					component, elements = surface.generalFuse(edges, tolerance)
<					faces = elements[0]
<					if (len(faces) == 0):
<						logWarning("Can't apply wires for face (no elements) for %s" %(self._surface))
<					else:
<						self.shape = eliminateOuterFaces(faces, edges)
<						if (self.shape is None):
<							# edges can be empty because not all edges can be created right now :(
<							logWarning("Can't apply wires for face %s!" %(surface.Surface))
<							for f in faces:
<								Part.show(f, "Face-%d" %(self.record.index))
<				else:
<					self.shape = surface

@marcocecchiscmgroup
Copy link
Author

marcocecchiscmgroup commented Aug 30, 2023

Hello Jens,

how about your holydays? ;)

Any chance to work on items #72, #73 , #74, #75 and #76?

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

No branches or pull requests

1 participant