jmplonka / InventorLoader

Workbench for FreeCAD to loads or import Autodesk (R) Inventor (R) files.
GNU General Public License v2.0
119 stars 17 forks source link

how to disable dimension constraints #28

Open sibbi77 opened 4 years ago

sibbi77 commented 4 years ago

The documentation says:

"Please disable Dimension constraints in user.cfg:

<FCBool Name="Sketch.Constraint.Dimension.Angle2Line" Value="0"/>
<FCBool Name="Sketch.Constraint.Dimension.Angle3Point" Value="0"/>

"

but where should I add these lines? The user.cfg is an xml file with, among others: group: <FCParamGroup Name="Sketcher"> and within this group: <FCParamGroup Name="General"> Nothing is spelled like "Sketch.Constraint.[...]"

jmplonka commented 3 years ago

Thank you reminding me, that the documentation is not synchronous with the implementation.

Initially it was planned to allow the user to enable or disable constraints in the GUI. Until now I wasn't able to do the implementation, so the preferences got really working. Up to now, whatever is written in the user.cfg file is not interpreted. If someone can help me out with making the properties/ImportExport/IPT stored in the user.cfg file this is no longer necessary! Best regards Jens

luzpaz commented 1 year ago

@AjinkyaDahale would you have a moment to weigh-in ?

AjinkyaDahale commented 1 year ago

@luzpaz what am I looking at here?

luzpaz commented 1 year ago

@jmplonka Can you specifically point out where in the GUI you'd like to add code that interacts with user.cfg that would be great.

@AjinkyaDahale indeed! We're trying to 'soup up' jmplonka's efforts to improve importing Autodesk file formats. There are some 'hoops' that users need to jump through in order to make that happen. Hopefully this can be more streamlined, hence I pinged you. Thank you for your attention!

sliptonic commented 1 year ago

This is interesting but the issue needs improvement. The origin seems to be several years old. There's no link to a forum topic or even the documentation in question.

luzpaz commented 1 year ago

It's in the README: https://github.com/jmplonka/InventorLoader#constraints-in-native-ipt-import

jmplonka commented 1 year ago

@luzpaz : where can I find an example of how to store user setting from the Preference-Dialog? I want to implement the missing part for Import-Export settings for IPT file types and I only have the PrfsInventorLoader.ui file. Is there any option to do this without c++?

jmplonka commented 1 year ago

Is it sufficient (ref. SheetMetal preferences) to add simply:

<property name="prefEntry" stdset="0"><cstring>Sketch.Constraint.Geometric.AlignHorizontal</cstring></property>
<property name="prefPath" stdset="0"><cstring>Mod/InventorLoader</cstring></property>
jmplonka commented 1 year ago

I think, I found the trick by replacing QCheckBox by Gui::PrefCheckBox:

<widget class="Gui::PrefCheckBox" name="cbx...">
...
 <property name="prefEntry" stdset="0"><cstring>[Property-Name]...</cstring></property>
 <property name="prefPath" stdset="0"><cstring>Mod/InventorLoader</cstring></property>
</widget>

So the constraints to be imported can be set in Preferences->Import/Export->IPT