Please sync the git, I have some follow up pushes to fix some Path.Area problem I've found. Maybe it has been fixed.sliptonic wrote: I'm getting some very strange results.
Discussion: Path.Area and Path::FeatureArea (PR 460)
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: Discussion: Path.Area and Path::FeatureArea (PR 460)
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: Discussion: Path.Area and Path::FeatureArea (PR 460)
What about pocketing. You'll need a 'negative' face, right? Any tools to help with that?sliptonic wrote: Yeah, it's still rough but improving I've started doing videos to document path but the basic workflow looks like:
- sliptonic
- Veteran
- Posts: 3457
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: Discussion: Path.Area and Path::FeatureArea (PR 460)
realthunder wrote:What about pocketing. You'll need a 'negative' face, right? Any tools to help with that?sliptonic wrote: Yeah, it's still rough but improving I've started doing videos to document path but the basic workflow looks like:
Funny you mention that. A partial depth pocket is no problem because we can use the bottom face to control boundary. We just had discussion about thru-hole pockets. This is one reason I'm so interested in your stuff
- sliptonic
- Veteran
- Posts: 3457
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: Discussion: Path.Area and Path::FeatureArea (PR 460)
Pulled and rebuilt with commit #736cd39851b03dcd84aa6d4a2ccf10d1fe342669realthunder wrote:Please sync the git, I have some follow up pushes to fix some Path.Area problem I've found. Maybe it has been fixed.sliptonic wrote: I'm getting some very strange results.
This still causes an error if run as a macro. But it works line by line in the console. Same error about wrong parameters.
Code: Select all
import Path
import Part
area = Path.Area(FitArc=True, Offset=1.0)
area.setPlane(Part.makeCircle(10))
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: Discussion: Path.Area and Path::FeatureArea (PR 460)
This an curious little bug. The error is cause by a typo. Should be ArcFits, not ArcFit. The error occurred in the constructor. But there is some thing peculiar about error handling in constructor that cause the error message to be delayed by one console line input. So if you type insliptonic wrote: This still causes an error if run as a macro. But it works line by line in the console. Same error about wrong parameters.
Code: Select all
area = Path.Area(FitArc=True)
and type two 'Enter', you'll get the error message.
I've fixed that in the recent push with clear message showing the wrong parameter name.
I also added some improvements. Iterate through sections is made easier, sample code below:
Code: Select all
import Path
area = Path.Area(SectionCount=-1,Offset=1.0,PocketMode=2)
area.add(Part.makeBox(10,10,10))
for s in area.Sections:
Part.show(s)
Code: Select all
import Path, Part
doc=App.newDocument('test')
doc.addObject('Part::Feature','cube').Shape = Part.makeBox(10,10,10)
doc.addObject('Path::FeatureArea','area')
feature = doc.area
feature.Sources = [doc.cube]
feature.ViewObject.Visibility = False
feature.setParams(SectionCount=-1,Offset=1.0,PocketMode=2)
feature.recompute()
area = feature.getArea()
for s in area.Sections:
Part.show(s)
- sliptonic
- Veteran
- Posts: 3457
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: Discussion: Path.Area and Path::FeatureArea (PR 460)
This might help illustrate one of the problems we've got with pocketing now.
take a shape like my contour torture test. It has a sharp undercut that can't be milled in the current orientation.: Still, we want to rough it out of a cuboid block. We could model the block and do a boolean to get the material to be removed: And then use libarea to slice this into layers The top layers are fine but when we get to the undercut, it's naively unaware of the layers above: In a way, this is the reverse of the 3d printing problem with overhangs. They need to add 'support material' and we need to avoid cutting in areas that can't be reached from above.
The area in the bottom center that can actually be milled from above, isn't correlated to any one face or any set of edges that can be easily picked. So we either need to identify areas that can be milled and let the user build operations for those areas. Or we need to identify areas that CAN'T be reached and subtract them from operations.
A 2D projection from above along the Z axis helps but I'm not sure what kind of user interface would let the user pick this area to mill.
take a shape like my contour torture test. It has a sharp undercut that can't be milled in the current orientation.: Still, we want to rough it out of a cuboid block. We could model the block and do a boolean to get the material to be removed: And then use libarea to slice this into layers The top layers are fine but when we get to the undercut, it's naively unaware of the layers above: In a way, this is the reverse of the 3d printing problem with overhangs. They need to add 'support material' and we need to avoid cutting in areas that can't be reached from above.
The area in the bottom center that can actually be milled from above, isn't correlated to any one face or any set of edges that can be easily picked. So we either need to identify areas that can be milled and let the user build operations for those areas. Or we need to identify areas that CAN'T be reached and subtract them from operations.
A 2D projection from above along the Z axis helps but I'm not sure what kind of user interface would let the user pick this area to mill.
Re: Discussion: Path.Area and Path::FeatureArea (PR 460)
Hi sliptonic,
is it possible to ad a inquiry into the code which compares the dimensions of the layer to cut with the layer bevore? Something like "if layer4 > layer3 then cut layer3"?
is it possible to ad a inquiry into the code which compares the dimensions of the layer to cut with the layer bevore? Something like "if layer4 > layer3 then cut layer3"?
Gruß Herbert
Re: Discussion: Path.Area and Path::FeatureArea (PR 460)
What exactly do you want to compare? x and y componentwise won't do, because as in sliptonic's example the layers can be "twisted" against each other. What should happen, if the condition does not hold?herbk wrote:Hi sliptonic,
is it possible to ad a inquiry into the code which compares the dimensions of the layer to cut with the layer bevore? Something like "if layer4 > layer3 then cut layer3"?
The approach with a 2d projection sounds promising. A question might be if the whole projection is calculated before the first step or if it is calculated before each layer. The latter being some kind of optimization already, yielding a sort of (Maya) pyramid.
I would vote for the former, because it is a very clear operation, usually performed with a rough mill. The UI seems simple to me: I would select the whole part, and contour cuts in 1 or more steps the 2D projection (which is for me, well, ... the contour ).
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Discussion: Path.Area and Path::FeatureArea (PR 460)
Hi Chris,
the whole thing sems to me, like it go's more to 3D (2,5D) milling, not only get a contour...
I have no idea how this could be realized, but maybe someone else have...
the whole thing sems to me, like it go's more to 3D (2,5D) milling, not only get a contour...
why? I understand, that the layers are produced by a slicer. Why should the slicer change the order of the layers? If you change it manuel it will break, of course...because as in sliptonic's example the layers can be "twisted" against each other
The area/shape of the aktual layer with the layer done before. Will the tool break the the shape of the layer before, the use the same path as layer before.What exactly do you want to compare?
I have no idea how this could be realized, but maybe someone else have...
Gruß Herbert
Re: Discussion: Path.Area and Path::FeatureArea (PR 460)
Now the branch works on all supported platforms and is ready for merge. Does everybody agree to merge it?