Comments (4)
@easyw would you be able to help with this issue ?
from freecad.
would certainly help where I can. So far I've attempted to find a cause, or workaround from the Python side of things without much success. I'm working on a minimal macro to recreate the issue, this should be helpful debugging the issue further.
from freecad.
ok, here's a minimal macro that I think demonstrates the problem. During the actual FeaturePython
and ViewProvider
creation parts, nothing is actually added to the PythonFeature.Shape
. Despite this, when the Body
is added as a group member, the PythonFeature
assumes the shape of it's child, effectively duplicating it.
import FreeCAD as App
import Part
def create(obj_name):
obj = App.ActiveDocument.addObject('Part::FeaturePython', obj_name)
box(obj)
ViewProviderBox(obj.ViewObject)
return obj
class box():
def __init__(self, obj):
obj.addExtension('App::GroupExtensionPython')
class ViewProviderBox:
def __init__(self, obj):
obj.Proxy = self
obj.addExtension('Gui::ViewProviderGroupExtensionPython')
def getIcon(self):
return """
/* XPM */
static const char * ViewProviderBox_xpm[] = {
"16 16 6 1",
" c None",
". c #141010",
"+ c #615BD2",
"@ c #C39D55",
"# c #000000",
"$ c #57C355",
" ........",
" ......++..+..",
" .@@@@.++..++.",
" .@@@@.++..++.",
" .@@ .++++++.",
" ..@@ .++..++.",
"###@@@@ .++..++.",
"##$.@@$#.++++++.",
"#$#$.$$$........",
"#$$####### ",
"#$$#$$$$$# ",
"#$$#$$$$$# ",
"#$$#$$$$$# ",
" #$#$$$$$# ",
" ##$$$$$# ",
" ####### "};
"""
def canDropObject(self, obj):
return True
o1 = create('test')
body = App.ActiveDocument.addObject('PartDesign::Body','Body')
box = App.ActiveDocument.addObject('PartDesign::AdditiveBox','Box')
box.Length = 10
box.Width = 10
box.Height = 10
body.addObject(box)
o1.addObject(body)
o1.Placement.Base.x = 12
App.ActiveDocument.recompute()
from freecad.
Couple other things I've noticed, that seem like problematic behavior...
If the Placement on the Feature is changed, it's Shape is moved, but the Body in the Group does not. My feeling for how this should work, is if a Group is moved, all of it's Children should also be moved accordingly. Also in this case the Placement of neither the Feature nor its Shape are updated, which I >guess< hints at a rendering error?
from freecad.
Related Issues (20)
- Box Selection Improvements
- The application "FreeCAD" can't be opened. Application crashes on start. HOT 2
- Consistency in what commands are placed where HOT 1
- Core: App::Part child object's CopyOnChangeGroup is inconsistently referenced in App::Part parent object.
- Spreadsheet: `importXLSX.py` "some cells don't have `t` and `s` attributes" HOT 2
- Reading and writing to spreadsheet that has color applied to all cells freezes for a multiple minutes HOT 6
- Part naming not unique in Elmer SIF files / Not all boundary conditions written HOT 3
- Continuous trimming doesn't work HOT 5
- Failed to add geometry: index out of bound
- Navigation cube seems to get wrong mouse coordinates when built with qt6 HOT 16
- GCode export for RepRapFirmware fails HOT 2
- CAM - 'tuple' object has no attribute 'DiffuseColor' HOT 3
- [Problem] Deleting link can cause other objects to be deleted if they are referenced in formulas
- Assembly: Loading WB crashes FreeCAD instantly HOT 25
- Crash on sketch loading HOT 22
- Sketcher: Slot symmetry problem HOT 2
- [Scripting] ValidateSketch cannot be scripted
- Angle constraint in sketcher is inverted from one side to the other of the plane origin HOT 4
- Dragging a sketch around a point inconsistency in sketcher WB HOT 3
- Toggle Grid button should be a toggle button that reflects the visibility status of the grid HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freecad.