-
Couldn't load subscription status.
- Fork 201
FIX: added property file unit to import_3d model #6678
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Added property file unit to import_3d model |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4911,6 +4911,7 @@ def import_3d_cad( | |
| reduce_error=0, | ||
| merge_planar_faces=True, | ||
| merge_angle=0.02, | ||
| input_file_unit="Auto", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo here: Unit You could also explain what "Auto" options does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would also rename the variable as simply : "units" It is more pythonic. |
||
| ): | ||
| """Import a CAD model. | ||
|
|
||
|
|
@@ -4949,6 +4950,8 @@ def import_3d_cad( | |
| Stl automatic planar face merge during import. Default is ``True``. | ||
| merge_angle : float, optional | ||
| Stl import angle in radians for which faces will be considered planar. Default is ``2e-2``. | ||
| input_file_unit: str, optional | ||
| Uinit for the stl file. | ||
|
|
||
| Returns | ||
| ------- | ||
|
|
@@ -4973,7 +4976,6 @@ def import_3d_cad( | |
| vArg1.append("ImportFreeSurfaces:="), vArg1.append(import_free_surfaces) | ||
| vArg1.append("GroupByAssembly:="), vArg1.append(group_by_assembly) | ||
| vArg1.append("CreateGroup:="), vArg1.append(create_group) | ||
| vArg1.append("STLFileUnit:="), vArg1.append("Auto") | ||
| ( | ||
| vArg1.append("MergeFacesAngle:="), | ||
| vArg1.append(merge_angle if input_file.endswith(".stl") and merge_planar_faces else -1), | ||
|
|
@@ -4988,6 +4990,7 @@ def import_3d_cad( | |
| vArg1.append("ImportMaterialNames:="), vArg1.append(import_materials) | ||
| vArg1.append("SeparateDisjointLumps:="), vArg1.append(separate_disjoints_lumped_object) | ||
| vArg1.append("SourceFile:="), vArg1.append(input_file) | ||
| vArg1.append("STLFileUnit:="), vArg1.append(input_file_unit) | ||
| self.oeditor.Import(vArg1) | ||
| if refresh_all_ids: | ||
| self.refresh_all_ids() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo here: Unit
You could also explain what "Auto" options does